背景:
阅读新闻
CentOS5安装Nginx1.4+PHP5.5 FastCGI
[日期:2013-11-29] 来源:Linux社区 作者:staricqxyz [字体:]
CentOS5安装Nginx1.4+PHP5.5 FastCGI
yum -y install gcc gcc-c++ autoconf 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 ssse2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gettext-devel libXpm-devel libtool libevent libevent-devel gd-devel gd libmcrypt libmcrypt-devel pcre pcre-devel
yum -y install gcc gcc-c++ autoconf 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 ssse2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers gettext-devel libXpm-devel libtool libevent libevent-devel gd-devel gd libmcrypt libmcrypt-devel pcre pcre-devel[plain] view plaincopyprint?
[root@lnmp software]# tar zxvf libiconv-1.14.tar.gz
[root@lnmp software]# cd libiconv-1.14
[root@lnmp libiconv-1.14]# ./configure --prefix=/service/libiconv
[root@lnmp libiconv-1.14]# make && make install
[root@lnmp software]# tar zxvf libiconv-1.14.tar.gz
[root@lnmp software]# cd libiconv-1.14
[root@lnmp libiconv-1.14]# ./configure --prefix=/service/libiconv
[root@lnmp libiconv-1.14]# make && make install
[plain] view plaincopyprint?
[root@lnmp software]# tar zxvf GD-2.50.tar.gz
[root@lnmp software]# cd GD-2.50
[root@lnmp GD-2.50]# perl Makefile.PL
[root@lnmp GD-2.50]# make && make install
[root@lnmp software]# tar zxvf GD-2.50.tar.gz
[root@lnmp software]# cd GD-2.50
[root@lnmp GD-2.50]# perl Makefile.PL
[root@lnmp GD-2.50]# make && make install
安装MySQL
[plain] view plaincopyprint?
[root@lnmp software]# tar zxvf mysql-5.5.34.tar.gz
[root@lnmp software]# cd mysql-5.5.34
[root@lnmp mysql-5.5.34]# groupadd mysql
[root@lnmp mysql-5.5.34]# useradd -g mysql -s /sbin/nologin mysql
[root@lnmp mysql-5.5.34]# cmake . -DCMAKE_INSTALL_PREFIX=/service/mysql -DMYSQL_DATADIR=/data/mysql -DSYSCONFDIR=/service/mysql -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_EXAMPLE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=30307 -DCOMPILATION_COMMENT=ZWC -DWITH_DEBUG=0
[root@lnmp mysql-5.5.34]# make && make install
[root@lnmp mysql-5.5.34]# cp support-files/my-large.cnf /service/mysql/my.cnf
[root@lnmp mysql-5.5.34]# chown -R mysql:mysql /data/mysql /service/mysql
[root@lnmp mysql-5.5.34]# /service/mysql/bin/mysqld_safe --defaults-file=/service/mysql/my.cnf --basedir=/service/mysql --datadir=/data/mysql --user=mysql &
[root@lnmp software]# tar zxvf mysql-5.5.34.tar.gz
[root@lnmp software]# cd mysql-5.5.34
[root@lnmp mysql-5.5.34]# groupadd mysql
[root@lnmp mysql-5.5.34]# useradd -g mysql -s /sbin/nologin mysql
[root@lnmp mysql-5.5.34]# cmake . -DCMAKE_INSTALL_PREFIX=/service/mysql -DMYSQL_DATADIR=/data/mysql -DSYSCONFDIR=/service/mysql -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_EXAMPLE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=30307 -DCOMPILATION_COMMENT=ZWC -DWITH_DEBUG=0
[root@lnmp mysql-5.5.34]# make && make install
[root@lnmp mysql-5.5.34]# cp support-files/my-large.cnf /service/mysql/my.cnf
[root@lnmp mysql-5.5.34]# chown -R mysql:mysql /data/mysql /service/mysql
[root@lnmp mysql-5.5.34]# /service/mysql/bin/mysqld_safe --defaults-file=/service/mysql/my.cnf --basedir=/service/mysql --datadir=/data/mysql --user=mysql &
安装PHP,PHP5.5中自带了mysqlnd,MySQL不是必须安装的