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 ...
随机推荐
- 在饼图上显示百分比值(报表生成器和 SSRS)
在饼图上显示百分比值(报表生成器和 SSRS) 默认情况下,图例中显示了类别来标识每个值. 如果使用了类别标签标记饼图,则可能希望在图例中显示百分比. 注意 在 SQL Server Data Too ...
- [012]泛型--lambda表达式捕获
lambda表达式的捕获跟参数差不多,可以是值或者引用. 1.值捕获 与传值参数类似,采用值捕获的前期是变量可以拷贝:与参数不通透的是:被捕获的变量的值是在lambda创建时拷贝,而不是调用时拷贝. ...
- 标准I/O库之流和FILE对象
对于标准I/O库,它们的操作是围绕流(stream)进行的.当用标准I/O库打开或创建一个文件时,我们已使一个流与一个文件相关联. 对于ASCII字符集,一个字符用一个字节表示.对于国际字符集,一个字 ...
- qt helper
qt帮助文档(中文版) http://www.kuqin.com/qtdocument/index.html qt基础 http://www.devbean.net/2012/08/qt-study- ...
- Java Annotations: Explored & Explained--转载
原文地址:http://www.javacodegeeks.com/2012/08/java-annotations-explored-explained.html One of the many w ...
- ios 图片截取功能 图片拼接功能
截取整个view: -(UIImage*)captureView:(UIView *)theView{ CGRect rect = theView.frame; if ([theView isKind ...
- Linux上安装Squall
Squall是Storm之上的类SQL查询工具,能够将类SQL语句转换成topology,然后提交给Storm运行. 安装Squall前要先安装Java和sbt(simple build tool), ...
- 【转】android adb命令
1. 显示系统中全部Android平台: android list targets 2. 显示系统中全部AVD(模拟器): android list avd 3. 创建AVD(模拟器): andr ...
- Mysql数据库的索引原理
写在前面:索引对查询的速度有着至关重要的影响,理解索引也是进行数据库性能调优的起点.考虑如下情况,假设数据库中一个表有10^6条记录,DBMS的页面大小为4K,并存储100条记录.如果没有索引,查询将 ...
- 【JQuery基础教程(第三版)图灵】笔记
第1章 jQuery入门 1.jQuery官方网站:http://jquery.com 2.开发工具:Firebug 第2章 选择元素 1.属性选择符:属性选择符通过HTML元素的 ...