PHP 5.3.2 APC Centos Conundrum

So the PHP 5.3.2 is not in the default repository for Centos.

So we need to use the webtatic repository to install php 5.3.2 using the guide from here ->

http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/

Fortunately, if you wanted to also run the APC module, this has already been compiled for us, we just need to enable it in the php.ini file like this ->

extension = apc.so
apc.enabled=1
apc.shm_size=30

Restart apache

/etc/init.d/httpd restart

and then check in phpinfo() that the module has been installed.

Setup VSFTPD

http://ubuntuforums.org/showthread.php?t=662784

CHROOT local users to their own directory

Once VSFTPD is installed, edit the

/etc/vsftpd/vsftpd.conf file and add the following line if it does not exist

chroot_local_user=YES

This will lock the FTP user into their home dir and they won’t be able to jump out.

Referenced from-

http://centoshacker.com/kabir/remove-access/creating-a-chroot-jail-enabled-ftp-service.html

Users, Files and permissions

http://www.debianadmin.com/users-and-groups-administration-in-linux.html

Need to free up some memory? Disable INNODB

Pop this into your my.cnf file

skip-innodb

This will disable this database engine, hence saving you a LOT of memory resources.

mysql memory instances reduced from 30mb to 10mb of memory allocation. This is _VERY_ significant, especially when running on a limited resource VPS.

Install ntop on Red Hat Enterprise Linux / CentOS Linux

Install ntop on Red Hat Enterprise Linux / CentOS Linux.

DenyHosts

Deny hosts is a tiny program that will add ip addresses to the /etc/hosts.deny file when automated scripts try and brute force attack the sshd port.

The main vulnerability is the ROOT account which, should never be used to log into SSHD.

Set up a new user, add a strong password and then SSH into the server, su – will then allow you root priviledges.

To setup denyhosts

yum install denyhosts

then edit the config file

nano /etc/denyhosts/denyhosts.cfg

then start the daemon

/etc/init.d/denyhosts start

MailScanner woes

Be careful if you install MailScanner on your system.

If you have RPMFORGE repositories activated for YUM, MailScanner will break YUM due to some of the PERL dependencies.

You will cease being able to perform system updates, which is a bit of a problem.

The fix?

Disable RPM repositories, which will return YUM to its normal status.

nano /etc/yum.repos.d/rpmforge.repo

change enabled=1 to enabled=0

perform yum update and relax

Install GD library php 5.3.2

Because 5.3.2 is not in yum repository, you have to install gd library like this

yum –enablerepo=webtatic install php-gd

PHP-Suhosin

A great article for installing PHP-Suhosin on Centos.

http://www.sklav.com/node/15