php7.0.5的装置办法:起首下载“php-7.0.5.tar.gz”;而后经过饬令“yum install epel-release”更新扩大包;接着执行编译饬令;最初修正设置装备摆设文件便可。
保举:《PHP视频教程》
PHP7.0正式版也进去了,明天编译装置了一下,写下装置步骤,我是正在centos6.6 环境中编译的,以下:
- 下载地点http://cn2.php.net/distributions/php-7.0.5.tar.gz
- 装置编译所需的包,如碰见局部包找没有到 请先执行
yum install epel-release //扩大包更新包 yum update //更新yum源
而后正在执行以下饬令
yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libmcrypt libmcrypt-devel libXpm-devel
make & make install
- 执行编译饬令
./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt=/usr/local/libmcrypt --with-zlib --enable-mbstring --enable-pcntl --with-openssl --enable-soap --with-pear --with-png-dir --with-pcre-regex --enable-mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-mysql-sock=/var/lib/mysql/mysql.sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-gettext --with-curl --enable-sockets --enable-bcmath --enable-xml --with-bz2 --enable-zip --with-freetype-dir=/usr/include/freetype2/
上述饬令中需求留意的是
--with-mysqli 参数 指定的是 mysql所正在的bin 文件门路如:/usr/bin/mysql_config
--with-freetype-dir 指定的门路
是 /usr/include/freetype2/ 假如你是yum 装置的 freetype2 的话
其余的依据你本人实际需求增删便可
- 设置装备摆设文件
# cp php.ini-development /usr/local/php/lib/php.ini # cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf# cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf # cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm
需求留意的是php7中www.conf这个设置装备摆设文件设置装备摆设phpfpm的端标语等信息,假如你修正默许的9000端标语需正在这里改,再改nginx的设置装备摆设
启动
# /etc/init.d/php-fpm
以上就是php7.0.5装置教程的具体内容,更多请存眷资源魔其它相干文章!
标签: Centos php7开发教程 php7开发资料 php7开发自学 php 7.0.5
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
抱歉,评论功能暂时关闭!