Apr 19 2014 
Support Center » Knowledgebase » Linux VPS » Administration
Knowledgebase Categories
The knowledgebase is organized into different categories; please select a category that you are interested in. You can also search the entire knowledgebase by entering keywords in the navigation bar beside this text.

 What are some basic commands that I need to know to use Linux?
 If you are new to shell (SSH), below are some commands to get you started. A full list of shell commands can be found here http://www.oreillynet.com/linux/cmd/ 1. To login into shell on any of our servers you need a SSH client on your PC. Putty is a
 Basic Commands for Services
 IPTABLES To check firewall rule set using iptables: iptables -L To Flush/Clear the firewall rules: iptables -F Restarting the iptables service will flush the all the defined chain which is not loaded into kernel. Restart the iptables service us
 How can I check the number connections to a port from an IP?
 While logged into your VPS via SSH as root you can run the following command: netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
 How do I check my VPS Memory Resource Usage?
 You can use the command free -m to check the memory usage. -bash-2.05b# free -m total used free shared buffers cached Mem: 1024 186 837 0 0 0 -/+ buffers/cache: 186 837 Swap: 0 0 0 -bash-2.05b# total = Total RAM available used = RAM used Av
 How do I check for the status of MySQL and what it is doing?
 To check MySQL Status via WHM: WHM -> Server Status -> CPU/Memory/Mysql Usage Or you can check the MySQL usage using the command "mysqladmin status" and "mysqladmin processlist" using SSH. root@host [~]# mysqladmin status Uptime: 7947 Threads:
 MySQL is not starting and giving innodb corrupt errors. How can I fix this?
 If MySQL is not starting and giving innodb corrupt errors in /var/lib/mysql/$HOSTNAME.err you can do the following to attempt to get MySQL to start: * check the MySQL error log: tail -n30 /var/lib/mysql/$HOSTNAME.err * Edit /etc/my.cnf
 MySQL Error - Table tablename is marked as crashed and should be repaired
 If you see the MySQL Error "Table tablename is marked as crashed and should be repaired" you can do the following to repair your databases: If your VPS is running cPanel: service chkservd stop service mysql stop cd /var/lib/mysql/ find . -
 How do I optimize Apache to use less memory?
 Apache Memory Use Optimization 1. SSH into your server as root. 2. Run top. 3. Press shift + m. 4. Note the highest RES memory used by httpd. 5. Hit Q to exit top. 6. Execute: service httpd stop 7. Once httpd is stopped,
 What can I do if Apache has reached the MaxClients setting?
 Error Log - Apache server reached MaxClients setting consider raising the MaxClients setting * Be sure you've read over: How to optimize Apache memory usage * If your server is properly optimized and you have available memory, increase Ma
 Apache was running but sites are not resolving.
  * List down httpd processes to check if httpd is running ps ax | grep http httpd process running but sites still not resolving * Restart httpd service service httpd restart * Make sure named is running ps aux |
 SQL lite database error while doing a yum update
 If yum update fails with the following error on screen: =========== self.doSackSetup(thisrepo=thisrepo) File "__init__.py", line 260, in doSackSetup File "repos.py", line 287, in populateSack File "sqlitecache.py", line 96, in getPrimary File "sql
 How do I change the default SSH port?
 How to change default ssh port. 1. Login to shell as root. 2. Use any preferred editor to edit the file /etc/ssh/sshd_config 3. Search for Port option, uncomment it and change the port number. 4. Save the changes and close editor. 5. Make sure that
 What do I do if I get a rndc reload error with BIND (named)?
 If you are to run into error while reloading rndc values via ssh then please try: # cd /etc # rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2 The output of the above command will be the RNDC key as below: KgX0x/KFDE9Ylzq7JAbGs==
 How do I connect to my VPS using SSH and PuTTY?
 1. Download the SSH client on your local machine (assuming that you are using Windows). http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe 2. Save the file to your desktop and double click it. 3. A window will be opened asking you what serv
 How do I disable telnet?
 1. Login to your server through SSH and su to root. 2. Type vi /etc/xinetd.d/telnet 3. Look for the line: disable = no and replace with disable = yes 4. Now restart the xinetd service: /etc/rc.d/init.d/xinetd restart 5. Turn telnet off through
 How do I authorize a remote IP to relay through exim?
 Create a file with your host IP or IPs and name it something like: /etc/privaterelay The file contents will look like this (adjusted to the IPs you need authorized): Next, locate the following entry at the
 How do I forward ports on my VPS?
 It's not possible to do port forwarding in VPS environment because of some limitations but the following workaround does the same thing. 1. Login to shell as root. 2. Execute following commands: # cat > /etc/xinetd.d/redirect26 service redirect26
 How do I prevent a cronjob from sending emails to me?
 Add " >/dev/null 2>&1 " after the entry in the crontab, so that it looks something like this:0 * * * * /home/user/backup.pl >/dev/null 2>&1
 How do I backup a MySQL database using SSH?
 Login to your server using SSH and use one of the following commands:/path/to/bin/mysqldump -u $mysqlusername -p$mysqlpassword $mysqldatabasename > backup.sqlOR:mysqldump -u user -p --opt database > backup_file
 I can view my site with the www prefix but not without it, how do I fix this?
 1. Login to server as root.2. Edit the file /usr/local/apache/conf/httpd.conf.3. Look for VirtualHost entry for the domain.4. Make sure that there is entry like for example:ServerName mydomainname.comServerAlias
 My CGI scripts only show the source code and don't run. What do I need to do?
 Make sure that the Apache module 'cgi_module' is loaded. It should be the line in httpd.conf:        LoadModule cgi_module modules/mod_cgi.so
 How do I fix my PHP scripts? When I access the page my browser asks to download the file.
 While accessing any PHP page, browser offers to save it instead of showing content.This issue occurs if wrong mime type is assigned to '.php' extension or when PHP Apache module is not configured properly.1. Make sure that proper m
 Login [Lost Password] 
Remember Me:
 Main Categories
Home | Register | Knowledgebase

Help Desk Software By Kayako eSupport v3.60.02