Previous Web servers were built by Yum, and it was inconvenient to add new modules or update certain software (far-reaching!). )。 So, now ready to change the environment to the source code compiled installation, so easy to adjust, performance will be better than the Yum way much better. Here is my installation step, and my system is CentOS 6.3 64 bits.
Note: This article is configured to be based on the software version downloaded in the second step, the installation of other versions does not guarantee success
One: Install the dependency pack
123456 yum install cmake make gcc gcc-c++ libjpeg libjpeg-devel libpng \
Libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc \
Glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl \
Curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel OpenSSL expat expat-devel \
Openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers \
Libxslt-devel libevent-devel Libtool-ltdl Bison libtool pcre-devel zip unzip gmp-devel gd Gd-devel
Second: Download the software required by LNMP
1234567891011121314151617 wget http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.19.tar.gz
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
wget http://iweb.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
wget http://iweb.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
wget http://vps.googlecode.com/files/mcrypt-2.6.8.tar.gz
wget http://download-euro.oldapps.com/PHP/php-5.3.18.tar.bz2
wget HTTP://SUPERB-DCA2.DL.SOURCEFORGE.NET/PROJECT/EACCELERATOR/EACCELERATOR/EACCELERATOR%200.9.6.1/ eaccelerator-0.9.6.1.tar.bz2
wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
wget http://pecl.php.net/get/memcache-2.2.7.tgz
wget http://www.imagemagick.org/download/legacy/ImageMagick-6.8.3-10.tar.gz
wget http://pecl.php.net/get/imagick-3.0.1.tgz
wget http://pecl.php.net/get/pecl_http-1.7.5.tgz
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz
wget http://nginx.org/download/nginx-1.2.9.tar.gz
wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download
wget http://pecl.php.net/get/igbinary-1.1.1.tgz
wget Https://github.com/nicolasff/phpredis/archive/master.zip
Third: Install MySQL
12345678910111213141516 Tar zxf mysql-5.5.19.tar.gz
CD mysql-5.5.19
Groupadd MySQL
Useradd-g mysql-s/sbin/nologin-m MySQL
CMake \
-dcmake_install_prefix=/usr/local/mysql \
-dsysconfdir=/etc/mysql \
-dmysql_unix_addr=/usr/local/mysql/tmp/mysql.sock \
-dwith_readline=1 \
-dwith_embedded_server=1 \
-dmysql_datadir=/usr/local/mysql/data \
-dmysql_user=mysql \
-dmysql_tcp_port=3306
Make && make install
Chown-r Mysql.mysql/usr/local/mysql
Cd..
Because there is a dedicated MySQL server, so MySQL installation to this end. There are other configurations to do if you want to run MySQL locally. such as my.cnf configuration files, MySQL startup scripts, and so on.