avatar
Published on

리눅스 Nginx 설치

Authors
  • avatar
    Name
    Haneul
    Twitter

리눅스 Nginx 설치

centos6

vi /etc/yum.repos.d/nginx.repo

\[nginx\]

name=nginx repo

baseurl=http://nginx.org/packages/centos/6/@basearch

gpgcheck=0

enabled=1

위 처럼 저장 후,

yum install nginx

nginx -v

시작 : nginx

종료 : nginx -s stop


NGINX install support tls v1.3 in CentOS 7

0. Prerequisites openssl 1.1.1

OpenSSL 1.1.1a upgrade for CentOS 7

1. Install redhat-lsb-core

yum install redhat-lsb-core

yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel pcre-devel

2. User add

useradd builder
groupadd builder

3. download

wget http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-1.15.8-1.el7_4.ngx.src.rpm

4. Configuration

rpm -ivh nginx-1.15.8-1.el7_4.ngx.src.rpm
sed -i “s|–with-http_ssl_module|–with-http_ssl_module –with-openssl=/usr/local/src/openssl-1.1.1a –with-openssl-opt=enable-tls1_3 |g” /root/rpmbuild/SPECS/nginx.spec

5. Compile

rpmbuild -ba /root/rpmbuild/SPECS/nginx.spec

6. Install

rpm -ivh /root/rpmbuild/RPMS/x86_64/nginx-1.15.8-1.el7_4.ngx.x86_64.rpm

7. Check version

nginx -v

8. Reference

How to Enable TLS 1.3 in Chrome, Safari and Firefox?