개발/Linux

nginx 설치

웁스교교주 2017. 2. 27. 17:36

웹서버 성능 부하테스트를 검색하던 중 nginx 웹서버를 알겠되었다.

또 호기심 많은 개발자이므로 바로 설치를 해 보는 센스를 발휘했다.ㅎㅎ

일단 ssl,pcre,zlib 이 컴파일 옵션에 들어가니 골치 아프니 걍 yum으로 설치…

yum install openssl openssl-devel

yum install pcre pcre-devel

yum install zlib zlib-devel

로 설치 완료

그럼 nginx를 다운 받자

curl -O http://nginx.org/download/nginx-1.4.1.tar.gz

다운 완료 wget으로 다운 할 수 있다.

압축 풀기 신공

tar -xvf nginx-1.4.1.tar.gz

cd nginx-1.4.1

이제 컴파일을 해야 한다.

컴파일 옵션은  http://nginx.org/en/docs/install.html 여기서 확인가능!!

난 요렇게 컴파일

./configure –prefix=/usr/local/nginx –sbin-path=/usr/local/nginx/sbin/nginx –pid-path=/usr/local/nginx/conf/nginx.conf –error-log-path=/usr/local/nginx/logs/error.log –http-log-path=/usr/local/nginx/logs/access.log –with-http_ssl_module

컴파일 후

make

make install

이러면 끝

확인은 브라우저에 ip나 도메인으로 확인!!!