Centos 7 通过YUM安装 PHP7 NGINX1.1.8 POSTGRESQL9.5
转载
1、最小化安装CENTOS7
2、更新源:
yum update
reboot
3.安装扩展源:
yum install epel-release
4.安装工具软件:
yum install wget unzip unrar
5.安装PHP7.0扩展源:
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7*.rpm
6.安装NGINX扩展源:
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
7.安装PHP7.0
yum --enablerepo=remi,remi-test install php70-php-fpm
yum --enablerepo=remi,remi-test install php70-php-pgsql php70-php-iconv php70-php-mbstring
8.安装POSTGRESQL9.5
rpm -i http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-1.noarch.rpm
yum install -y postgresql95-server.x86_64
systemctl enable postgresql-9.5.service
/usr/pgsql-9.5/bin/postgresql95-setup initdb
systemctl start postgresql-9.5.service
9. 编辑NGINX配置文件:
vi /etc/nginx/conf.d/default.conf
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
location ~ \.php$ {
# root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
10.编辑PHP-FPM 配置文件,将用户修改,可以解决WORDPRESS等在线更新等很多奇怪的问题:
vi /etc/opt/remi/php70/php-fpm.d/www.conf
user=nginx
11.启动服务:
systemctl start nginx
systemctl start php70-php-fpm
systemctl enable nginx
systemctl enable php70-php-fpm
12添加路由
On CentOS 7 systems:
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload 13 更改数据库密码 su - postgres
psql
.. and set postgres password with following command:
postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# \q
Centos 7 通过YUM安装 PHP7 NGINX1.1.8 POSTGRESQL9.5的更多相关文章
- Centos如何通过yum安装php7
执行如下命令安装epel yum -y install epel-release 更换rpm源,请根据自己的centos版本选择相应的rpm源进行安装 Centos 5.X: rpm -Uvh ...
- Centos 6/ 7下通过yum安装php7环境
本文转自:云溪社区 2015年12月初PHP7正式版发布,迎来自2004年以来最大的版本更新.PHP7最显著的变化就是性能的极大提升,已接近Facebook开发的PHP执行引擎HHVM.在WordPr ...
- Centos 6.* / 7.*下通过yum安装php7
查看 centos 版本 # cat /etc/centos-release 删除之前的 php 版本 # yum remove php* php-common rpm 安装 Php7 相应的 yum ...
- centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14
centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14--------------------------------------------------- ...
- Centos7.6使用yum安装PHP7.2
Centos7.6使用yum安装PHP7.2 1.安装源 安装php72w,是需要配置额外的yum源地址的,否则会报错不能找到相关软件包. php高版本的yum源地址,有两部分,其中一部分是epel- ...
- CentOS下通过yum安装svn及配置
CentOS下通过yum安装svn及配置 1.环境centos5.5 2.安装svnyum -y install subversion 3.配置 建立版本库目录mkdir /www/svndata s ...
- Linux CentOS 6.5 yum安装MongoDB的操作
安装MongoDB的方法有很多种,可以源代码安装,在CentOS也可以用yum源安装的方法.由于MongoDB更新得比较快,我比较喜欢用yum源安装的方法.64位CentOS下的安装步骤如下: 1.准 ...
- CentOS 7 使用yum安装出现错误
CentOS 7 使用yum安装软件出现错误: Loaded plugins: fastestmirror 此错误信息可能是因为DNS配置错误,可以通过更改配置文件来解决: 1. 使用vi打开DNS的 ...
- CentOS 7 查询yum安装的软件及路径
来源:CentOS 7 查询yum安装的软件及路径 先执行下面的命令,查看所有的已安装软件名称. rpm -qa 然后执行 rpm -ql 软件名称 就可以显示软件的安装路径. [root@loc ...
随机推荐
- mysqldump原理5
http://blog.csdn.net/niu870781892/article/details/6186078 导出多张表的时候表之间用空格分开: # mysqldump -h192.168.25 ...
- 深入理解C++中的mutable关键字
mutalbe的中文意思是“可变的,易变的”,跟constant(既C++中的const)是反义词. 在C++中,mutable也是为了突破const的限制而设置的.被mutable修饰的变量,将 ...
- [COCOS2DX]交叉编译实践+速度优化(vs2012修改win32代码+修改makefile+编译安卓项目包+部署安卓项目包到Eclipse+运行apk)
通过前面的部署过程可以知道cocos2dx的开发过程如下: 1.VS2012完成修改 2.因为指定了CPP文件位置,ndk可以通过jni方式完成C++文件的编译,运行以下命令完成proj.androi ...
- 使用socket实现FTP程序
#-*- coding:utf-8 -*- import socketserver from module import * class server: def __init__(self,reque ...
- [Doc ID 1590988.1]如何清理E-Business Suite的缓存(Apache/iAS, Cabo, Modplsql, Browser, Jinitiator, Java, Portal, WebADI)?
文档内容 目标 解决方案 参考 适用于: Oracle Applications Technology Stack - 版本 11.5.9 到 12.2.2 [发行版 11.5 到 12. ...
- Android 自学之日期DatePicker、时间TimePicker选择器
日期(DatePicker).时间(TimePicker)是两个比较易用的控件,他们都是从帧布局FrameLayout派生而出的:他们在FrameLayout的基础上提供了一些方法来获取当前用户所选择 ...
- BigInteger
首先上模板(不断更新中...)(根据刘汝佳AOAPCII修改) #include <iostream> #include <sstream> #include <cstd ...
- nodejs使用express4框架默认app.js配置说明
var express = require('express'); //引入express模块 var path = require('path'); //引入path模块,该模块包括了一些处理文件路 ...
- 【转载】Git的安装与使用
Git的安装与使用 转载来源:http://www.cnblogs.com/Bonker/p/3441781.html 1,下载git https://code.google.com/p/msysg ...
- requirejs 定义模块中含有prototype
因为我对requirejs不熟悉,不清楚如何定义带有prototype的模块, 在看了:https://gist.github.com/jonnyreeves/2474026 的demo之后,就明白了 ...