Linux编译安装PHP5.6.31
来源:互联网 发布:如何利用网络做直销 编辑:程序博客网 时间:2024/06/06 00:47
step 1 安装PHP所需的Lib库
- yum直接安装
yum install \zlib-devel \ libxml2-devel \ libjpeg-devel \libjpeg-turbo-devel \freetype-devel \libpng-devel \gd-devel \libcurl-devel \libxslt-devel \libxslt-devel -y
- yum中没有的安装包 需自行下载安装
mkdir -p /home/toolscd /home/toolswget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar xzf libiconv-1.14.tar.gz./configure --perfix=/usr/local/libiconvmake && make install
- yum添加epel第三方源 安装libmcrypt mhash mcrypt库
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install libmcrypt-devel mhash mcrypt -y
step 2 [安装mysql ]
安装Mysql 二进制包安装Mysql
step 3 下载PHP
选择php-5.6.31.tar.gz 其中一个镜像进行下载.
step 4 编译安装
tar zxf php-5.6.31.tar.gzcd php-5.6.31
./configure \--prefix=/application/php5.6.31 \--with-mysql=/application/mysql #如果没进行step2 则 --enable-mysqld \--with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-openssl \--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-fpm \--enable-mbstring \--with-mcrypt \--with-gd \--enable-gd-native-ttf \--with-xmlrpc \--enable-zip \--enable-soap \--enable-short-tags \--enable-static \--with-xsl \--with-fpm-user=nginx \--with-fpm-group=nginx \--enable-ftp
make && make install
step 5 初始化PHP配置引擎文件
- 建立软链接
ln -s /application/php-5.6.31 /application/php
- 初始化php.ini文件
cd /php-5.6.31 # 进入安装包目录cp php.ini-production /application/php/lib/php.ini
step 6 初始化PHP服务(FastCGI)配置文件
cd /application/php/etc/cp php-fpm.conf.default php-fpm.conf
step 7 开启php-fpm服务
- 启动
/application/php/sbin/php-fpm
- 检查
netstat -ltunp | grep 9000#或者lsof -i :9000
阅读全文
0 0
- Linux编译安装PHP5.6.31
- Linux编译安装LAMP环境(php5.6)
- linux下编译安装php5.6
- 编译安装php5.2.17
- 编译安装php5.6.30
- PHP5.4 linux 编译
- Linux下Php5 Mysql5 Apache2 GD2 Zend3编译安装步骤
- PHP5.3.3源代码编译安装(Linux CentOS 5.5)
- PHP5.3.3源代码编译安装(Linux CentOS 5.5)
- linux编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14
- linux下用源代码编译安装apache2.x + php5.x
- 详解linux下编译安装配置php5.6.30过程
- PHP5.3.3源代码编译安装(Linux CentOS 5.5)
- LINUX 安装 PHP5.6.13
- linux安装php5.6
- CentOS6编译安装LAMP:编译安装 PHP5
- PHP5.5编译安装问题
- CentOS下编译安装PHP5
- 服务器centos 7.2 LAMP环境安装
- js中常用方法总结
- Android—(提交数据至服务器)
- Spring Cloud Eureka详解
- Configuration--properties(三-1)
- Linux编译安装PHP5.6.31
- FastDFS+nginx+tomcat在linux系统的配置
- 整理:对开发者有用的英文网站合集
- 2017年7月27
- 深入理解Java虚拟机学习笔记-2.JVM垃圾回收
- Python 3 教程
- 集合框架
- UNIX环境高级编程读书笔记(2)
- LeetCode 530 Minimum Absolute Difference in BST