Basic Linux Server Administration

Basics:
Here are a few simple commands to be used from the SSH/VNC command line on most linux based distributions:

w
: will provide a quick breakdown of the server uptime and load average
top: will display top processor usage information

While running top, the following are a few common command line options

A : Sorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system.
c : Toggle full command display
f : Enters an interactive configuration screen for top. Helpful for setting up top for a specific task.
k : Issues kill command.
M : Sort by memory usage.
N : Sort by numeric process ID
o : Enables you to interactively select the ordering within top.
t : Displays summary information off and on.
T : Sort by process time
z :Turn on or off color/mono
space : Immediately update the display

Server Logs:
There are many server logs available for review to aid with identifying and resolving problems.

/var/log/dmesg - Kernel/boot information
/var/log/boot.log - Boot log
/var/log/messages* - General sytem messages
/var/log/secure - authentication logs


Memory usage & statistics:

free -m

Disk usage & statistics:
df -h

Apache:
Some of the most common errors generated with the apache service and their meanings are as follows:

400 Bad Request
401
Authorization Required
403 Forbidden
404 Not Found
500 Internal Server Error

To identify the cause of such errors, you will want to review the apache error logs which can be found in the following areas depending on your setup:

/usr/local/apache/logs/error_log
/etc/httpd/logs/error_log

/var/log/apache2/error.log
/var/log/httpd/error_log

Access Logs: if you are finding a particular user to have a large number of processes then reviewing the process itself in further detail or reviewing that accounts access logs can be helpful (usually found in either /var/log/httpd/access_logor /home/user/accesslogs/domainname.com)

MySQL
If running MySQL 'mysqladmin proc' is a helpful command to show you the active MySQL processes at the time, you can also feel free to customize the MySQL configuration if you are comfortable with doing so (/etc/my.cnf) as each of the servers we provide do not include any customization (which ususally isn't necessary unless you are seeing problems specific to the service.

Other Services:
To check whether a specific service is running you can use the ps aux command.
Ex: ps aux | grep httpd will check if the apache service is running. You can restart services using service servicename restart (EX: service httpd restart) so if you find that the server itself is online but the websites are not displaying it may be that the issue is specific to apache(httpd)

**Please note that this information is provided strictly for reference for those whom are comfortable using it. Please contact [email protected] if you need any assistance.

  • linux, administration, basic
  • 2 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

How many domains can I host on my virtual machine?

You can host as many domains as you'd like as this is not limited however, you must make sure...

Getting Started

To first access your VPS, you may most easily connect via the VNC client in the DotBlock control...

How can I change my OS?

This tutorial will show you how to change the operating system on your VPS ***THESE STEPS WILL...

How many IP addresses are provided with my VPS?

One IP address is provided with the establishment of your VPS account. Should you need to add...

What is ACPI?

ACPI stands for Advanced Configuration and Power Interface.  It provides an open standard for...