Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ CentOS 7 x64 compiler installation Tengine 2.0.3 Comments     - Remote database using RMAN recovery test (RAC return to single-instance database) (Database)

- Redis Linux system installation guide (Database)

- How to manage start-up applications in Ubuntu (Linux)

- Python type way of comparison (Programming)

- Installation Sublime Text 3 (Build 3065) text editor in Ubuntu (Linux)

- Red Hat Enterprise Linux configuration VNC multi-user access methods (Linux)

- ACL permissions Linux command (Linux)

- Java Foundation - implicit conversion vs cast (Programming)

- UNIX and class UNIX system security check notes (Linux)

- Sshuttle A VPN-based transparent proxy that uses ssh (Server)

- Linux crontab use (Linux)

- Ubuntu FAQ solutions (Linux)

- SSH service configuration to use a certificate login Linux server (Server)

- Ubuntu rights management common commands (Linux)

- MySQL 5.7 can not log in problem (Database)

- to install the deployment of LVS under CentOS 7.0 (Server)

- Ansible module Know (Linux)

- Ubuntu file security removal tool (Linux)

- Git Tutorial Comments (Linux)

- vector C ++ sequence containers (Programming)

 
         
  CentOS 7 x64 compiler installation Tengine 2.0.3 Comments
     
  Add Date : 2017-08-31      
         
       
         
  Surroundings:

Hardware: VMware vsphere (CPU: 2 * 4-core, memory 2G)

System version: CentOS Linux release 7.0.1406

installation steps:

1. System Environment

1.1 Updating System

[Root @ centos ~] # yum update -y

1.2 viewing environment

[Root @ centos ~] # cat / etc / RedHat-release

CentOS Linux release 7.0.1406 (Core)

[Root @ centos ~] # uname -a

Linux tengine 3.10.0-123.4.2.el7.x86_64 # 1 SMP Mon Jun 30 16:09:14 UTC 2014 x86_64 x86_64 x86_64 GNU / Linux

2. Install tengine

2.1. Preparing to Install

[Root @ centos ~] # cd / usr / local / src /

Download pcre-8.35.tar.gz to / usr / local / src

[Root @ centos ~] # wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz

Download zlib-1.2.8.tar.gz to / usr / local / src

[Root @ centos ~] # wget http://zlib.net/zlib-1.2.8.tar.gz

Download openssl-1.0.1h.tar.gz to / usr / local / src

[Root @ centos ~] # wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz

Download jemalloc-3.6.0.tar.bz2 to / usr / local / src

[Root @ centos ~] # wget http://www.canonware.com/download/jemalloc/jemalloc-3.6.0.tar.bz2

Download tengine-2.0.3.tar.gz to / usr / local / src

[Root @ centos ~] # wget http://tengine.taobao.org/download/tengine-2.0.3.tar.gz



2.2 update package

[Root @ centos ~] # yum install zlib-devel openssl-devel -y

2.3 Installation Pcre

[Root @ centos ~] # cd / usr / local / src /

[Root @ centos ~] # tar zvxf pcre-8.35.tar.gz

[Root @ centos ~] # cd pcre-8.35

[Root @ centos ~] # ./configure

[Root @ centos ~] # make && make install

2.4 Install openssl

[Root @ centos ~] # cd / usr / local / src /

[Root @ centos ~] # tar zvxf openssl-1.0.1h.tar.gz

[Root @ centos ~] # cd openssl-1.0.1h

[Root @ centos ~] # ./config

[Root @ centos ~] # make && make install

2.5 install zlib

[Root @ centos ~] # cd / usr / local / src /

[Root @ centos ~] # tar zlib-1.2.8.tar.gz

[Root @ centos ~] # cd zlib-1.2.8

[Root @ centos ~] # ./configure

[Root @ centos ~] # make && make install

2.6 Installation jemalloc

[Root @ centos ~] # cd / usr / local / src /

[Root @ centos ~] # tar zvxf jemalloc-3.6.0

[Root @ centos ~] # cd jemalloc-3.6.0

[Root @ centos ~] # ./configure

[Root @ centos ~] # make && make install

[Root @ centos ~] # echo '/ usr / local / lib'> /etc/ld.so.conf.d/local.conf

[Root @ centos ~] # ldconfig

4.4 Creating www users and groups, creating www virtual directory used by the host, and log directory Nginx use, and give them proper permissions

[Root @ centos ~] # groupadd www

[Root @ centos ~] # useradd -g www www

[Root @ centos ~] # mkdir -p / data / www

[Root @ centos ~] # chmod + w / data / www

[Root @ centos ~] # chown -R www: www / data / www

4.5 Installation tengine

[Root @ centos ~] # cd / usr / local / src /

[Root @ centos ~] # tar zvxf tengine-2.0.3.tar.gz

Camouflage server information (can not modify)

[Root @ centos ~] # cd nginx-1.6.0 / src / core

[Root @ centos ~] # vim ./src/core/nginx.h

Modify NGINX_VERSION you want to display the version number

Modify the name you want to display NGINX_VER

