1.准备工作
yum list installed |grep php
yum list installed |grep nginx
yum list installed |grep postgres
yum update
查找命令:find / -name pg*
2.安装nginx
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-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
配置三种服务。
Postgresql 9.1添加用户Ubuntu12.04:http://www.linuxdiyf.com/linux/14379.html
fedora22用rpm包安装配置postgresql数据库:http://www.linuxdiyf.com/linux/13212.html
Fedora21升级到Fedora22后,PostgreSQL无法启动:http://www.linuxdiyf.com/linux/12657.html
CentOS 6.5下PostgreSQL故障切换实现:http://www.linuxdiyf.com/linux/12605.html
Linux安装PostgreSQL 9.4:http://www.linuxdiyf.com/linux/12237.html