yum list installed |grep php
yum list installed |grep nginx
yum list installed |grep postgres
查找命令:find / -name pg*
2.安装nginx
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-cen tos-7-0.el7.ngx.noarch.rpm
yum install nginx
chkconfig nginx on 或者 systemctl start nginx.service
service nginx restart
nginx 配置文件 在 /etc/ngixn
3.安装php
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php56w php56w-common
yum install php56w-fpm php56w-opcache
yum install php56w-cli php56w-embedded
yum install php56w-devel php56w-gd php56w-mbstring php56w-xml php56w-xmlrpc php56w-mcrypt php56w-enchant
yum install php56w-mysqlnd php56w-pgsql php56w-odbc php56w-pdo
yum install php56w-recode php56w-tidy php56w-soap php56w-snmp php56w-imap
yum install php56w-opcache php56w-pear php56w-pecl-memcache php56w-pecl-apcu
yum install php56w-process php56w-bcmath php56w-phpdbg php56w-pecl-xdebug
php 和php-fpm 配置文件 在 /etc/php 和/ etc/php-fpm
4.安装postgresql
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm
yum install postgresql94-server postgresql94-contrib
rpm -aq| grep postgres
/usr/pgsql-9.4/bin/postgresql94-setup initdb
chkconfig postgresql-9.4 on
systemctl enable postgresql-9.4
systemctl start postgresql-9.4
su - postgres
psql
postgres=# \password postgres
配置文件在
/var/lib/pgsql/9.4/data/
样例配置文件在:/usr/pgsql-9.4
修改PostgresSQL数据库配置实现远程访问
# vi /etc/postgresql/9.1/main/postgresql.conf
1.监听任何地址访问,修改连接权限
#listen_addresses = ‘localhost’改为 listen_addresses = ‘*’
2.启用密码验证
#password_encryption = on改为password_encryption = on
3.可访问的用户ip段
# vi /etc/postgresql/9.1/main/pg_hba.conf
在hba_conf 里
# to allow your client visiting postgresql server
host all all 0.0.0.0/* md5
4.重启PostgreSQL数据库
配置 三种服务