Topics

Monthly Archives: February 2012

install memcached 1.4.13 on CentOS 6.2

- Make sure to check PHP-FPM and MYSQL posts.

– One of the dependencies of memcache is libevent, get latest version from libevent.org

mkdir libevent
cd libevent
wget https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
tar xfz libevent-2.0.17-stable.tar.gz
cd libevent-2.0.17-stable

– get latest version from memcached.org

Install PHP 5.3.10 with PHP-FPM on CentOS 6.2 64-bit

- Make sure to check Nginx, memcached and MYSQL posts.

– remove old version

#find installed packages
rpm -qa | grep php
#remove php packages
yum remove php php-devel php-cli php-pear php-common php-pdophp-xml php-gd

– download package from PHP.net

mkdir php
cd php
wget http://www.php.net/get/php-5.3.10.tar.bz2/from/us.php.net/mirror
tar jxf php-5.3.10.tar.bz2
cd php-5.3.10

#install PHP
./configure  \
	--with-zlib --with-curl --with-curlwrappers --enable-ftp --with-mysql --with-jpeg-dir --with-png-dir --with-gd --enable-gd-native-ttf --with-freetype-dir \
	--enable-zip --with-openssl --with-bz2 --enable-mbstring  \
	--enable-inline-optimization --disable-debug \
	--with-config-file-path=/etc \
	--enable-fpm --with-fpm-user=www --with-fpm-group=www --with-libdir=lib64;
make all install;

#add php-fpm service
cp  sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chmod 666 /usr/local/var/run

– Configure php-fpm

Install curl 7.24 on CentOS 6.2

- Make sure to check PHP-FPM post.

– install from source

yum remove curl curl-devel

wget http://curl.haxx.se/download/curl-7.24.0.tar.bz2
tar xfj curl-7.24.0.tar.bz2
cd curl-7.24.0
./configure --prefix=/usr
make
make install
#check version
curl -V

– To install with support

./configure --with-curl=/usr --with-curlwrappers

Install MySQL 5.5.27 64-bit RPM on CentOS 6.2 x86_64

Check Installing CentOS 6.2 on VMware, Install PHP 5.3.10 with PHP-FPM on CentOS 6.2 64-bit, Install Nginx 1.0.12 for PHP-FPM on CentOS 6.2 and install memcached 1.4.13 on CentOS 6.2 posts.

– Remove old version

yum remove mysql mysql-devel mysql-server mysql-libs

– Download the needed packages from http://dev.mysql.com/downloads/mysql/#downloads
Download URL varies depending on download mirror

mkdir mysql
cd mysql
#MySQL-client-5.5.27-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-client-5.5.27-1.el6.x86_64.rpm
#MySQL-shared-5.5.27-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-shared-5.5.27-1.el6.x86_64.rpm
#MySQL-devel-5.5.27-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-devel-5.5.27-1.el6.x86_64.rpm
#MySQL-server-5.5.27-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-server-5.5.27-1.el6.x86_64.rpm
#MySQL-shared-compat-5.5.27-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.5/MySQL-shared-compat-5.5.27-1.el6.x86_64.rpm

#install
rpm -Uvh *
#create log dir
mkdir /var/log/mysql
chmod 777 /var/log/mysql

#start MySQL
/etc/init.d/mysql start
#add root password
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h centos6.vmware.local password 'new-password'

– configure mysql more info

vi /etc/my.cnf

Configuring vsFTPd on CentOS with different port

Check Installing CentOS 6.2 on VMware post.

– make sure SELINUX is disabled and iptables is configured for FTP

– add ftp user

adduser ftpuser -g ftp -s /sbin/nologin -d /server
#set password
passwd ftpuser

– configuration, more info