centos6.5 安装php-5.6.31
1 从PHP官网下载所需要的PHP版本
下载地址: http://php.net/get/php-5.6.31.tar.gz/from/a/mirror 把下载好的文件上传到服务器
2 安装PHP所需要的扩展
yum -y install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libmcrypt libmcrypt-devel
gd gd-devel
3 安装PHP
tar -zxvf php-5.6.31.tar.gz
cd php-5.6.31
./configure --prefix=/usr/local/php5.6 --disable-debug --enable-shared --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-libxml-dir --with-openssl --with-bz2 --with-mcrypt --enable-gd-native-ttf --with-curl --with-zlib-dir -with-gettext --with-jpeg-dir --with-png-dir --with-bz2 --with-freetype-dir --with-iconv --with-config-file-path=/usr/local/php5.6/etc --enable-mbstring --with-gd --disable-debug --enable-short-tags --disable-posix --enable-exif --enable-ftp --enable-sockets --with-mhash --enable-zip
make
make install
cp php.ini-production /usr/local/php5.6/etc/php.ini
4 配置PHP
编辑php.in文件 修改内容如下
short_open_tag = On disable_functions = "dl,exec,passthru,pcntl_exec,popen,posix_kill,posix_mkfifo,posix_setuid,proc_close,proc_open,
proc_terminate,shell_exec,system,leak,posix_setpgid,posix_setsid,proc_get_status,proc_nice,show_source" expose_php = Off cgi.fix_pathinfo= date.timezone = Asia/Shanghai
编辑php-fpm.conf
cp php-fpm.conf.default php-fpm.conf
编辑 php-fpm.conf 设置如下
pid = /usr/local/php5.6/var/run/php-fpm.pid error_log = log/php-fpm.log log_level = notice process_control_timeout = 30 events.mechanism = epoll listen = 127.0.0.1:9056 listen.backlog = -1 pm.max_children = 1024 pm.start_servers = 80 pm.min_spare_servers = 20 pm.max_spare_servers = 80 pm.max_requests = 2000 pm.status_path = /status ping.path = /ping ping.response = pong slowlog = var/log/phpslow_$pool.log request_slowlog_timeout = 5s request_terminate_timeout = 60s rlimit_files = 65534 php_admin_value[open_basedir] = "/tmp/"
php_admin_value[disable_functions] = dl,exec,leak,passthru,pcntl_exec,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system
5 启动测试PHP
#测试php-fpm配置
/usr/local/php5.6/sbin/php-fpm -t
/usr/local/php5.6/sbin/php-fpm -c /usr/local/php5.6/etc/php.ini -y /usr/local/php5.6/etc/php-fpm.conf -t
#启动php-fpm
/usr/local/php5.6/sbin/php-fpm
/usr/local/php5.6/sbin/php-fpm -c /usr/local/php7/etc/php.ini -y /usr/local/php5.6/etc/php-fpm.conf
#关闭php-fpm
kill -INT `cat /usr/local/php5.6/var/run/php-fpm.pid`
#重启php-fpm
kill -USR2 `cat /usr/local/php5.6/var/run/php-fpm.pid`
centos6.5 安装php-5.6.31的更多相关文章
- Centos6 yum安装openldap+phpldapadmin+TLS+双主配置
原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%8 ...
- Centos6.9安装vsftpd并配置多用户的方法
本文介绍了Centos6.9安装vsftpd并配置多用户的方法,分享给大家,具体如下: 一.安装vsftpd ? 1 2 3 4 5 6 7 8 #安装vsftpd yum -y install vs ...
- CENTOS6.5安装CDH5.12.1(一) https://mp.weixin.qq.com/s/AP_m0QqKgzEUfjf0PQCX-w
CENTOS6.5安装CDH5.12.1(一) 原创: Fayson Hadoop实操 2017-09-13 温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看. 1.概述 本文档主要描 ...
- 1.centos6.8安装docker
简介环境安装依赖安装步骤1.删除旧版本的docker2.安装docker2.1 yum安装docker2.2 tar安装2.3 在线脚本事实证明以上的安装方式都行不通 参考文档:https://doc ...
- Centos6.7安装Cacti教程
Centos6.7安装Cacti教程# link:http://docs.cacti.net/plugins/ blog地址:http://www.cnblogs.com/caoguo 一.基本环境安 ...
- CentOS6.5 安装gitlab以及gitolite迁移gitlab
CentOS6.5 安装gitlab以及gitolite迁移gitlab gitlab 的安装使用以及数据结构 安装 环境: CentOS6.5 基于 nignx + unicorn 搭建的应用环境, ...
- Centos6.x安装之后的9件事
Centos6.x安装之后的9件事 这些不是必须都做的,只不过是我个人的习惯,在此记录一下. 1.修改yum源到国内 CentOS系统更换软件安装源 备份你的原镜像文件,以免出错后可以恢复. mv / ...
- vmware Centos6.6安装64位
Centos6.6安装64位 必须开启BIOS中的虚拟化技术 首先开机进入BIOS,一般机器是按F2,我的T420是按F1,然后进入Security,Virtualization,选择Enable即可 ...
- Gitlab完美安装【CentOS6.5安装gitlab-6.9.2】
摘要: 拆腾了几天,终于在今天找到了快速安装Gitlab的方法.CentOS6.5安装gitlab-6.9.2 参考网址:https://gitlab.com/gitlab-org/omnibus-g ...
- CentOS6.5安装Tomcat
安装说明 安装环境:CentOS-6.4 安装方式:源码安装 软件:apache-tomcat-7.0.56.tar.gz 下载地址:http://tomcat.apache.org/download ...
随机推荐
- 基于iOS用CoreImage实现人脸识别
2018-09-04更新: 很久没有更新文章了,工作之余花时间看了之前写的这篇文章并运行了之前写的配套Demo,通过打印人脸特征CIFaceFeature的属性,发现识别的效果并不是很好,具体说明见文 ...
- 第 3 章 镜像 - 015 - 调试 Dockerfile
如何 debug Dockerfile 通过 Dockerfile 构建镜像的过程 从 base 镜像运行一个容器 执行命令对容器做修改 执行类似 docker commit 的操作,生成一个新的镜像 ...
- learn the python the hard way习题26~30总结
考试试题26错误总结: 漏写字母,括号 写错字母 write(),read()的使用:只能打开使用了 open() 后返回的文件对象(file object),而不能直接使用文件名 if 语句中,条件 ...
- Getting Started with Processing 第二,三章总结
第一章是文化熏陶. 第二章:开始编程 菜单栏中的 Show 的快捷键 Run:进行显示shortcut:可以通过快捷键 cmd + R 执行Present:进行全屏的显示shortcut:可以通过按下 ...
- centos7: nginx安装配置
centos平台编译环境使用如下指令 安装make: yum -y install gcc automake autoconf libtool make 安装g++: yum install gcc ...
- CSS3实现烟花特效 --web前端
烟花特效,比较简单,直接贴代码了…… <!DOCTYPE html><html lang="en"><head> <meta charse ...
- LeetCode--283--移动0
问题描述: 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序. 示例: 输入: [0,1,0,3,12] 输出: [1,3,12,0,0] 说明: 必须在原 ...
- apiCloud 下拉刷新
api.setRefreshHeaderInfo({ bgColor: '#fff', textColor: '#4d4d4d', },function(ret, err){ //下拉刷新时,刷新的数 ...
- HashMap的两种排序方式
Map<String, Integer> map = new HashMap<String, Integer>();map.put("d", 2);map. ...
- 『TensorFlow』高级高维切片gather_nd
gather用于高级切片,有关官方文档的介绍,关于维度的说明很是费解,示例也不太直观,这里给出我的解读,示例见下面, indices = [[0, 0], [1, 1]] params ...