依赖
zlib,pcre, ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
openssl http://www.openssl.org/source/
./configure --prefix=/usr/local/nginx--with-openssl=/usr/include (启用ssl)--with-pcre=/usr/include/pcre/ (启用正规表达式)--with-http_stub_status_module (安装可以查看nginx状态的程序)--with-http_memcached_module (启用memcache缓存)--with-http_rewrite_module (启用支持url重写)
php
依赖
libiconv, http://ftp.gnu.org/pub/gnu/libiconv/
libmcrypt, http://sourceforge.net/projects/libmcrypt/
libltdl, http://www.gnu.org/s/automake/manual/libtool/Using-libltdl.html
mhash, http://sourceforge.net/projects/mhash/
mcrypt,libxml2,http://xmlsoft.org/downloads.html
zlib,libpng, http://www.libpng.org/pub/png/libpng.html
jpeg6, http://www.ijg.org/
freetype, http://freetype.sourceforge.net/download.html#stable
gd, https://bitbucket.org/pierrejoye/gd-libgd/overview
curl, http://curl.haxx.se/download.htmllibtool-ltdl
#ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config#export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH#LD_LIBRARY_PATH=/usr/local/lib
./configure
./configure --prefix=/usr/local/php --with-mysql --with-mysqli --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-zip --enable-soap --enable-calendar --with-dom
vi Makefile找到下面这行:EXTRA_LIBS = -lcrypt ...在最后添加-liconv保存后make通过;
make install
通过直接yum
163源
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
yum makecache //生成缓存
yum update
搜狐源 http://mirrors.sohu.com/help/CentOS-Base-sohu.repo yum源 /etc/yum.repos.d
上海交通大学:http://ftp.sjtu.edu.cn/centos/
清华大学:http://mirror.lib.tsinghua.edu.cn/centos/
中国科技大学:http://centos.ustc.edu.cn/centos/ (推荐,比较快)
上海电信:http://mirrors.shlug.org/centos/
山东电信:http://mirrors.ta139.com/centos/
福建电信:http://mirror.be10.com/centos/
安装
yum -y install nginx
yum -y install mysql mysql-server mysql-devel
yum -y install php-fpm php-cli php-devel php-mysql php-gd php-imap php-ldap php-xml php-xmlrpc php-mbstring php-mcrypt php-snmp php-soap
配置
vim /etc/php-fpm.conf
vim /etc/php.ini
vim /etc/my.cnf
vim /etc/nginx/nginx.conf
开启服务
service mysql start
service nginx start
service php-fpm start
开机启动
chkconfig mysqld on
chkconfig nginx on
chkconfig php-fpm on
', '
依赖
zlib,pcre, ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
openssl http://www.openssl.org/source/
./configure --prefix=/usr/local/nginx--with-openssl=/usr/include (启用ssl)--with-pcre=/usr/include/pcre/ (启用正规表达式)--with-http_stub_status_module (安装可以查看nginx状态的程序)--with-http_memcached_module (启用memcache缓存)--with-http_rewrite_module (启用支持url重写)
php
依赖
libiconv, http://ftp.gnu.org/pub/gnu/libiconv/
libmcrypt, http://sourceforge.net/projects/libmcrypt/
libltdl, http://www.gnu.org/s/automake/manual/libtool/Using-libltdl.html
mhash, http://sourceforge.net/projects/mhash/
mcrypt,libxml2,http://xmlsoft.org/downloads.html
zlib,libpng, http://www.libpng.org/pub/png/libpng.html
jpeg6, http://www.ijg.org/
freetype, http://freetype.sourceforge.net/download.html#stable
gd, https://bitbucket.org/pierrejoye/gd-libgd/overview
curl, http://curl.haxx.se/download.htmllibtool-ltdl
#ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config#export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH#LD_LIBRARY_PATH=/usr/local/lib
./configure
./configure --prefix=/usr/local/php --with-mysql --with-mysqli --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-zip --enable-soap --enable-calendar --with-dom
vi Makefile找到下面这行:EXTRA_LIBS = -lcrypt ...在最后添加-liconv保存后make通过;
make install
通过直接yum
163源
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
yum makecache //生成缓存
yum update
搜狐源 http://mirrors.sohu.com/help/CentOS-Base-sohu.repo yum源 /etc/yum.repos.d
上海交通大学:http://ftp.sjtu.edu.cn/centos/
清华大学:http://mirror.lib.tsinghua.edu.cn/centos/
中国科技大学:http://centos.ustc.edu.cn/centos/ (推荐,比较快)
上海电信:http://mirrors.shlug.org/centos/
山东电信:http://mirrors.ta139.com/centos/
福建电信:http://mirror.be10.com/centos/
安装
yum -y install nginx
yum -y install mysql mysql-server mysql-devel
yum -y install php-fpm php-cli php-devel php-mysql php-gd php-imap php-ldap php-xml php-xmlrpc php-mbstring php-mcrypt php-snmp php-soap
配置
vim /etc/php-fpm.conf
vim /etc/php.ini
vim /etc/my.cnf
vim /etc/nginx/nginx.conf
开启服务
service mysql start
service nginx start
service php-fpm start
开机启动
chkconfig mysqld on
chkconfig nginx on
chkconfig php-fpm on