centos 6.6 编译安装PHP7.0.5
来源:互联网 发布:linux下统计文件个数 编辑:程序博客网 时间:2024/05/01 19:18
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-develmake & 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 /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
同学们可以访问这位同学的博文获得更多的详情 http://blog.csdn.net/21aspnet/article/details/47708763
0 0
- centos 6.6 编译安装PHP7.0.5
- centos 编译安装PHP7
- centos编译安装PHP7
- CentOS 7 编译安装PHP7
- CentOS 7.1编译安装PHP7
- CentOS 7.1编译安装PHP7
- CentOS 7.1编译安装PHP7
- CentOS 编译安装 php7 + nginx
- CentOS 7.1编译安装PHP7
- CentOS 7 编译安装PHP7
- CentOS 6.7编译安装PHP7
- CentOS 7.1编译安装PHP7
- CentOS 7.1编译安装PHP7
- Centos 6.5 编译安装PHP7.0.13
- vagrant中centos编译安装php7.1.9
- centos 编译安装php7.1 mysql nginx
- 新环境编译安装CentOS 7 php7
- Centos编译安装PHP7+Nginx1.9+MySQL5.7
- 对人工智能中“极大极小值”的博弈算法的资料整理。
- WPF-開發報表
- 叮咚小区官网新闻已不更新
- 两数交换总结
- 调试断点进不去原因
- centos 6.6 编译安装PHP7.0.5
- Android 联系人快速索引组件 QuickIndexView
- CSS盒子模型理解
- 基数排序之java实现
- WiFi(网络)调试Android手机
- Xcode插件管理工具Alcatraz
- Android权限检查
- Struts2上课视频
- java process communication