源码安装php7.2
`# 安装依赖包
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-devel \
openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
`# 下载源码包
wget -c http://mirrors.sohu.com/php/php-7.2.13.tar.gz
`# 解压
tar -xzvf php-7.2.13.tar.gz
cd php-7.2.13
`# 预编译
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php \
--enable-mbstring --with-openssl --enable-ftp --with-gd --with-jpeg-dir=/usr \
--with-png-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
--with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --with-libxml-dir=/usr \
--with-xmlrpc --enable-zip --enable-fpm --enable-xml --enable-sockets --with-gd --with-zlib \
--with-iconv --enable-zip --with-freetype-dir=/usr/lib/ --enable-soap --enable-pcntl --enable-cli --with-curl
`# 编译并安装
make && make install
`# 拷贝配置文件和启动脚本
cp php.ini-development /usr/local/php/etc/php-fpm.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /root/php-7.2.25/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod o+x /etc/init.d/php-fpm
`# 将php服务加入systemctl
`#(1)自定义添加启动服务文件
vim /usr/lib/systemd/system/php-fpm.service
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=simple
PIDFile=/run/php-fpm.pid
ExecStart=/usr/local/php/sbin/php-fpm --nodaemonize --fpm-config /usr/local/php/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
ExecStop=/bin/kill -SIGINT $MAINPID
[Install]
WantedBy=multi-user.target
`#(2)添加环境变量
export PATH="$PATH:/usr/local/php/sbin"
`#(3)在php.ini解析文件中加入
vim /usr/local/php/etc/php.ini
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20170718/opcache.so
源码安装php7.2的更多相关文章
- 搭建LNAMP环境(四)- 源码安装PHP7
上一篇:搭建LNAMP环境(三)- 源码安装Apache2.4 一.安装PHP7 1.yum安装编译php需要的包 yum -y install libxml2 libxml2-devel curl- ...
- Cent OS 6.5下源码安装php7.2
1.安装php需要的扩展 # yum install libxml2 libxml2-devel openssl openssl-devel libcurl libcurl-devel libjpeg ...
- linux源码安装php7.2.0
1. 源码包下载地址 2. 解压php压缩包 tar –zxvf php-7.2.0.tar.gz 3. 进入解压后的 cd php7.2.0 4.安装php需要的扩展 yum install lib ...
- centos7 源码安装php7
因为php安装需要编译,所以服务器应该保证gcc和g++环境的安装 1. 首先释放安装包: tar -xvzf php-7.0.5.tar.gz cd php-7.0.5 2. 接下来进行参数配置,配 ...
- linux 源码安装php7.0 yum
PHP7和HHVM比较PHP7的在真实场景的性能确实已经和HHVM相当, 在一些场景甚至超过了HHVM.HHVM的运维复杂, 是多线程模型, 这就代表着如果一个线程导致crash了, 那么整个服务就挂 ...
- 搭建LNAMP环境(五)- PHP7源码安装Redis和Redis拓展
上一篇:搭建LNAMP环境(四)- 源码安装PHP7 一.安装Redis 1.创建redis用户组和用户 groupadd redis useradd -r -g redis -s /sbin/nol ...
- 源码安装CentOs7下的PHP7
首先安装APACHE环境,直接用yum安装 yum install httpd httpd-devel /etc/httpd/ systemctl start httpd.service #启动apa ...
- 搭建LNAMP环境(三)- 源码安装Apache2.4
上一篇:搭建LNAMP环境(二)- 源码安装Nginx1.10 1.yum安装编译apache需要的包(如果已经安装,可跳过此步骤) yum -y install pcre pcre-devel zl ...
- 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展
上一篇:搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展 一.安装Memcached 1.yum安装libevent事件触发管理器 yum -y install libe ...
随机推荐
- git log 附加命令归纳
git查看历史记录的时候查看每次提交的内容差异: git log -p git限制显示的条数 : git log -p -2 [-2] git简单显示每次提交做了哪些改动: git log --sta ...
- 敏捷宣言(Agile Manifesto)和敏捷开发十二原则
敏捷宣言 The Agile Manifesto Individuals and interactions over Process and tools 个体与交互 重于 过程和工具 Working ...
- 5. SOFAJRaft源码分析— RheaKV中如何存放数据?
概述 上一篇讲了RheaKV是如何进行初始化的,因为RheaKV主要是用来做KV存储的,RheaKV读写的是相当的复杂,一起写会篇幅太长,所以这一篇主要来讲一下RheaKV中如何存放数据. 我们这里使 ...
- [专题总结]矩阵树定理Matrix_Tree及题目&题解
专题做完了还是要说两句留下什么东西的. 矩阵树定理通俗点讲就是: 建立矩阵A[i][j]=edge(i,j),(i!=j).即矩阵这一项的系数是两点间直接相连的边数. 而A[i][i]=deg(i). ...
- python使用openpyxl操作excel总结
安装openpyxl pip install openpyxl 简单示例 from openpyxl import Workbook #创建一个工作薄对象,也就是创建一个excel文档 wb = Wo ...
- 关于vue ui组件
一.vue ui 组件 1: vue 当前很火前端框架vue 针对PC用户 pc 端与移动端区别 (1)屏幕宽度:992px > (2)操作方式:鼠标 事件 手指:触碰操作 -饿了么:基于 ...
- LeetCode 5264 在受污染的二叉树中查找元素 Find Elements in a Contaminated Binary Tree
地址 https://leetcode-cn.com/contest/weekly-contest-163/problems/find-elements-in-a-contaminated-binar ...
- 误删tree命令如何恢复
误删tree命令如何恢复 考察rpm,yum的用法 一.删除tree命令,tree命令不可用 [root@centos7 ~]# which tree /usr/bin/tree [root@cent ...
- Apache安装问题:APR not found
资料来源:Apache遇到的问题:APR not found 安装apache时出现arp错误问题 按照以上文章试验之后整理如下: #./configure --prefix……检查编辑环境时出现: ...
- 做HTML静态页面时遇到的问题总结
1. 如果所示,问题:“首页”和“闲置”文字部分位于table中部 解决方法:需要取消vertical-align:middle属性,将其设置为vertical-align:top,并将文本的高度改为 ...