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
โ NGINX