转载

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. 在CentOS上编译安装PostgreSQL

    http://my.oschina.net/tashi/blog 第一步:准备阶段 获取必需软件包: CentOS中查看是否安装了某个软件的命令:rpm -qa | grep 软件名.which命令可 ...

  2. zend studio快捷模板 开发工具之zend studio一些配置

    以下是以Zend Studio 10.0.0版本为基础的: 模板的配置(template): [菜单]->[Window]->[preferences]->[PHP]->[Ed ...

  3. 外网访问SVN

    1.路由端口映射: 进入路由器管理管理界面-->转发规则-->虚拟服务器 将端口3690(svn默认端口)和你的局域网IP(如192.168.1.104)映射,勾上“启动”,保存,OK了. ...

  4. 建索引让SQL飞起来

    今天帮助看了一个哥们的数据库,帮他抓了一下等待事件,刚好有一个sql在等待事件中,顺便看看 监控等待事件 select a.SID, a.EVENT, b.OSUSER, b.username, b. ...

  5. Android_ViewFlipper

    xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:t ...

  6. About gpref O(n2) --> O(1)

    http://www.ibm.com/developerworks/cn/linux/l-gperf.html 命令行处理和 gperf 的作用 命令行处理一直以来都是软件开发中最容易被忽视的领域.几 ...

  7. Ubuntu lnmp安装记录

    参考了: Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL 在访问 info.php的时候,我显示的是502错误.后面我参考了: Ubuntu15 ...

  8. Apache Shiro 使用手册

    http://kdboy.iteye.com/blog/1154644 (一)Shiro架构介绍 一.什么是Shiro  Apache Shiro是一个强大易用的Java安全框架,提供了认证.授权.加 ...

  9. JavaScript 数组方法总结

    最近公司没项目.所以所幸学学JS.毕竟很多人和我一样.属于培训机构出来的.JS基础也很差. 面试的时候面试官问你 .你会JS不.你会毫不犹豫的回答会.因为你确实用过.但是真正会的或许只是以前项目中需要 ...

  10. sql 中条件in参数问题

    经常遇到条件为in的模糊查询,sql传参可以在service中直接传递参数,不必使用占位符 select * from ud_order where status in ("+status+ ...