?
Solved

Basic Management and Updating of VPS

Posted on 2011-09-16
5
Medium Priority
?
317 Views
Last Modified: 2012-05-12
I inherited about two years ago a reseller account on a VPS (overseas network admin vanished).

I've been using it, learning as I go, the basics of setting up and managing accounts (I have approximately 12 virtually hosted accounts under it now (ie different domains) with some domains having a few sub-domains under them.  I run mostly Joomla 1.5 and now 1.7 sites on those accounts.

I have full (shell) access on the account.

At present, this VPS is running:

cPanel 11.24.5-R38506 - WHM 11.24.2 - X3.9
CENTOS 5.3 i686 virtuozzo on vps

I'm looking for some help on what basic maintenance and upgrade tasks I should be doing (for example, updating cPanel and WHM versions, updating PHP and MySQL versions, cleaning caches, shutting down and restarting services to 'freshen' things up, etc..  Also would like some hints as to which logs are typically monitored, why and how.

I realize this is a broad question but there must be some basic approaches to this.

0
Comment
Question by:qeng
  • 2
  • 2
5 Comments
 
LVL 9

Assisted Solution

by:crazedsanity
crazedsanity earned 800 total points
ID: 36550755
This really is about basic administration of a server, isn't it?  For all intents and purposes, it doesn't really matter whether this is a virtual or physical machine: physical access is unavailable, so any sort up OS upgrade that requires console access may be unavailable.

CentOS 5.3 appears to be pretty old and unsupported, upgrading to 5.7 or 6.0 would be a far better option than trying to upgrade individual packages.  For that, I would suggest getting another server setup that has the new OS and scheduling migration to it; moving a PHP app from an old version to a newer version can be painful if not nearly impossible, so upgrading on the production server could easily lead to a nervous breakdown or other sorts of breaks from reality.

As a note: I have found that Debian-based servers (e.g. Debian 6, Ubuntu Server 10.04) are much easier to administer.  Updates, application installs, and pretty other things all can be performed on the command line using apt (e.g. "apt-get install <package>", "apt-get upgrade").
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 36550829
Good things to know in regard to system administration: http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
0
 

Author Comment

by:qeng
ID: 36550983
Thx for following me into this post.

 I'll start my digging and be back here for some guidance.
0
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 36552430
Regarding your questions,

I would recommend you to hire a cPanel Expert to do the basic maintenance on your system.

OR

You can perform the following steps. (Please note that I am just trying to give you an idea)

To update cPanel / WHM you can use the following script.

/scripts/upcp --force

To update PHP/Apache

/scripts/easyapache  (Please note that there are a variety of options available while upgrading php / apache. If you are not sure, please dont run the script as it will break all your websites. Please consult an expert before performing this steps)

Upgrade MySQL:

Its really not necessary to upgrade mysql each time because it may affect your existing databases. But f you require any particular version you can upgrade using WebHost Manager (WHM) via the following menu path:

WHM: Main >> Software >> MySQL Upgrade

Make sure to backup your database before performing mysql upgrade.

To shutdown/restart services you may use the following scripts or commands.

Apache: service httpd restart or /scripts/restartsrv_httpd
Exim mail server: service exim restart or /scripts/restartsrv_exim
MySQL: service mysql restart or /scripts/restartsrv_mysql

More services that can be restarted are located at /scripts/restartsrv_

Regarding the logs:

Apache logs can be monitored using the following command:

"tail -f /usr/local/apache/logs/error_log"

For old logs use "tail  -1000 /usr/local/apache/logs/error_log "

Exim Mail server log: "tail -f /var/log/exim_mainlog"

To check messages for a particular domain use " grep domainname /var/log/exim_mainlog"

FTP Logs: "tail -f /var/log/messages"

MySQL log: "tail -f /var/lib/mysql/hostname.err"

Hope above information is helpful.

Cheers !!!
0
 
LVL 13

Accepted Solution

by:
LinuxGuru earned 1200 total points
ID: 36552436
Also if there is a hack attempt, you should check the apache domlogs at the following location.

/usr/local/apache/domlogs/domainname
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Shawn
IT teams define success as solving problems quickly. To enable ITSM modernization we have to think of adopting the tools and methods that will enable resolution of ITSM issues more quickly.
While Plesk offers many potential benefits to website administrators, including compatibility with Windows Server and other leading technologies, the company has also been working to differentiate it from other control panels for content management…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 11 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question