2024年11月Linux系统下使用FPM制作RPM的方法(2)

发布时间:

  ⑴、打包tengine

  ⑵# mkdir /tmp/tengine

  ⑶# cd /usr/local/src

  ⑷# wget -O lua-nginx-module-...tar.gz

  ⑸# tar xvzf lua-nginx-module-...tar.gz

  ⑹# tar xvzf tengine-...tar.gz

  ⑺# cd tengine-..

  ⑻# 。/configure --prefix=/opt/share/nginx

  ⑼--sbin-path=/opt/sbin/nginx

  ⑽--conf-path=/opt/etc/nginx/nginx.conf

  ⑾--error-log-path=/opt/log/nginx/error.log

  ⑿--http-log-path=/opt/log/nginx/aess.log

  ⒀--user=nginx

  ⒁--group=nginx

  ⒂--http-client-body-temp-path=/opt/lib/nginx/tmp/client_body

  ⒃--http-proxy-temp-path=/opt/lib/nginx/tmp/proxy

  ⒄--http-uwsgi-temp-path=/opt/lib/nginx/tmp/uwsgi

  ⒅--pid-path=/opt/run/nginx.pid

  ⒆--lock-path=/opt/lock/subsys/nginx

  ⒇--with-http_ssl_module

  ⒈--with-http_realip_module

  ⒉--with-http_addition_module

  ⒊--with-http_gzip_static_module

  ⒋--with-http_gunzip_module

  ⒌--with-http_secure_link_module

  ⒍--with-http_stub_status_module

  ⒎--with-http_sysguard_module

  ⒏--with-file-aio

  ⒐--add-module=。。/lua-nginx-module-..

  ⒑--with--opt=‘-g -O -fstack-protector --param=ssp-buffer-size= -Wformat -Werror=format-security’

  ⒒--with-ld-opt=‘-Wl,-Bsymbolic-functions -Wl,-z,relro’

  ⒓# make install DESTDIR=/tmp/tengine

  ⒔# cd /tmp/tengine/opt

  ⒕# mkdir -p lib/nginx/tmp/{client_body,proxy,uwsgi}

  ⒖# mkdir -p lock/subsys/nginx

  ⒗# cd /tmp/tengine

  ⒘# mkdir etc/rc.d/init.d

  ⒙# cp /etc/rc.d/init.d/nginx etc/rc.d/init.d

  ⒚# mkdir etc/logrotate.d

  ⒛# cp /etc/logrotate.d/nginx etc/logrotate.d

  ①# mkdir tmp

  ②安装之前所要运行的脚本

  ③# vim tmp/install_before.sh

  ④#!/bin/bash

  ⑤[[ -n `ps aux|grep ngin[x]` ]] && killall - nginx

  ⑥[[ -e /opt/etc/nginx ]] && cp -a /opt/etc/nginx/ /opt/etc/nginx_$(date +%F_%H-%M-%S