转载

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 的 Binlog

    https://xcoder.in/2015/08/10/mysql-binlog-try/

  2. phpcms v9 模板标签说明整理

    1.{template "content","header"} 2.网站网址调用:{siteurl($siteid)}: 3.标签get:分页,{pc:get ...

  3. C# 之 OpenFileDialog的使用

    一.打开文件对话框(OpenFileDialog) 1. OpenFileDialog控件有以下基本属性 [1]InitialDirectory:对话框的初始目录 [2]Filter:要在对话框中显示 ...

  4. 图源点到各个点的最短路径(DIJ)

    # -*- coding: cp936 -*- import copy MV = 0xFFFFFFFF Vertexs = {0:'v0',1:'v1',2:'v2',3:'v3',4:'v4',5: ...

  5. WebGoat视频教程下载

    WebGoat视频教程下载:http://pan.baidu.com/s/1pJlsfQ7

  6. 关于Eclipse插件开发-----加入首选项(preferencePages)

    选择主菜单"窗口---->首选项"命令打开"首选项"窗口.此窗口是Eclipse设置项的集中营, 修改plugin.xml文件,设置首选项的扩展点: pl ...

  7. [原]Unity3d中奇怪的编译错误

    整理项目,重新build时出现一些问题,这些代码在原项目中都是可以运行的. 错误信息如下: Assets/XXXXX.cs(79,35): error CS0103: The name `NNNNNN ...

  8. Ajax效果

    Ajax的效果就是不通过网页的跳转,就可以通过请求,就可以自动加载某个网页,在注册帐号时,经常 不通过网页跳转从数据库中查看是否有相同数据的出现,确认是否能够正确注册 下面是用其他方式实现ajax的效 ...

  9. oracle拼接字段用||

    ① //dual相当于一个临时表.用来测量@@@@H210000000003I4R 的长度用length() select length('@@@@H210000000003I4R') from du ...

  10. JAXB - Annotations, The Annotation XmlElement

    The basic annotation for a field that's intended to be an element is XmlElement. It permits you to d ...