-
Check current network bandwidth usage on Linux System
root@choi:/usr/local/bin# vim netspeed #!/bin/bash if [ -z “$1” ]; then echo echo usage: $0 network-interface echo echo e.g. $0 eth0 echo exit fi IF=$1 while true do R1=`cat /sys/class/net/$1/statistics/rx_bytes` T1=`cat /sys/class/net/$1/statistics/tx_bytes` sleep 1 R2=`cat /sys/class/net/$1/statistics/rx_bytes` T2=`cat /sys/class/net/$1/statistics/tx_bytes` TBPS=`expr $T2 – $T1` RBPS=`expr $R2 – $R1` TKBPS=`expr $TBPS / 1024` RKBPS=`expr $RBPS / 1024` echo “tx…
-
View IP information in OpenVZ Guest OS
vzlist -o veid,ip | grep 1xxxx
-
View email address password in qmail with Plesk 11
/usr/local/psa/admin/bin/mail_auth_view | grep choi@webserverpage.com
-
Migrate email addresses and emails from old plesk server to other plesk server using qmail.
rsync –verbose –progress –stats –compress –recursive –times –perms –archive –rsh=”ssh -p 2002″ root@source_IP:/var/qmail/mailnames/damainname.com/ /var/qmail/mailnames/domainname.com
-
Change ssh port from 22 to other port number.
1. Login first to your machine as a ‘root’ user. 2. Edit the config below. vi /etc/ssh/sshd_config 3. Uncomment the line below and change ‘yes’ to ‘no’. Port 456 4. Save and exit the restart the ssh service. /etc/rc.d/init.d/sshd restart
-
Disable direct root login in CentOS 6.
1. Login first to your machine as a ‘root’ user. 2. Edit the config below. vi /etc/ssh/sshd_config 3. Uncomment the line below and change ‘yes’ to ‘no’. PermitRootLogin no 4. Save and exit the restart the ssh service. /etc/rc.d/init.d/sshd restart
-
How do I set up Microsoft Outlook 2007 using POP?
Step 1: On your computer, click the Start Menu and select Control Panel. Step 2: If using Windows XP, double-click the Mail icon. If using Windows Vista, Windows 7 or above, type Mail into the search box at the top-right of the Control Panel window to quickly find the Mail icon. Then, double-click it.…
-
Host multiple domain name in a Virtual Host.
1. You may need to install apache in your CentOS box. yum install httpd 2. Edit the httpd.conf file. vi /etc/httpd/conf/httpd.conf Below is my customize httpd.conf which host two websites (siteone.com and sitetwo.com). Listen *:80 <VirtualHost 192.168.2.124:80> ServerAdmin test@webserverpage.com ServerName siteone.com ServerAlias www.siteone.com DocumentRoot /var/www/html/siteone DirectoryIndex index.html index.pl index.php DocumentRoot /var/www/html/siteone ScriptAlias /cgi-bin/ /var/www/html/siteone/cgi-bin/ <Directory…
-
How to create a symbolic link in CentOS
This is an example on how to link the files from the current directory to /etc folder. /bin/ln -sf myfile.conf /etc/myfile.com
-
Apache (httpd) is not working on external IP address after fresh install of CentOS.
By default port 80 is not added in the accepted of the builtin firewall/iptables of CentOS. Below is the default content of the ip tables. /***************************************************************/ # Generated by iptables-save v1.3.5 on Thu Nov 22 14:43:27 2012 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [4076:351018] :RH-Firewall-1-INPUT – [0:0] -A INPUT -j RH-Firewall-1-INPUT -A…