LoginSignup
2
1

More than 3 years have passed since last update.

Amazon Linux 2 + nginx + php-fpm + PostgreSQL10

Posted at

nginx

インストール

# sudo amazon-linux-extras install nginx1.12 -y
# nginx -v

起動と自動起動

# sudo systemctl start nginx.service
# sudo systemctl enable nginx.service

PostgreSQL10

インストール

# amazon-linux-extras install postgresql10
# sudo yum install postgresql-server postgresql-libs postgresql-contrib -y
この順でインストールするとpostgresql-serverもバージョン10が入る

初期化

initdb -U postgres --local=ja_JP.UTF-8 -E UTF-8 -D /var/lib/pgsql/data

php-fpm

インストール

# sudo amazon-linux-extras install php7.3 -y
# php-fpm -v

関連パッケージのインストール

# sudo yum install php-mbstring -y
# sudo yum install php-pgsql -y

起動と自動起動

# sudo systemctl start php-fpm.service
# sudo systemctl enable php-fpm.service

config編集

/etc/php-fpm.d/www.conf
user = nginx
group = nginx
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1