Linux CentOS7 安装php简要过程以及nginx
Copy From https://www.cnblogs.com/freeweb/p/5425554.html
修改了下:
1. 下载php源码:
wget http://cn2.php.net/distributions/php-7.1.12.tar.gz
2.解压缩
tar -xzvf php....
3.原博主安装了很多依赖的库 主要有:
yum -y install libxml2
yum -y install libxml2-devel yum -y install openssl
yum -y install openssl-devel
yum -y install curl
yum -y install curl-devel
yum -y install libjpeg
yum -y install libjpeg-devel
yum -y install libpng
yum -y install libpng-devel
yum -y install freetype
yum -y install freetype-devel
yum -y install pcre
yum -y install pcre-devel
yum -y install libxslt
yum -y install libxslt-devel
yum -y install bzip2
yum -y install bzip2-devel 我这边因为安装的CentOS比较全 所以没有需要 4. 配置一下:
直接copy原博主
./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-zip 5.安装
make && make install 6.添加非root用户
groupadd www-data
useradd -g www-data www-data 7.增加配置文件配置:
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 sapi/fpm/php-fpm /usr/local/bin cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf 8. 修改增加用户
vim /usr/local/php/etc/php-fpm.d/www.conf
user 和group 修改为 www-data 9. 启动
/usr/local/bin/php-fpm 10.netstat -tln | grep 9000 查看是否启动正常 修改nginx 主要修改的地方:
vim /usr/local/nginx/nginx.conf
location / {
root html;
index index.html index.htm index.php;
}
location ~* \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
最上面也得 加上使用的用户.
user www-data;
Linux CentOS7 安装php简要过程以及nginx的更多相关文章
- linux(centos7) 安装nginx
linux(centos7) 安装nginx 1.14(stable) 版本 Nginx配置文件常见结构的从外到内依次是「http」「server」「location」等等,缺省的继承关系是从外到内, ...
- linux centos7 安装常用软件java,node,mysql,Seafile
linux centos7 安装常用软件java,node,mysql,Seafile 安装压缩解压缩软件 yum install -y unzip zip 安装git yum install -y ...
- Linux简介安装、系统启动过程、目录结构
Linux简介安装.系统启动过程.目录结构 Linux 教程 Linux 英文解释为 Linux is not Unix. Linux 简介 Linux内核最初只是由芬兰人李纳斯·托瓦兹(Linus ...
- 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定
阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...
- Linux CentOS7 安装 Qt 5.9.2
Linux CentOS7 安装 Qt 5.9.2 参考链接 http://doc.qt.io/qt-5/linux.html sudo yum groupinstall "C Develo ...
- LINUX CentOS7安装字体库
LINUX CentOS7安装字体库 2017年12月26日 17:06:07 q260996583 阅读数:4866更多 个人分类: linux JAVA画图时常用到Font 类对象 这样的对象 ...
- centos7安装Python3的过程中会和Python2.7版本冲突导致yum版本比对应,致使yum不能使用的问题。
centos7安装Python3的过程中会和Python2.7版本冲突导致yum版本比对应,致使yum不能使用的问题. 原因:yum调用Python,启动程/usr/bin/yum就是一个python ...
- Linux centos7安装Mongodb
Linux centos7安装Mongodb-4.0 1.下载 官方下载地址:https://www.mongodb.com/download-center/community 2.上传解压 1)rz ...
- Linux下安装php环境并且配置Nginx支持php-fpm模块[www]
Linux下安装php环境并且配置Nginx支持php-fpm模块 http://www.cnblogs.com/freeweb/p/5425554.html 5分钟搭建 nginx +php --- ...
随机推荐
- 用OpenSCAD設計特製的遊戲骰子
一開始先製作一個簡單的立方體.定義一個變量「cube_size」,然後使用下圖的立方體程式.center=true的設定可讓立方體位於起始模型的正中央. 為你在OpenSCAD創造的物體加上不同顏色是 ...
- esp8266(2) 智能配置
http://www.arduino.cn/thread-46594-1-1.html http://blog.csdn.net/sadshen/article/details/47049129 ht ...
- ECharts.js学习动态数据绑定
https://my.oschina.net/brillantzhao/blog/1541702https://www.cnblogs.com/leoxuan/p/6513591.htmlhttps: ...
- call()、delegatecall()
call()当使用方法是:require(msg.sender.call.value(_weiToWithdraw)());则作用是将_weiToWithdraw个以太币发送给msg.sender地址 ...
- matlab 工具箱下载地址
1.平面操作工具箱 http://cathy.ijs.si/~leon/planman.html 2.SimMechanics 工具箱 (这个好像不是免费的) http://www.mathworks ...
- <转>浏览器缓存机制
本篇博客转载自github,原文地址:浏览器缓存篇 前言 在前端开发中,缓存有利于加快网页的加载速度,同时缓存能够被反复利用,所以可以减少流量和带宽的开销. 缓存的分类有很多种,CDN缓存.数据库缓存 ...
- 看进程的启动时间长度 + vmstat + jstack 应用
1.显示进程已运行的时间 $ ps -e -o pid,comm,etime 2.dd不断的向磁盘写入数据,所以bo的值会骤然提高,而cpu的wait数值也变高,说明由于大量的IO操作,系统的瓶径出现 ...
- 4-(基础入门篇)学会刷Wi-Fi模块固件(刷AT指令固件)
http://www.cnblogs.com/yangfengwu/p/8965054.html 基础教程源码链接如果失效,请在淘宝介绍中下载,由于链接很容易失效,如果失效请联系卖家,谢谢 https ...
- 交换左Ctrl键和Caps lock键
Windows 10 Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control ...
- 外部Jenkins调用容器中Slave配置实践
1.Jenkins配置 实现动态生成的Slave节点并调用,解决构建项目出现slave节点任务堵塞或者是slave宕机问题.容器平台采用openshift. 参考配置文档:https://blog.c ...