Friday, December 4, 2009
A little gift - James
Click below to collect your gift:
http://uk.skoost.com/fun?jamesmukalel%2Enelgia%40blogger%2Ecom/24330176/12
P.S. This is a safe and innocent gift that James Thomas sent from Skoost.
This e-mail was sent to jamesmukalel.nelgia@blogger.com on 4.12.2009 03:24:58
on behalf of James Thomas (jamesmukalel@gmail.com)
Friday, July 31, 2009
Upgrading Mysql on a plesk server
Uprading MySQL with plesk is not that hard as it sounds and this guide will prove it to you. Below are the steps you need to execute to upgrade your current MySQL version to the latest release. In this guide, we will going to use MySQL version 4.1 but other versions will work as well.
Backup the following files and directory before doing any of the steps below.
/var/lib/mysql - directory where mysql data is stored.
/etc/my.cnf - default mysql configuration file.
/etc/init.d/mysqld - mysql initialization script.
1. Download the pre-compiled MySQL server binaries.
2. Move and decompress the download file.
mv mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23.tar.gz /usr/local/
cd /usr/local
tar -vxzf mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23.tar.gz
3. Create a symbolic link of the decompressed files folder to MySQL folder.
ln -s /usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686-icc-glibc23 mysql
4. Edit the mysqld rc file under /etc/init.d
vi /etc/init.d/mysqld
change the mysql server path from /usr/bin to /usr/local/mysql/bin (e.g /usr/local/mysql/bin/safe_mysqld)
5. Add the following lines to the my.cnf file.
[mysqladmin]
socket=/var/lib/mysql/mysql.sock
[mysql]
socket=/var/lib/mysql/mysql.sock [mysql_fix_privilege_tables]
socket=/var/lib/mysql/mysql.sock
6. Stop and Start MySQL server process.
service stop mysqld
service start mysqld
7. Verify that you are able to connect to the mysql server.
mysql -u admin -p your_plesk_admin_password
mysql> select version();
+—————–+
version()
+—————–+
4.1.22-standard
+—————–+
1 row in set (0.00 sec)
That's all about it, if you encounter any errors just drop a message via the comment box.
Friday, July 24, 2009
SCRIPT TO MONITOR A SERVER IN EVERY 30 MINUTES
This script is used to check the health of Your servers.
# !/bin/bash# add ip / hostname separated by while space HOSTS="aaa.com bbb.com 202.10.193.46 router" # no ping requestCOUNT=1 # email report when SUBJECT="Ping failed Server Seems to be DOWN" EMAILID="Your emailid"for myHost in $HOSTS
docount=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
if [ $count -eq 0 ]; then
# 100% failed echo "Host : $myHost is down (ping failed) at $(date)" | mail -s "$SUBJECT" $EMAILID
Apache Error - No space left on device: Couldn't create accept lock or Cannot create SSLMutex
How to Find Server is Under DDOS
netstat -anp | grep "tcp\|udp" | awk {'print $5'} | cut -d: -f1 | uniq -c | sort -n
So what will be the output ?
1 0.0.0.0
1 208.80.152.2
1 208.80.152.2
1 208.80.152.3
1 209.85.135.103
1 209.85.135.113
1 74.125.43.113
2 208.80.152.2
2 208.80.152.3
2 208.80.152.3
3 0.0.0.0
3 208.80.152.2
How to edit the maxconnection in httpd.conf ?
vi /usr/local/apache/conf/httpd.conf
search for the line MaxClients and edit that, save it and exit vi editor. Restart apache then.
Saturday, June 20, 2009
Fixing incorrect quota on cpanel
For fixing everuthing including mail boxes and DNS,
#/scripts/fixeverything
If it is showing any error about permission of writing on aquota.user file check its permissions and attributes.
#lsattr aquota.user
To remove attribute
#chattr -i aquota.user
---------------------------------------------------------------------------------
Please check for any spelling mistakes on my commands
-----------------------------------------------------------------------------------