Useful Linux commands, CentOS, server administrator, SSH, server auditor, ExtraPutty

Useful Linux commands for Server Administrators

ServerAuditor logo, SSH, Linux, CentOS, commandsThis is a list of useful Linux commands for Server Administrators. Please use following commands on a CentOS server. You can connect via SSH to your Linux server using ExtraPutty or ServerAuditor. How to access your server via SSH? Follow this link: http://www.valoroso.it/linux-server-lamp-and-mail-for-hosting-purposes/.

Useful Linux commands: update

You should check periodically for updates. Run:

yum update

A list of all available updates will appear. Press ‘y’ to let yum update your server, otherwise press ‘n’.
Even if I never had problems during this procedure, do not forget to perform a server backup before and after the update. Check if apache, exim, mysql and all other server programs are still working!

To exclude a specific package from update:

yum –exclude=package* update

ExtraPutty logo, SSH, Linux, CentOS, commandsUseful Linux commands: add or remove software

Add software

yum install name  (where name is the name of software you want to install)

Of course you need to have the repositories installed in /etc/yum.repos.d/, otherwise yum may not be able to install the software.

Remove software

yum remove name (where name is the name of software you want to remove)

Useful Linux commands: exim (mail transfer agent)

This is a list of useful commands to understand what exim (the mail transfer agent) is doing on your server.

exim -bp  (list the messages queue)
exim -bp | exiqsumm  (count the queued messages)
exim -bpc   (number of queued messages)
exiwhat  (what is exim doing now?)
exim -bP  (list all the configuration parameters)
exim -bP queue_run_max  (see a specific configuration parameter,  i.e. queue_run_max)

Useful Linux commands: files

CentOS, 6.5, Linux, server, useful linux commands for server administratorsdf -h  (available space on drives)
du -kscxh *  (to run in the / folder, show subfolders dimensions)
find / -name *file*  (find a specific file in the hdd)
cd folder  (change current folder)
wget http://address/file.ext  (download the specified file from the Internet)

This is a useful command, especially when you restore a website from a compressed archive via SSH and you have root privileges. Without running chown, just root user can modify files, so WordPress will not work properly. You need to change user from root to the proper user:
chown -R user /home/user/web  (replace user with the proper username, /home/user/web is the folder where VestaCP stores websites)

Share with your friends

Posted in Tutorials.

3 Comments

  1. Excellent information! This is really interesting. I have joined your feed and look forward to seeking more of your posts.

  2. This is a really nice post. Thanks to finding the time to produce a very good article!

Leave a Reply

Your email address will not be published. Required fields are marked *

captcha

Please enter the CAPTCHA text