ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • AWS EC2(linux) Nginx ์„ค์น˜ํ•˜๊ธฐ
    Nginx 2022. 9. 27. 00:32

    ๐Ÿ“ŒNginx๋ž€

    ์›น ์„œ๋ฒ„ ์†Œํ”„ํŠธ์›จ์–ด๋กœ ๊ฐ€๋ฒผ์›€๊ณผ ๋†’์€ ์„ฑ๋Šฅ์„ ๋ชฉํ‘œ๋กœ ํ•œ๋‹ค.

    ์›น ์„œ๋ฒ„, ๋ฆฌ๋ฒ„์Šค ํ”„๋ก์‹œ ๋ฐ ๋ฉ”์ผ ํ”„๋ก์‹œ ๊ธฐ๋Šฅ ๋“ฑ์„ ์ œ๊ณตํ•œ๋‹ค.

     

    Nginx ์ €์žฅ์†Œ ์ถ”๊ฐ€

    yum ์ €์žฅ์†Œ์—๋Š” nginx ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์—†๊ธฐ ๋•Œ๋ฌธ์—(yum info nginx) ์•„๋ž˜ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๋‹น ๊ฒฝ๋กœ์— repo๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
    sudo vi /etc/yum.repos.d/nginx.repo

     

    i๋ฅผ ๋ˆŒ๋Ÿฌ ํŽธ์ง‘๋ชจ๋“œ๋กœ ๋ณ€๊ฒฝ ํ•œ ๋’ค ์•„๋ž˜ ๋‚ด์šฉ์„ ๋ถ™์—ฌ ๋„ฃ์Šต๋‹ˆ๋‹ค.
    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/centos/7/$basearch/
    gpgcheck=0
    enabled=1

     

    ๋‚ด์šฉ์„ ์ž‘์„ฑ ํ›„ ESC๋ฅผ ๋ˆŒ๋Ÿฌ ํŽธ์ง‘ ๋ชจ๋“œ๋ฅผ ์ข…๋ฃŒํ•œ ๋’ค :wq!(๊ฐ•์ œ ์ €์žฅ ํ›„ ์ข…๋ฃŒ)๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
    :wq!

     

    nginx ์„ค์น˜
    sudo yum install -y nginx

     

    nginx ์„ค์น˜ ํ™•์ธ
    nginx -v

     

    nginx ๋ช…๋ น์–ด
    #์„œ๋น„์Šค ๋“ฑ๋ก
    sudo systemctl enable nginx
    
    #nginx ์‹œ์ž‘
    sudo systemctl start nginx
    
    #nginx ์ข…๋ฃŒ
    sudo systemctl stop nginx
    
    #nginx ์žฌ์‹œ์ž‘
    sudo systemctl restart nginx
    
    #nginx ์ƒํƒœ
    sudo systemctl status nginx

     

    Nginx ์„ค์น˜ ๊ฒฝ๋กœ
    cd /etc/nginx

     

    'Nginx' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

    Windows10 Nginx ์„œ๋น„์Šค ๋“ฑ๋ก, ์‚ญ์ œ  (0) 2022.09.26
    Windows10 Nginx ์„ค์น˜ํ•˜๊ธฐ  (0) 2022.09.26

    ๋Œ“๊ธ€

Designed by Tistory.