Last active
June 20, 2017 02:05
-
-
Save kenzo0107/f779db05456c5b9f3d98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rootユーザへ変更 | |
sudo su - | |
# nginxリポジトリ設定 | |
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm | |
yum clean all | |
yum update | |
# nginxインストール | |
yum install -y nginx | |
# nginx バージョン確認 | |
/usr/sbin/nginx -V | |
# nginx起動&サービス登録 | |
/bin/systemctl start nginx.service | |
/bin/systemctl enable nginx | |
# nginxステータス表示 | |
systemctl status nginx | |
# http://(ipアドレス)アクセスした際に以下のようなエラー文が表示される場合 | |
# 「Gateway Timeout: can't connect to remote host」 | |
# http通信を許可 | |
firewall-cmd --add-service=http --zone=public --permanent | |
systemctl restart firewalld | |
# http://(ipアドレス)にアクセスして以下が表示されれば成功 | |
# 「Welcome to nginx!」 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment