text Ubuntu 16.04 PHP + Apache + Postgres9.5
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Ubuntu 16.04 PHP + Apache + Postgres9.5相关的知识,希望对你有一定的参考价值。
#!/bin/bash
# setup LAPP server with
# pg admin postgres | postgrespw
# try with `export PGPASSWORD='postgrespw'; psql -h <serverip> -U postgres`
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical
sudo -E apt-get -qy update
sudo -E apt-get -qy -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" upgrade
sudo -E apt-get -qy autoclean
apt install \
apache2 \
php \
php-pgsql \
libapache2-mod-php \
php-xml \
php-mbstring \
postgresql \
postgresql-client \
-qq -y --no-install-recommends
sudo /etc/init.d/apache2 restart
echo "listen_addresses = '*'" >> /etc/postgresql/9.5/main/postgresql.conf
cd /
sudo -u postgres psql template1 -c "ALTER USER postgres with encrypted password 'postgrespw';"
echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf
echo "host all all ::/0 md5" >> /etc/postgresql/9.5/main/pg_hba.conf
sudo systemctl restart postgresql.service
以上是关于text Ubuntu 16.04 PHP + Apache + Postgres9.5的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu16.04安装sublime text 3并配置Python开发环境
Ubuntu 16.04 安装 Apache, MySQL, PHP7
ubuntu16.04快速安装LNMP
ubuntu16.04安装配置nagios
text Ubuntu 16.04的源列表
text Solr卸载(Ubuntu 16.04)