Armbian 安装 Tengine

安装依赖

# 安装PCRE库
$ sudo apt-get install libpcre3 libpcre3-dev

# 安装zlib库
$ sudo apt-get install zlib1g-dev

下载 Tengine 源码

$ wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz
$ tar -zxf tengine-2.3.3.tar.gz
$ cd tengine-2.3.3
$ ./configure --with-http_ssl_module
$ make & make install

添加 nginx 系统服务

  1. 建立服务文件
$ vi /lib/systemd/system/nginx.service
  1. 复制如下内容写入到nginx.service中
[Unit]
Description=nginx - high performance web server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
PrivateTmp=true
[Install]
WantedBy=multi-user.target
  1. 使文件生效
$ systemctl daemon-reload
  1. 启动 nginx 并设置开机自启
# 启动nginx
$ systemctl start nginx

# 设置开机自启
$ systemctl enable nginx

# 查看运行状态
$ systemctl status nginx
# Linux 

评论

Linux
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×