CentOS 7 - NGINX 1.16 설치 > 에필로그

본문 바로가기

CentOS 7 - NGINX 1.16 설치

페이지 정보

작성자 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 에필로그 댓글 0건 조회 1,570회 작성일 22-06-09 14:56

본문

-. 준비

yum -y update

yum -y install wget make gcc gcc-c++

mkdir /opt/install

cd /opt/install


-. 연관 라이브러리 빌드

wget https://zlib.net/zlib-1.2.12.tar.gz

tar zxf zlib-1.2.12.tar.gz

cd zlib-1.2.12

./configure

make

cd ..


wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz

tar zxf pcre-8.45.tar.gz

cd pcre-8.45

./configure

make

cd ..


yum -y install perl

wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz

tar zxf openssl-1.1.1n.tar.gz

cd openssl-1.1.1n

./config

make

cd..


-. Nginx 설치

useradd --shell /usr/sbin/nologin nginx

wget https://nginx.org/download/nginx-1.16.1.tar.gz

tar zxf nginx-1.16.1.tar.gz

cd nginx-1.16.1

./configure \

--prefix=/usr/local/nginx \

--sbin-path=/usr/local/nginx/sbin/nginx \

--conf-path=/usr/local/nginx/conf/nginx.conf \

--pid-path=/usr/local/nginx/mmc/nginx.pid \

--lock-path=/usr/local/nginx/mmc/nginx.lock \

--error-log-path=/usr/local/nginx/mmc/error.log \

--http-log-path=/usr/local/nginx/mmc/access-log \

--with-zlib=../zlib-1.2.12 \

--with-pcre=../pcre-8.45 \

--with-openssl=../openssl-1.1.1n \

--with-http_ssl_module \

--with-debug \

--user=nginx \

--group=nginx

make

make install

cd ..


-. 설치 확인

/usr/local/nginx/sbin/nginx

curl localhost


-. 방화벽 허용

firewall-cmd --zone=public --add-port=80/tcp --permanent

firewall-cmd --reload


-. 사용자 설정, 변수등록

vi /usr/local/nginx/conf/nginx.conf

user nginx;

vi /etc/profile

export NGINX_HOME=/usr/local/nginx

export PATH=$NGINX_HOME/sbin:$PATH

source /etc/profile


-. 데몬 설정

/usr/local/nginx/sbin/nginx -s stop

vi /etc/systemd/system/nginx.service

[Unit]

Description=NGINX

After=syslog.target network.targetremote-fs.target nss-lookup.target


[Service]

Type=forking

PIDFile=/usr/local/nginx/mmc/nginx.pid

ExecStartPre=/usr/local/nginx/sbin/nginx -t

ExecStart=/usr/local/nginx/sbin/nginx

ExecReload=/usr/local/nginx/sbin/nginx -s reload

ExecStop=/usr/local/nginx/sbin/nginx -s stop

PrivateTmp=true


[Install]

WantedBy=multi-user.target

systemctl daemon-reload


-. 시작 및 제어

systemctl start nginx.service

systemctl status nginx.service

systemctl enable nginx.service


댓글목록

등록된 댓글이 없습니다.

에필로그 340건/9페이지
에필로그 목록
번호 제목 글쓴이 조회 날짜
220 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1457 06-10
219 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1418 06-10
218 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1645 06-09
217 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1476 06-09
216 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1479 06-09
열람중 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1571 06-09
214 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1461 06-08
213 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1475 06-08
212 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1461 06-08
211 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1480 06-07
210 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1518 06-06
209 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1718 06-06
208 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1387 06-06
207 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1488 06-06
206 no_profile 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1479 06-06
게시물 검색
[문의] 전화 : 0707-443-0499 메일 : t8@t8.co.kr [분야] Linux, Unix, Windows DNS, 웹, WAS, 역방향프록시, 앱 SQL, 메일, 스트리밍, CDN SMB/CIFS, FTPs, NFS, AFP IKEv2, OpenVPN, WireGuard 대범위 DHCP, WiFi 종속포털, AAA DDoS 우회/분산, 랜섬웨어 대비 장애/재난/해킹시스템 복구 서비스/P2V 마이그레이션 XSS/웹쉘/인젝션/백도어 제거 서버 업그레이드/교체/이전 주문/맞춤/복합/간이서버 제작 특별/희귀/생소한 시스템 상담/구현 문제해결 외

Copyright © T8. All rights reserved.