Archive for 'CentOS/RHEL'

Turn On and Update Plesk Stat

Stat in one of servers is turn off and doesn’t updating for two days.
Check ‘root’ user crontab
crontab -l
output : 7 4 * * * /usr/local/psa/admin/sbin/statistics >/dev/null 2>&1
Check cron logs for records about the statistic utility executions
vi /var/log/cron
Check apache logs size. Make sure no bigger than 2GB.
Check database directories (mysql : /var/lib/mysql) have read/write permissions to [...]

4 things about Squid Swap Directories

A few things you need to know about Squid Swap Directories
1. Do not erase or delete using linux delete command. It can cause Swap Directories DIRTY.
2. You do not need to erase or delete Squid Swap Directories if you have no_cache deny (an instruction in squid for no-cache proxy) in squid.conf. Squid need that Swap [...]

VI command (essential)

I think this commands essential, because with this (only eight) commands you can create and edit various files with VI
i Insert new text, before the cursor.
escape/ESC
Once you’ve entered input mode using the one of the a, i, O or o commands, use escape or ESC to quit [...]

High Anonymous Proxy (squid 2.5)

UPDATED
I manage squid 2.5 to become high anonymous proxy.
# cd /usr/local/etc/squid
# vi squid.conf
Change this in #Miscellanous
forwarded_for off
[client ip won't recognize]
Add this to #Miscellanous
header_access Allow allow all
header_access Authorization allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_acccess Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow [...]

Failed to stop mysqld services

Running services mysqld stop or /etc/rc.d/init.d/mysqld stop [failed]
First, do this : # ps -ef | grep mysqld
If showing up :
# /usr/libexec/mysqld –defaults-f lib/mysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-locking
Look in to /var/run/mysqld to find mysqld.pid
# cd /var/run/mysqld
# ll
If there’s no mysqld.pid inside /var/run/mysqld directory, create mysqld.pid
# touch mysqld.pid
Assign chown to a mysqld.pid file
# chown -R mysql:mysql mysqld.pid
Why do [...]

Another Way to shutdown FTP

Related to FTP ‘connection timed out’ and ‘a command to shutdown proftpd’, (other) easy way to Shut Down FTP is by using a firewall, close ftp ports!.

FTP ‘connection timed out’

Ftp suddenly goes off and got ‘connection timed out’ before even connected
To determine what’s wrong with FTP :

take a look /var/log/messages file for detailed error reports.
the server hostname may not be resolved. In this case you should put the record like “SERVER_IP SERVER_HOSTNAME” into /etc/hosts.
Make sure that inetd/xinetd is running.If inetd/xinetd is not [...]

Important! Backup Part 1 : in Virtuozzo

Backup is an important thing to do before updating or upgrading Plesk (also important if we’re going to update or upgrade CentOS/RHEL). We can restore system to a previous state, if something goes wrong.
There are many ways to do backups. Here is a series of Backups :
I’m starting with Virtuozzo. Virtuozzo backups all system, files [...]