Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ CentOS 7 x64 compiler installation Tengine 2.0.3 Comments     - Cobbler automatic mass deployment of CentOS 6 and CentOS 7 (Linux)

- Open log in Hibernate (Programming)

- After installing minimize RHEL / CentOS 7 we need to do (Linux)

- Oracle database file path changes (Database)

- Proxmox VE implement KVM OpenVZ virtualization cloud computing (Server)

- Differential test piece using MongoDB performance YCSB (Database)

- Linux software firewall ACL match point optimization (Linux)

- Bubble Sort Algorithms (Programming)

- Python, and / or (Programming)

- Zabbix monitors the status of TCP connections (Server)

- How to install OpenOffice Ubuntu or Linux Mint (Linux)

- Kitematic how seamless and DockerFILE (Server)

- CentOS 6.5 using Virtualenv under development environment to build Python3 (Linux)

- Linux Apache server configure to protect system security (Linux)

- 30 Practical Linux system administrators will learn the command (Linux)

- JDK comes with tools JPS (Linux)

- Terminal fun: 6 interesting Linux command-line tools (Linux)

- CentOS7 virtual machine starts appear Permission denied (Linux)

- Security Knowledge: How to hide a backdoor PHP file tips (Linux)

- Analysis of memory mapping process in Linux x86-64 mode (Linux)

 
         
  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:      
 
- Firewall chapter of Linux server security configuration (Linux)
- Install Visual Studio Code in Ubuntu (Linux)
- Ubuntu 14.04 solved using MyEclipse 10.7 flash back (Linux)
- Oracle Execute to Parse perform analytical Ratio Analysis (Database)
- Android and OpenCV2.4.4 build an image processing framework (2013 edition) (Linux)
- Configuring Android NDK development environment for Mac OS X (Linux)
- php How to prevent being injected (Linux)
- TeamCity continuous integration in the Linux installation (Linux)
- using the ssh command to check the socket / Network Connections (Linux)
- SQL Beginner Guide (Database)
- CentOS 7 update source - the use of domestic sources 163 yum (Linux)
- Linux hard drive failure Case Studies (Linux)
- Troubleshooting Linux virtual machine device id and the letter of inconsistencies (Linux)
- Ubuntu and derivative users to install the system launcher SimDock 1.3 (Linux)
- 11 examples in Linux df command (Linux)
- Ubuntu 12.04 64-bit installation Redmine + Git + ReviewBoard (Linux)
- MySQL development common query summary (Database)
- Install Ubuntu 14.04 and Windows 8 / 8.1 dual-boot in UEFI mode (Linux)
- To install MySQL on Linux (Database)
- Kubernetes cluster deployment (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.