iBualoy

Server Management for newbie on Debian

Server Management

For a geek guys like many friends of mine, they can operate all the task via SSH. I'm also like to do many things on SSH, but as my knowledge is limited, I still need help from GUI tools to manage some other tasks. Event the task is just simple text editing, but to edit it via Web-based text editor till much easier than edit it directly from SSH.

Server Management Tools for newbie

This article has been moved from How to install LAMP on Debian 5.0 Lenny. My situation is I have to manage Debian webserver mainly for multiple Joomla! and wordpress applications. The server is private environment, did not have many end customer have to log in via ftp. None of them have to access SSH. So I did not use any Web-based Control Panel like Cpanel, DirectAdmin, or Plesk. I just use just simple tools like webmin, phpmyadmin, and few more tools.

Webmin, my best friend

I was using webmin from the beginning. Honestly, I didn't like to old-fashion interface at all, I tried to find the alternative choices, but until now I cannot find any other choice that can provide most of neccessary functionality. I use webmin for all linux tasks, from user management, apache configuration, BIND9 DNS server, DHCP, MySQL server, CRON Job, Samba, etc. If I do not edit the data in database, I prefer webmin to manage all database tasks, create database, user, manage permission, etc. Actually most of the time I just simply open the conf files for each services to edit via webmin.

Installation using webmin APT repository

If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system and add the lines :

deb http://download.webmin.com/download/repository sarge contrib

You should also fetch and install my GPG key with which the repository is signed, with the commands :

wget http://www.webmin.com/jcameron-key.asc

You will now be able to install with the commands :

apt-get update
apt-get install webmin

All dependencies should be resolved automatically.

Thanks to: http://www.webmin.com/deb.html

phpMyAdmin

Even I rarely use it by myself, it is still a survival tool to access the database when you have to work on it in the limited environment.

aptitude install phpmyadmin

MySQL WorkBench

MySQL WorkBench is not a server service. It's a very useful tool on client PC that we are using to manage the Database on remote server. It's a next generation of MySQL Administrator and MySQL Query Browser developped by MySQL team themselves.

Download: http://wb.mysql.com/

Useful Command line

There are few useful command line to manage your web server.

Optimize MySQL Database

This is all-in-one command to check, optimize, and repair all databases in your server.

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

Server Monitoring tools for newbie

CPU and RAM Monitoring

The most common command line to monitor your CPU and RAM utilization is top. It will show you the list of processes, how many CPU and RAM consumption for each process.

top

The alternative command is htop, which very similar to top, but it can scroll over the data table.

htop

htop

Network and Bandwidth Monitoring

I was curious what is the real server bottle neck, so I tried to find the way to monitor the bandwidth and found one simple solution.

bmon

bmon able show you graphical bandwidth of all of your network cards, but you need to increase the vertical size of your terminal (default size is 80x24). If you increase your terminal size to something like 80x40 then you can show the bandwidth graph.

If you want to see network session in graphical, the other useful tool is iftop.

iftop

Text mode Web Browser

Sometimes you need to get simple output from http protocol on your command line, such as retreive server-status of Apache or Nginx, which in some case, it allows only connection from localhost. The simple way to do is text mode web browser.

lynx http://localhost/server-status

Tools Pack Installation

sudo aptitude install htop bmon iftop lynx

Apache Monitoring

There is another text-based UI to monitor the apache activity by analyze the access log file.

#installation
sudo aptitude install apachetop
#use
sudo apachetop

Note: apachetop is a little bit tricky. I don't know why on debian environment, it need sudo priviledge.

Bookmark Email this Feed Hits (1900)
21 July 2011

Web Hosting control panels

Thanks for sharing useful tip.
For VPS or Dedicated server owners who need DirectAdmin, cPanel or any other web hosting control panel, please check LicenseCube
Reply Report JC IP173.245.51.137
busy
You are here: Blog iTech Linux Server Management for newbie on Debian