| Server | nano index.html | Create a index.html file |
| Server | printf ‘HTTP/1.1 200 OK\n\n%s’ “$(cat index.html)” | netcat -l 8888 | Run a simple web server |
| Server | nc -lv 80 | Listen on port 80 |
| Client | nc 192.168.22.88 80 | Connection test |
| Server | nano index.html | Create a index.html file |
| Server | printf ‘HTTP/1.1 200 OK\n\n%s’ “$(cat index.html)” | netcat -l 8888 | Run a simple web server |
| Server | nc -lv 80 | Listen on port 80 |
| Client | nc 192.168.22.88 80 | Connection test |
Cloudfuse is a FUSE application which provides access to Cloud Files (Object Store). Object Store is a remote storage system which is similar to Amazon S3. It provides a simple RESTful interface to storing and retrieving objects.Use the following steps on your Centos/Redhat environment.
Install packages as the root user:
#yum install gcc make fuse-devel curl-devel libxml2-devel openssl-devel git
Download the cloudfuse files:
#cd /tmp/
#git clone https://github.com/redbo/cloudfuse.git
Go in to the cloudfuse directory and build the cloudfuse binary:
#cd cloudfuse/
#./configure
#make
#make install
Then create the credentials file in:
#vi /root/.cloudfuse
Copy the lines below and fill in the blanks:
username= ‘Your User Name’
api_key=’API Key from your Service Provider’
authurl=’URL from your Service Provider’
You can use SSL if you want
verify_ssl=True
Set the correct permissions:
#chmod 600 /root/.cloudfuse
Now you can mount the directory on your filesystem:
#cloudfuse /path/to/mount
Use the steps below to reset “root” password in Ubuntu
You can use “cpulimit” program that can limit the CPU usage for a particular process. Follow the process below to set a limit for CPU usage.
Type the following commands to install “cpulimit”:
# cd /tmp
# wget ‘http://downloads.sourceforge.net/cpulimit/cpulimit-1.1.tar.gz’
# tar -zxvf cpulimit-1.1.tar.gz
# cd cpulimit-1.1
# make
# cp cpulimit /usr/local/sbin/
# rm -rf cpulimit*
Type the following command to install “cpulimit”:
$ sudo apt-get update
$ sudo apt-get install cpulimit
To limit CPU usage of the process called firefox to 30%, enter:
# cpulimit -e gzip -l 30
To limit CPU usage of the process to 30% by using its PID, enter:
# cpulimit -p 1313 -l 30
To find out PID of the process use any of the following:
# ps aux | less
# ps aux | grep gzip
# pgrep -u php php-cgi
# pgrep gzip
You can also use absolute path name of the executable, enter:
# cpulimit -P /bin/gzip -l 30
Parameter:
If your Zimbra does not listen on port 80 then following command will help to enable Zimbra web-port 80 and redirect to 443.
#su – zimbra
#zmtlsctl both
#zmtlsctl redirect
#zmcontrol stop
#zmcontrol start
If you need to change Zimbra web-port like 80 or 443, you can use following command to change it.
#su – zimbra
#zmprov ms server.hostname zimbra MailPort port
#tomcat stop
#tomcat start
or
#su zimbra
#zmprov mcf zimbraMailPort port
#tomcat stop
#tomcat start
#zmprov gcf zimbraMailPort //to show the existing listening port
#mv /opt/zimbra/mailboxd/etc/keystore /opt/zimbra/mailboxd/etc/keystore.borked
#sudo /opt/zimbra/bin/zmcertmgr deploycrt self