Centos 系统
安装前:
1. 系统更新
yum install php-bcmath /*高精度数学运算组件,默认没安装,MD5运算时用到*/
yum install php-mhash
yum install php-mbstring
yum check-update (检查更新)
yum update (更新所有更新)
yum clean all (清理安装包
2.因为各个系统配置不一样,根据各自需要安装一些组件。
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 e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
yum -y --noplugins install wget zip
yum -y --noplugins install unzip
yum -y --noplugins install gcc
yum -y --noplugins install make
yum -y --noplugins install pcre-devel
yum -y --noplugins install openssl-devel
yum -y --noplugins install subversion
yum -y install yum-fastestmirror
yum -y update
yum -y install patch make flex bison tar
yum -y install libtool libtool-libs kernel-devel autoconf213
yum -y install libjpeg libjpeg-devel libpng libpng-devel
yum -y install libtiff libtiff-devel gettext gettext-devel
yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel
yum -y install file glib2 glib2-devel bzip2 diff* openldap-devel
yum -y install bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs
yum -y install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel
yum -y install openssl openssl-devel vim-minimal unzip
安装中:
1. 需要安装 缓存,如果升级到php5.4,只能安装xcache。
进入lnmp解压后的目录,执行:./xcache.sh 选择 XCache 3.0.1
http://lnmp.org/faq/Add-ons.html
2.Xcache 3.1.0(最新版)
wget http://vps.idc886.com/xcache.sh;sh xcache.sh
3.安装FTP工具:./pureftpd.sh
MySQL 5.5 且使用了pureftpd的用户需要按如下方法修复,执行如下命令:
wget http://soft.vpser.net/lnmp/ext/fix_pureftpd_mysql55.sh && chmod +x fix_pureftpd_mysql55.sh && ./fix_pureftpd_mysql55.sh
http://lnmp.org/faq/ftpserver.html
安装后:
1. 添加域名 /root/vhost.sh
2. Nginx 重启:/root/lnmp restart
域名配置目录:/usr/local/nginx/conf/
php.ini 和 php-fpm.conf 文件目录:/usr/local/php/etc/
组件升级:
1.Nginx 进入安装目录执行 ./upgrade_nginx.sh
2.PHP 进入安装目录执行 ./upgrade_php.sh