Installation

Docker Ubuntu ์ด๋ฏธ์ง€๋ฅผ ๋ฐ›์•„์„œ ์„ค์น˜

Docker ๊ด€๋ จ ๋‚ด์šฉ๊ณผ ์ค‘๋ณต๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • ์„ค์น˜ ํ™˜๊ฒฝ
    • Ubuntu 18.0.4 LTS

์„ค์น˜ ์ค€๋น„

ubuntu ์ด๋ฏธ์ง€ ๋ฐ›๊ธฐ

$ docker pull ubuntu:latest

Container ์ƒ์„ฑํ•˜๊ธฐ

$ docker run -i -t -d -p 9000:9000/tcp --name square-dev ubuntu /bin/bash

apt-get ์—…๋ฐ์ดํŠธ

$ apt-get update

vim ์„ค์น˜

$ apt-get install vim

Package ๋ฅผ ์ด์šฉํ•œ nginx ์„ค์น˜

nginx ๋‹ค์šด๋กœ๋“œ ๋ฐ ์„ค์น˜

์„ค์น˜ ์—ฌ๋ถ€๋ฅผ ๋ฌป๋Š”๊ฒŒ ๊ท€์ฐฎ์œผ๋‹ˆ -y ์˜ต์…˜์„ ์ค€๋‹ค.

$ apt-get install nginx -y

์„ค์น˜ ํ™•์ธ

$ nginx -v

nginx version: nginx/1.14.0 (Ubuntu)                                  # version

$ nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok      # config file ๋‚ด์šฉ (๋ฌธ๋ฒ•) ๊ฒ€์‚ฌ
nginx: configuration file /etc/nginx/nginx.conf test is successful    # config file ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ

nginx ์ƒํƒœ

$ service nginx status

nginx ์ค‘์ง€

$ service nginx stop

nginx ๊ธฐ๋™

$ service nginx start

Service Start

$ sudo service nginx start
$ sudo systemctl start nginx
$ sudo /etc/init.d/nginx start

Service Restart

$ sudo service nginx restart
$ sudo systemctl restart nginx
$ sudo /etc/init.d/nginx restart

Service Stop

$ sudo service nginx stop
$ sudo systemctl stop nginx
$ sudo /etc/init.d/nginx stop

Service Status

$ sudo service nginx status
$ sudo systemctl status nginx

Service Status Reload

  • ์„ค์ •ํŒŒ์ผ์„ ๋ณ€๊ฒฝํ•œ ํ›„ ์ ์šฉ์‹œ ์‚ฌ์šฉ
$ sudo service nginx reload
$ sudo systemctl reload nginx
$ sudo nginx -s reload

Configuration Check

$ sudo nginx -t