반응형

NGinx 설치는 yum으로 설치 하였다.


아래 사이트에서 접속하여 확인하여 설치 진행하면 쉽게 가능할 듯 싶다.


https://opentutorials.org/module/384/4332

http://ohgyun.com/478


간단 설치 정리:


Cent OS 에 설치


1. yum 으로 Mysql 설치 진행

2. wget http://nginx.org/download/nginx-1.11.3.tar.gz  로 받는다.

3. tar -xvzf nginx-1.11.3.tar.gz

4. cd nginx-1.11.3

5. ./configure


6. make && make install



진행한다.

설치는 무난하게 진행 되었다.


설치가 완료 되고 나면 다음과 같이 아래에서 nginx 를 실행 또는 중지 가능하다.


/usr/local/nginx/sbin


cd /usr/local/nginx/sbin


[root@Cacti sbin]# ./nginx -h

nginx version: nginx/1.11.3

Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]


Options:

  -?,-h         : this help

  -v            : show version and exit

  -V            : show version and configure options then exit

  -t            : test configuration and exit

  -T            : test configuration, dump it and exit

  -q            : suppress non-error messages during configuration testing

  -s signal     : send signal to a master process: stop, quit, reopen, reload

  -p prefix     : set prefix path (default: /usr/local/nginx/)

  -c filename   : set configuration file (default: conf/nginx.conf)

  -g directives : set global directives out of configuration file



`nginx` 커맨드의 스위치로 프로세스에 시그널을 보낼 수 있다.


$ ./nginx -s stop # 즉각 중단 (TERM 신호)

$ ./nginx -s quit # 정상 중단 (QUIT 신호)

$ ./nginx -s reopen # 로그 파일을 다시 오픈한다.

$ ./nginx -s reload # 환경 설정을 다시 로드한다.



이제 PHP 연동을 정리해 봤다.

사실 php연동에서 많이 해맸다. 참고로 iptables 에 80 포트를 오픈해 줘야(디폴트) Nginx 가 제대로 설치 되었는지 확인 가능하다.





php 연동은 다음 포스팅에 정리해 본다.

반응형

'NGINX' 카테고리의 다른 글

[NGINX] php 연동 (Access denied.) & mysql 연동  (0) 2016.08.12
[NGinX] 설명 - 소개 NGINX란? (펌)  (0) 2016.06.21

+ Recent posts