Nginx 설치 - CentOS 7

  • add nginx repository

    # vi /etc/yum.repos.d/nginx.repo
    [nginx]
    name=Nginx Repository
    baseurl=http://nginx.org/packages/centos/7/$basearch/
    gpgchecl=0
    enabled=1
  • install nginx

    # yum install -y nginx
  • if not use 80 port, setting firewall and modify nginx conf file

    # firewall-cmd --permanent --zone=public --add-port=81/tcp
    # firewall-cmd --reload
    # firewall-cmd --list-ports
    ...
    # vi /etc/nginx/conf.d/default.conf
    ...
      listen 81;
    ...

'Programming > Server' 카테고리의 다른 글

[CentOS 7] mongoDB 설치  (0) 2019.04.29
[Network] OSI 7계층  (0) 2019.04.03
[Linux] 자주 사용하는 명령어 (grep, find, exec, xargs, awk)  (1) 2019.02.26
[Linux] nohup 사용  (0) 2019.02.01
[Ubuntu] AWS - Ubuntu locale 한글 변경  (0) 2019.01.14

+ Recent posts