Archive for December, 2006

Ensim Awstats 6.6

Here are the notes and instructions for installing or upgrading Ensim Awstats to ver 6.6.
(updated 1.21.2007 to correct for the merger of EV1SERVERS and THE PLANET)

[B]READ THE NOTES PRIOR TO INSTALLATION![/B]
*******************************************
Note 1: You need to have root access and SSH capabilities

Note 2: If you have a virtDomain.sh and a virtDomain.tar, then you will need to merge the two together in order for this to work. You should know how to do this if you already have customizations installed. Prior versions of my Ensimized version of Awstats can follow the instructions as if it’s a new install. Just say yes for overwriting the files during the copying of files phase.

Note 3: I have coded and tested this on a Ensim X / CentOS 4.4 machine. This code use to work with Ensim 3.5 (Redhat 7.3) prior to the Fedora and CentOS release. Can’t imagine it not working for any of the Ensim builds.

Note 4: Original idea, scripts etc belong to forum board member “ho247″. I have been updating this and the scripts since 5.6. Special thanks goes to him.

Note 5: Usual disclaimers, warranties etc. apply. No guarantees. This is a “as-is” product.

Note 6: Updated these directions on Dec 27, 2006. The correct date and time stamp on the .gz file is Dec 28 08:45

Note 7: Special bonus! Included is a daily cron script to clean out the mail.quarantine folder on each and every virtual domain. It will dump all quarantined files older than 7 days.

Note 8: Upgrading to this version does not destroy your previous data. In fact, folks who have been using hand installed copies of Awstats have been able to convert over their data to this version.

Note 9: Extremely stressed out servers ( i.e. ones with tons of domains on them, or modestly populated ones that are extrememly busy) have reported excessive cpu usage during its initial run via cron. It can actually bring those servers to its knees. Not a surprise, considering their machines are already “stressed” so this will put another load onto your daily cron jobs. Remember that it is accessing your apache logs, so if they are big…guess what. It will take some time, and need processor muscle to complete it’s task. Once the initial data collection by awstats is finished, it drops down a bit. Stressed servers should consider adding this add-on, in the beginning of the month, and in the early morning when the logs are still small in size. You have been warned.

cd /root
rm -fr awstats-install
wget http://www.customensimbackup.com/download/ensim-awstats-6.6.tar.gz
tar -zxvf ./ensim-awstats-6.6.tar.gz
cd /etc/appliance/customization

Check to see if you have a virtDomain.sh or a virtDomain.tar ie. ls or ls -la
(if you do…proceed to note 2.)

rm -f /etc/appliance/customization/awstats.sh
cp /root/awstats-install/virtDomain.sh /etc/appliance/customization
cp /root/awstats-install/virtDomain.tar /etc/appliance/customization

Usage: /root/awstats-install/awstats-install [--server-install][--domain-install ]
Pick one and then afterwards check and see if it works. The example below is for a server wide install.

/root/awstats-install/awstats-install --server-install
run-parts /etc/cron.daily

/awstats is where awstats is located for each domain.
/awstats/docs is where awstats docs are located for each domain.
get a cup of coffee….DONE!

Side note: If you want to password protect the awstats directory, here is one possible solution out of many that actually works.

[B]I highly recommend that you password protect your stats[/B]

See: http://forums.theplanet.com/index.php?showtopic=53427 and don’t forget to thank forum board member “cweb” for his hard work.

2 Comments »

Adding rpms to virtual sites

Although Ensim provides for a means of adding rpms to virtual sites when being created, maintaining them after the virtual domain has been created is quite the pain. Every update is almost guaranteed to overwrite those mods. These 3 small little scripts will make your life a whole lot easier.

addpkg (usage: addpkg domain package)
lspkg (usage: lspkg domain)
rmpkg (usage: rmpkg domain package)

As root login via SSH:

wget http://customensimbackup.com/download/ensimpkg.tar.gz
tar -zxvf ensimpkg.tar.gz
./install.sh

Great work Rene. Thanks.

18 Comments »

Ensim friendly phpMyAdmin upgrade 2.10.3

This one is easy to do, and is 100% Ensim compatible. (ver. 2.10.3)

SSH into the server as root,

cd /root
rm -f upgrade_phpMyAdmin
wget http://www.customensimbackup.com/download/upgrade_phpMyAdmin
chmod 700 upgrade_phpMyAdmin
./upgrade_phpMyAdmin

Enjoy!

17 Comments »

Keeping your server time accurate

Just about almost every activity on a server has some sort of relationship to time. Either through it’s execution, naming convention, or if for no other purpose but logging. [url]http://pool.ntp.org[/url] was created to assist servers in keeping accurate time.

The [url]http://pool.ntp.org[/url] project is a big virtual cluster of timeservers striving to provide reliable easy to use NTP service for millions of clients without putting a strain on the big popular timeservers.

If you wish to keep your server time accurate:
SSH into the server as root,

wget http://www.customensimbackup.com/download/fix_ntp
chmod +x fix_ntp
chown root:root fix_ntp
./fix_ntp

If you wish to participate and contribute back to the linux community:
Join the pool.ntp.org and then SSH into the server as root,

wget http://www.customensimbackup.com/download/fix_ntp
chmod +x fix_ntp
chown root:root fix_ntp
./fix_ntp --ntp-server

Wait about 20 minutes, and then add your server IP to your account.
The bandwidth usage is small, and this is one of the very simplest ways to contribute to a free open source community with absolutely little or no effort on your part.

No Comments »