
1、需要提前安装msyql(yum,二进制,自己编译都行)
2、需要自己编写windows的hosts文件,绑定域名和ip
3、nginx使用yum安装
4、php使用5.6源码编译安装
5、centos7.4 需要配置好EPEL源
编译安装php5.6 步骤:
1、安装各种基础库,包
yum -y install gcc gcc-c++ libxml2 libxml2-devel openssl-devel
yum install autoconf automake libtool re2c bison -y
yum install zlib-devel libxml2-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libmcrypt-devel mhash mcrypt -y
yum install -y nginx
2、编译安装libiconv
wget
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure -prefix=/usr/local/libiconv
make
如果报错,error: ‘gets’ undeclared here (not in a function)
则修改 libiconv-1.14/srclib/stdio.in.h中的如下
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
为:
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
make install
3、编译安装php5.6
wget php.net/get/php-5.6.33.tar.gz/from/this/mirror
tar -zxvf php-5.6.33.tar.gz
cd php-5.6.33
./configure \
--prefix=/usr/local/php \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \

--with-png-dir \
--with-zlib \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-ftp \
--enable-mbstring \
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-72532-1.html
靠电商股市房地产连养活人口