1.安装前准备:
apt install build-essential
apt install libpcre3-dev libpcre3 libssl-dev libssl1.0.0
2.下载jemalloc,https://github.com/jemalloc/jemalloc/releases
3.安装 jemalloc
tar jxvf jemalloc-4.3.0.tar.bz2
cd jemalloc-4.3.0
./configure
make
make install
pwd
获得jemalloc的当前路径,一会儿要用。
4.下载tengine,http://tengine.taobao.org/download_cn.html
tengine-2.1.2.tar.gz:http://tengine.taobao.org/download/tengine-2.1.2.tar.gz
MD5码: 7f898a0dbb5162ff1eb19aeb9d53bec3
5.安装Tengine
tar zxvf tengine-2.1.2.tar.gz
cd tengine-2.1.2
./configure --with-jemalloc=jemalloc的地址(刚才pwd命令返回的结果)
make
make install
6.配置,下载nginx服务文件,下载地址 https://github.com/JasonGiedymin/nginx-init-ubuntu
cd /etc/init.d
wget https://raw.githubusercontent.com/JasonGiedymin/nginx-init-ubuntu/master/nginx
chmod +x /etc/init.d/nginx
update-rc.d -f nginx defaults
service nginx start
7.查看80端口,是否正常启动,剩下的就是配置Tengine服务器了。