Modify the name you want to display NGINX_VAR

Save

Start the installation NGINX

./configure --prefix = / opt / nginx --user = www --group = www --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl = / usr / local / src / openssl -1.0.1h --with-zlib = / usr / local / src / zlib-1.2.8 --with-pcre = / usr / local / src / pcre-8.35 --with-jemalloc

[Root @ centos ~] # make && make install

4.6 modify nginx.conf

[Root @ centos ~] # vim /opt/nginx/conf/nginx.conf

Modify the previous behavior:

user www www;
worker_processes 4;
error_log logs / error.log crit;
pid logs / nginx.pid;
events {
use epoll;
worker_connections 65535;
}

4.7 Test and run

[Root @ centos ~] # cd / opt / nginx

[Root @ centos ~] # ldconfig

[Root @ centos ~] # ./sbin/nginx -t

If the following message, it means that the configuration is no problem

nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /opt/nginx/conf/nginx.conf test is successful

Enter the code to run nginx service

[Root @ centos ~] # ./sbin/nginx

[Root @ centos ~] # ps au | grep nginx

If the order was similar to the following message that indicates nginx has been started

root 2013 0.0 0.0 103156 856 pts / 0 S + 03:22 0:00 grep nginx



Enter the code detection supports Accelerated

Check whether the entry into force

[Root @ centos ~] # lsof -n | grep jemalloc

ginx 2346 root mem REG 253,1 1824470 51571788 /usr/local/lib/libjemalloc.so.1
nginx 2347 www mem REG 253,1 1824470 51571788 /usr/local/lib/libjemalloc.so.1
nginx 2348 www mem REG 253,1 1824470 51571788 /usr/local/lib/libjemalloc.so.1
nginx 2349 www mem REG 253,1 1824470 51571788 /usr/local/lib/libjemalloc.so.1
nginx 2350 www mem REG 253,1 1824470 51571788 /usr/local/lib/libjemalloc.so.1

[Root @ centos ~] # curl http: // localhost

4.8 open firewall port 80

# Stop firewall

[Root @ centos ~] # systemctl stop firewalld.service

# Disable firewall boot

[Root @ centos ~] # systemctl disable firewalld.service

Install iptables

[Root @ centos ~] # yum install iptables-services

Set up firewall rules (increase port 80)

[Root @ centos ~] # vim / etc / sysconfig / iptables

Open the file, and add the line port 80

* Filter
: INPUT ACCEPT [0: 0]
: FORWARD ACCEPT [0: 0]
: OUTPUT ACCEPT [0: 0]
-A INPUT -m state --state RELATED, ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

: Wq # Save and exit

# Restart firewall configuration to take effect

[Root @ centos ~] # systemctl restart iptables.service

# Set the boot

[Root @ centos ~] # systemctl enable iptables.service

 4.9 As a service, after start-up

[Root @ centos ~] # vim /usr/lib/systemd/system/tengine.service

Add the following

[Unit]
Description = The nginx HTTP and reverse proxy server
After = syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type = forking
PIDFile = / opt / nginx / logs / nginx.pid
ExecStartPre = / opt / nginx / sbin / nginx -t
ExecStart = / opt / nginx / sbin / nginx
ExecReload = / bin / kill -s HUP $ MAINPID
ExecStop = / bin / kill -s QUIT $ MAINPID
PrivateTmp = true

[Install]
WantedBy = multi-user.target

: Wq to save and exit

 [Root @ centos ~] # systemctl stop tengine

 [Root @ centos ~] # systemctl start tengine

 [Root @ centos ~] # systemctl reload tengine

 [Root @ centos ~] # systemctl enable tengine

 [Root @ centos ~] # shutdown -r now
     
         
       
         
  More:      
 
- CentOS / Linux restart active NIC connection paths / network configure error Error Resolution (Linux)
- C ++ pointer of the (error-prone model) (Programming)
- Docker deployment practices in Ubuntu (Server)
- Ubuntu uses the / etc / profile file to configure the JAVA environment variable (Linux)
- Install Ruby on Rails in Ubuntu 15.04 in (Linux)
- Linux System Getting Started Learning: Disable Ubuntu Apport internal error reporting procedures (Linux)
- Use innobackupex full realization of MySQL hot backup (Database)
- MongoDB 3.2 to upgrade from 3.0.7 (Database)
- Installation of Python2.7.10 under CentOS 6.4 (Linux)
- The next key to install Linux bash script PowerShell (Linux)
- To build a private Docker registry (Server)
- The most common and most effective security settings under linux (Linux)
- C ++ containers (Programming)
- Ubuntu 12.04 64bit Install Source Insight 3.5 and create desktop icons (Linux)
- Packages with Snort intrusion monitoring light (Linux)
- How to modify the Emacs Major Mode Shortcuts (Linux)
- Java how to achieve bubble sort the problem Arraylist (Programming)
- OpenCV cvFindCornerSubPix () to find sub-pixel Corner (Programming)
- How to use the Vault secure password storage and API key (Linux)
- Present Situation and Development Trend of firewall products (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.