转载

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的更多相关文章

  1. Centos如何通过yum安装php7

      执行如下命令安装epel yum -y install epel-release   更换rpm源,请根据自己的centos版本选择相应的rpm源进行安装 Centos 5.X: rpm -Uvh ...

  2. Centos 6/ 7下通过yum安装php7环境

    本文转自:云溪社区 2015年12月初PHP7正式版发布,迎来自2004年以来最大的版本更新.PHP7最显著的变化就是性能的极大提升,已接近Facebook开发的PHP执行引擎HHVM.在WordPr ...

  3. Centos 6.* / 7.*下通过yum安装php7

    查看 centos 版本 # cat /etc/centos-release 删除之前的 php 版本 # yum remove php* php-common rpm 安装 Php7 相应的 yum ...

  4. centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14--------------------------------------------------- ...

  5. Centos7.6使用yum安装PHP7.2

    Centos7.6使用yum安装PHP7.2 1.安装源 安装php72w,是需要配置额外的yum源地址的,否则会报错不能找到相关软件包. php高版本的yum源地址,有两部分,其中一部分是epel- ...

  6. CentOS下通过yum安装svn及配置

    CentOS下通过yum安装svn及配置 1.环境centos5.5 2.安装svnyum -y install subversion 3.配置 建立版本库目录mkdir /www/svndata s ...

  7. Linux CentOS 6.5 yum安装MongoDB的操作

    安装MongoDB的方法有很多种,可以源代码安装,在CentOS也可以用yum源安装的方法.由于MongoDB更新得比较快,我比较喜欢用yum源安装的方法.64位CentOS下的安装步骤如下: 1.准 ...

  8. CentOS 7 使用yum安装出现错误

    CentOS 7 使用yum安装软件出现错误: Loaded plugins: fastestmirror 此错误信息可能是因为DNS配置错误,可以通过更改配置文件来解决: 1. 使用vi打开DNS的 ...

  9. CentOS 7 查询yum安装的软件及路径

    来源:CentOS 7 查询yum安装的软件及路径 先执行下面的命令,查看所有的已安装软件名称. rpm -qa 然后执行 rpm -ql 软件名称 就可以显示软件的安装路径.   [root@loc ...

随机推荐

  1. mysql 源码调试方法

     http://blog.itpub.net/29254281/viewspace-1847415/ 其中吕海波老师分享的内容是 <调试Oracle二三例:调试技术在日常运维中的应用>其中 ...

  2. 网页媒体播放利器 - JW Player使用心得

    序言 前段时间在做一个网站项目,要求能在线播放视频.音乐,这个以前还真没接触过.恰好今天在坛子里闲逛时,发现有同志对这方面也感兴趣,遂把这些整理了下,同时自己也可以复习下. 播放器需要满足以下需求: ...

  3. 10 Technologies That will Shape Future Education--reference

    http://dizyne.net/technologies-that-will-shape-future-education/ Technology is on the rise and with ...

  4. mysql中相关,无关子查询,表与表之间的关系以及编码和乱码的解决

    ※MySQL中的字符编码(注意,utf8中没有'-',跟Java中不一样)SHOW VARIABLES; //查看系统变量//查询字符编码相关的系统变量SHOW VARIABLES WHERE var ...

  5. CentOS7安装Tomcat8.X

    安装说明 安装环境:CentOS7安装方式:源码安装软件:apache-tomcat-8.0.30.tar.gz下载地址:http://tomcat.apache.org/download-80.cg ...

  6. Linux编程简介

    Linux编程可以分为Shell(如BASH.TCSH.GAWK.Perl.Tcl和Tk等)编程和高级语言(C语言,C++语言,java语言等)编程,Linux程序需要首先转化为低级机器语言即所谓的二 ...

  7. RGBa颜色 css3的Alpha通道支持

    CSS3中,RGBa 为颜色声明添加Alpha通道. RGB值被指定使用3个8位无符号整数(0 – 255)并分别代表红色.蓝色.和绿色.增加的一个alpha通道并不是一个颜色通道——它只是用来指定除 ...

  8. c#局域网文件搬移

    /// kongxiang--2013.7.23 /// using System;using System.Collections.Generic;using System.Linq;using S ...

  9. ###学习《C++ Primer》- 2

    点击查看Evernote原文. #@author: gr #@date: 2014-10-01 #@email: forgerui@gmail.com Part 2: STL顺序容器(第9章) 一.标 ...

  10. KMP的模版实现(以hdu1711为例)

    贴代码,觉得带template的有一些大材小用……不过还是按自己风格写吧! /************************************************************* ...