Search

Blogroll

Meta:

Rkhunter installation

March 28th, 2010 by vicky

Rkhunter is an intrustion detection program for Linux OS which has been widely used by many server administrators. Sometimes there is a false alarm but most of the time you need to check the problematic areas Rkhunter points out.

NEW: November 30th 2009 – Rkhunter v.1.3.6. is available and this how-to is updated.

Read the rest of this entry »

Posted in Security | No Comments »

Lynis – security and system auditing tool

March 28th, 2010 by vicky

Michael Boelen, the author of RKHUNTER rootkit checker has made another nice auditing tool – Lynis. It works on many Linux/Debian/MacOS/BSD systems and provides you the admin important information about system configuration and security issues.

Update: On 15th December 2009 there was version 1.2.9 released. I updated this how-toa bit late, but better than never :-) .

Read the rest of this entry »

Posted in Security | No Comments »

Install GD without recompiling Apache

March 28th, 2010 by vicky

If you need to enable GD to your php installation and do not want to recompile whole Apache then there is easy solution.

You just execute command  /scripts/installgd  as root on your cPanel server and you are set.

Posted in Cpanel/WHM | No Comments »

Enable PhpMyAdmin import zip files

January 19th, 2010 by admin

To enable phpmyadmin at cpanel server to import zipped mysql dumps you need to reconfigure internal cpanel php installation..

Edit /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
Change: Cpanel::Easy::PHP5::Zip: 0=0
To: Cpanel::Easy::PHP5::Zip: 1
Save the file
Run `/scripts/makecpphp`

before running the last command make sure the file /var/cpanel/easy/apache/profile/makecpphp.profile.yaml is chattr +i.

Posted in Cpanel/WHM | 2 Comments »

My nginx installation procedure

January 14th, 2010 by admin

I really started to like nginx web server, and here is my procedure step by step how to install this server on CentOS 5.4

yum install gcc pcre-devel openssl-devel
wget http://nginx.org/download/nginx-0.7.65.tar.gz && tar xvfz nginx-0.7.65.tar.gz
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module
make
make install
ln -s /usr/local/nginx/conf /etc/nginx
ln -s /usr/local/nginx/logs /var/log/nginx
ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx

Then grab this init script for red hat from http://wiki.nginx.org/RedHatNginxInitScript and put it in /etc/init.d/nginx file. Chmod 755 the file and you are ready.

Posted in General linux admin | No Comments »

Mytop error “long|!”

November 17th, 2009 by vicky

If you run mytop on RHEL server (or CentOS 5.x) you may get error message saying

Error in option spec: “long|!”

You should edit file /usr/bin/mytop and comment out this line

“long|!” => \$config{long_nums},

after that, run mytop and all should work fine.

Enjoy! :-)

Posted in Mysql | No Comments »

Audit still logging even when stoped

November 10th, 2009 by vicky

I had strange problem on one of my CentOS 5.4 servers. I stoped auditd service and disables SElinux, the server, however, was still logging all those annoying things like

Nov 10 18:27:01 server kernel: type=1105 audit(1257874021.909:87975): user pid=27986 uid=0 auid=0 msg=’PAM: session open acct=”root” : exe=”/usr/sbin/crond” (hostname=?, addr=?, terminal=cron res=success)’
Nov 10 18:27:02 server kernel: type=1104 audit(1257874022.828:87976): user pid=27986 uid=0 auid=0 msg=’PAM: setcred acct=”root” : exe=”/usr/sbin/crond” (hostname=?, addr=?, terminal=cron res=success)’

into /var/log/messages log, filling it up with garbage.

After some time spent investigating I  fixed it. I edited /etc/audit/audit.rules  and replaced line

-D

with this line

-e 0

After that I started auditd service, stopped it and no more logs in /var/log/messages

Posted in General linux admin | 1 Comment »

Show line numbers in vi or vim

November 5th, 2009 by vicky

Have you ever wondered how to show line numbers in vi or vim while editing file? I do that always when I patch some software or install MODs that come with “go to line xxx and rewrite this…”. And the solution is really simple.

In vi/vim type :set number to show line numbers and :set nonumber to hide line numbers.

Posted in General linux admin | No Comments »

EnsimX maintenance mode

July 3rd, 2009 by vicky

After OS upgrades and updates it is needed to run EnsimX through maintenance mode. Here is info how to do it:

/usr/local/sbin/set_maintenance
/usr/local/sbin/set_pre_maintenance
/usr/local/sbin/set_post_maintenance
/etc/init.d/epld restart

If you encounter any problems you can exit the maintenance mode by issuing this command:

/usr/local/sbin/exit_post_maintenance

Posted in Ensim | No Comments »

Vhimport failing to restore site backup

April 26th, 2009 by vicky

When you experience error during EnsimX import script like this:

Unknown Error: Traceback (most recent call last):
File “vhbackuplib.py”, line 54, in call_backend_import
File “virtualhosting/virthost.py”, line 4575, in vhimport
File “virtualhosting/virthost.py”, line 4730, in __do_import
File “virtualhosting/virthost.py”, line 5030, in __site_import
File “virtualhosting/virthost.py”, line 3300, in handle_remaining_files
File “virtualhosting/virthost.py”, line 3380, in link
OSError: [Errno 17] File exists

the cause may be in X11 symlink on OS other than FC6. The cure is as follows:

mv /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib/X11{,XTEMP}
vhimport site_backup.tar.gz
mv /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib/XTEMP{,X11}

Basicaly what is does it renames /home/virtual/FILESYSTEMTEMPLATE/siteinfo/usr/lib/X11 and after the restore is successful it renames it back to original name.

Posted in Ensim | No Comments »

« Previous Entries