2019 - 1 、 CentOS 7 + Tengine 설치2_3_2(Nginx 1_17_0)
배경
최신 소프트웨어 를 사용 하면 bug 를 처리 할 수 있 습 니 다. 글 은 CentOS 6 에 대해 소개 하지 않 습 니 다 (사용 하지 않 습 니 다)
Tengine 을 추천 합 니 다. 타 오 바 오 재 활용 이 유 는 Nginx 와 호 환 되 어 수시로 전환 할 수 있 기 때 문 입 니 다.
Tengine - 2.3.0 + 소개
Github: Tengine: 【Star:9.2K】
https://github.com/alibaba/tengine
텐 진 은 타 오 바 오 에서 시 작 된 웹 서버 프로젝트 입 니 다.이 는 Nginx 를 바탕 으로 큰 방문 사이트 의 수요 에 따라 고급 기능 과 특성 을 많이 추가 했다.텐 진의 성능 과 안정성 은 이미 대형 사이트 인 타 오 바 오, 티몰 등에 서 좋 은 검 사 를 받 았 다.그것 의 최종 목 표 는 효율 적 이 고 안정 적 이 며 안전 하 며 사용 하기 쉬 운 웹 플랫폼 을 만 드 는 것 이다.
Nginx - 1.17.3 + 소개
Github: Nginx: 【Star:9.8K】
https://github.com/nginx/nginx
Nginx 는 고성능 웹 과 역방향 프 록 시 서버 로 매우 좋 은 특성 을 가지 고 있 습 니 다.
설치 명령 - \ # 사용 하 는 루트 권한
환경 정보 검사
[root@ip104 ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core) 1. 설치 패 키 지 를 다운로드 (오프라인 또는 온라인 방식 사용)
1.1 [오프라인 방식 자체 다운로드]
# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz 
# wget http://zlib.net/zlib-1.2.11.tar.gz 
# wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
# wget http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2
# wget http://tengine.taobao.org/download/tengine-2.3.0.tar.gz1.2 【 온라인 방식 】 (추천 방식, Centos 7 네트워크 자동 다운로드 설정)
yum install gcc-c++
yum -y install pcre pcre-devel 
yum -y install zlib zlib-devel
yum -y install openssl openssl-devel1.3 【 작업 로그 미리 보기 】
1.3.1 [yum install gcc - c + +] y 를 한 번 입력 하고 계속 다운로드 하여 설치 해 야 합 니 다.
[root@ip104 ~]#  yum install gcc-c++
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
..............................  ,      y       ............................
Total download size: 31 M
Is this ok [y/d/N]: y
Downloading packages:
..............................  ............................
Complete!1.3.2 【yum -y install pcre pcre-devel 】
[root@ip104 ~]# yum -y install pcre pcre-devel 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
..............................  ............................
Complete!
1.3.3【yum -y install zlib zlib-devel】
[root@ip104 ~]#  yum -y install zlib zlib-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package zlib-1.2.7-18.el7.x86_64 already installed and latest version
.............................  ............................
Complete!
1.3.4【yum -y install openssl openssl-devel】
[root@ip104 ~]#  yum -y install openssl openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
..............................  ............................
Complete!2. 압축 해제 패키지 및 소프트웨어 설치 (오프라인 또는 온라인 방식 사용)
2.1 다운로드 Tengine
 cd /usr/local/src/
 
 wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz
 
 ls2.2 압축 풀기 컴 파일 생 성 (하나씩)
