Disclaimer: Some of the articles in this article refer to some articles on the web, and all the code in the article is tested on the CentOS 6.2 X84 64-bit system.
First, download the package
wget http://mozbuildtools.googlecode.com/files/libiconv-1.13.1.tar.gz wget http://acelnmp.googlecode.com/files/ mhash-0.9.9.9.tar.gz wget http://mysql.ntu.edu.tw/Downloads/MySQL-5.5/mysql-5.5.25a.tar.gz wget http://sysoev.ru/ nginx/nginx-0.8.46.tar.gz wget http://www.php.net/get/php-5.2.14.tar.gz/from/this/mirror wget http://php-fpm.org/ downloads/php-5.2.14-fpm-0.5.14.diff.gz wget http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz? modtime=1171868460&big_mirror=0 wget http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.8.tar.gz?modtime= 1194463373&big_mirror=0 wget http://pecl.php.net/get/memcache-2.2.5.tgz wget ftp://ftp.csx.cam.ac.uk/pub/ software/programming/pcre/pcre-8.10.tar.gz wget HTTP://BART.EACCELERATOR.NET/SOURCE/0.9.6.1/ eaccelerator-0.9.6.1.tar.bz2 wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz wget http://blog.s135.com/soft/linux /nginx_php/imagick/imagemagick.tar.gz wget http://pecl.php.net/get/imagick-2.3.0.tgz wget http://www.cmake.org/ Files/v2.8/cmake-2.8.4.tar.gz
Second, install the dependency software package
1yum-y Install dialog NTP vim-enhanced vixie-cron gcc gcc-c++ gcc-g77 Flex Bison autoconf automake glibc glibc-devel 2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel libtool* zlib-devel libxml2-devel libjpeg-devel libpng-devel libtif F-devel fontconfig-devel freetype-devel libxpm-devel gettext-devel Curl curl-devel pam-devel e2fsprogs-devel krb5-devel Libidn libidn-devel OpenSSL openssl-devel openldap openldap-devel net-snmp net-snmp-devel nss_ldap openldap-clients Openldap-servers libtidy libtidy-devel wget libc-client libc-client-devel pcre pcre-devel
Third, the installation of MySQL
1. Installation CMake
Tar zxvf cmake-2.8.4.tar.gz
cd $src _dir/cmake-2.8.4
./configure && make && make install
2, install MySQL 5.5
Tar zxvf mysql-5.5.25a.tar.gz
cd mysql-5.5.25a
cmake.-dcmake_install_prefix=/usr/local/mysql-dmysql_ Datadir=/usr/local/mysql/data-dsysconfdir=/etc-dwith_innobase_storage_engine=1-dwith_archive_storage_engine=1- Dwith_blackhole_storage_engine=1-dwith_federated_storage_engine=1-dwith_partition_storage_engine=1-dmysql_tcp_ Port=3306-denabled_local_infile=1-dwith_ssl=yes -dextra_charsets=all-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dwith_readline=on
gmake && make install
3, the creation of MySQL database storage directory
Mkdir-p/usr/local/mysql/data
mkdir-p/usr/local/mysql/binlog/
mkdir-p
/usr/local/mysql/relaylog/ Chown-r Mysql:mysql/usr/local/mysql
5. Create MySQL configuration file and startup script
/BIN/CP support-files/my-small.cnf/etc/my.cnf
/BIN/CP support-files/mysql.server/etc/rc.d/init.d/mysqld
6, the MySQL user account to establish the identity of the data table:
/usr/local/mysql/scripts/mysql_install_db--basedir=/usr/local/mysql/--datadir=/usr/local/mysql/data/--user= MySQL--DEFAULTS-FILE=/ETC/MY.CNF