tar -zxvf tengine-2.3.2.tar.gz
cd /usr/local/src/tengine-2.3.2
./configure 
make
sudo make install
2.3 압축 해제 패키지
[root@ip104 ~]# cd /usr/local/src/
[root@ip104 src]#  wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz
--2019-10-01 12:37:03--  http://tengine.taobao.org/download/tengine-2.3.2.tar.gz
Resolving tengine.taobao.org (tengine.taobao.org)... 140.205.172.18
Connecting to tengine.taobao.org (tengine.taobao.org)|140.205.172.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2835884 (2.7M) [application/octet-stream]
Saving to: ‘tengine-2.3.2.tar.gz’
100%[==============================================>] 2,835,884    531KB/s   in 5.3s   
2019-10-01 12:37:08 (521 KB/s) - ‘tengine-2.3.2.tar.gz’ saved [2835884/2835884]
[root@ip104 src]# ls
tengine-2.3.2.tar.gz 
2.4 작업 로그 미리 보기
--------     --------
[root@ip104 tengine-2.3.2]# cd /usr/local/src/
[root@ip104 src]# ls
rarlinux-x64-5.4.0.tar.gz  tengine-2.3.2  tengine-2.3.2.tar.gz
[root@ip104 src]# 
--------    --------
[root@ip104 tengine-2.3.2]# cd /usr/local/src/tengine-2.3.2
[root@ip104 tengine-2.3.2]# ls
AUTHORS.te  CHANGES.cn  configure  html      man      packages         tests
auto        CHANGES.te  contrib    LICENSE   modules  README.markdown  THANKS.te
CHANGES     conf        docs       Makefile  objs     src
[root@ip104 tengine-2.3.2]# 3. Tengine 설정 및 실행
Tengine 은 Nginx 를 완전히 호 환 하기 때문에 Nginx 방식 을 참조 하여 Tengine 을 설정 할 수 있 습 니 다.텐 진 에서 주의 할 만 한 기능 만 보 여 줍 니 다.상세 한 Tengine 의 Nginx 에 대한 차 이 는 변경 목록 에 접근 할 수 있 습 니 다.
3.1 백그라운드 서비스 설정
vi /lib/systemd/system/nginx.service 
#   Tengine config
[Unit]
Description=The nginx HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
------  nginx  
systemctl start nginx.service
------       
systemctl enable nginx.service
------       
# systemctl disable nginx.service
------        
systemctl status nginx.service
------      
systemctl restart nginx.service
------          
systemctl list-units --type=service3.2 작업 로그
[root@ip104 src]# vi /lib/systemd/system/nginx.service 
[root@ip104 src]# systemctl start nginx.service
[root@ip104 src]# systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-10-01 13:09:43 CST; 7s ago
  Process: 8441 ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf (code=exited, status=0/SUCCESS)
  Process: 8439 ExecStartPre=/usr/local/nginx/sbin/nginx -t (code=exited, status=0/SUCCESS)
 Main PID: 8444 (nginx)
    Tasks: 2
   Memory: 1.5M
   CGroup: /system.slice/nginx.service
           ├─8444 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/ngi...
           └─8445 nginx: worker process
Oct 01 13:09:43 ip104 systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 01 13:09:43 ip104 nginx[8439]: nginx: the configuration file /usr/local/nginx/... ok
Oct 01 13:09:43 ip104 nginx[8439]: nginx: configuration file /usr/local/nginx/conf...ful
Oct 01 13:09:43 ip104 systemd[1]: Started The nginx HTTP and reverse proxy server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@ip104 src]# 
여기 서 끝 났 습 니 다. 다음 명령 을 보면 성공 적 으로 설정 되 었 음 을 표시 합 니 다.
                            Welcome to tengine!
              If you see this page, the tengine web server is successfully 
              installed and working. Further configuration is required.
              For online documentation and support please refer to tengine.taobao.org.
              Thank you for using tengine.
4, 관련 작업 명령, 확장 설치 Nginx
4.1 PCRE 소개 (http://www.pcre.org/)
PCRE 다운로드 주소:ftp://ftp.pcre.org/pub/pcre/
https://ftp.pcre.org/pub/pcre/
4.2 설치 팩 다운로드, 압축 해제 소프트웨어, 컴 파일 설치
[root@ip104 src]# cd /usr/local/src/
[root@ip104 src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
[root@ip104 src]# tar zxvf pcre-8.35.tar.gz
[root@ip104 src]# cd pcre-8.35
[root@ip104 pcre-8.35]# ./configure
[root@ip104 pcre-8.35]# make && make install4.3 Nginx 설치
[root@ip104 src]# cd /usr/local/src/
[root@ip104 src]# wget http://nginx.org/download/nginx-1.6.2.tar.gz
[root@ip104 src]# tar zxvf nginx-1.6.2.tar.gz
[root@ip104 src]# cd nginx-1.6.2
[root@ip104 nginx-1.6.2]# ./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.35
[root@ip104 nginx-1.6.2]# make
[root@ip104 nginx-1.6.2]# make install
 4.3 Nginx 와 Tenginx 프로필
vi /usr/local/nginx/conf/nginx.conf
server {
    listen        80;
    server_name   example.com *.example.com;
    location / {
        proxy_pass         http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection keep-alive;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
    }
}
--    
systemctl restart nginx
--    
systemctl status nginx4.4 Nginx 와 Tenginx 설정 조회
[root@ip104 ~]# cd /usr/local/nginx/sbin
[root@ip104 sbin]# ./nginx -V
Tengine version: Tengine/2.3.2
nginx version: nginx/1.17.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments:
[root@ip104 sbin]# 기타 설명
관련 자원 추가 업데이트
Linux 상용 명령
touch .bash_profile。      
java -verbose-  jdk    
java -version-  jdk  
vim-  
pwd-        
su root -   root 
netstat -ntlp //      tcp  
ps -ef | grep //     
ps           
다음으로 전송:https://www.cnblogs.com/sopcce/p/2019_1_CentOS_7_6_Install_Tengine_2_3_2_Nginx_1_17_3.html
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.