在编译nginx之前,需要先下载编译安装好zlib、openssl、pure库
zlib
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar xf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make && make install
openssl
参考:https://blog.csdn.net/qq_39720249/article/details/84655501
wget https://www.openssl.org/source/openssl-1.0.1o.tar.gz
tar xf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
./config
make && make install
pcre
wget https://nchc.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.tar.gz
tar xf pcre-8.42.tar.gz
cd pcre-8.42
./configure
make && make install
libxml2/libxslt libraries
sudo apt-get install libxml2 libxml2-dev libxslt-dev
若遇到 libssl-dev : Depends: libssl1.1
https://blog.csdn.net/andy812110/article/details/24842219
nginx
wget http://nginx.org/download/nginx-1.7.3.tar.gz
rtmp模块
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
如果没有unzip,先下载
apt-get install unzip
解压包
tar xvf nginx-1.7.3.tar.gz
unzip master.zip
进入 nginx目录
cd nginx-1.7.3
prefix指定nginx安装目录,将nginx-rtmp-module-master 载入nginx , 指定openssl pcre zlib 地址
1.
./configure
--prefix=/usr/local/nginx
--with-http_ssl_module
--with-http_xslt_module
--with-http_flv_module
--with-debug
--with-http_gzip_static_module
--with-pcre=/usr/local/src/pcre-8.42
--with-openssl=/usr/local/src/openssl-1.0.1o
--add-module=../nginx-http-flv-module
复制这个:
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_xslt_module --with-http_flv_module --with-debug --with-http_gzip_static_module --with-pcre=/usr/local/src/pcre-8.42 --with-openssl=/usr/local/src/openssl-1.0.1o --add-module=../nginx-http-flv-module
2.
make
3.
make install
启动:
cd /usr/local/nginx/sbin
./nginx
若需要推流http-flv ,则需要重新编译nginx配合 nginx-http-flv-module使用
git 地址:https://github.com/winshining/nginx-http-flv-module
码云地址:https://gitee.com/winshining/nginx-http-flv-module
nginx-http-flv-module 同时集成了 rtmp 和 http-flv的功能。
不同之处: add module 改为 nginx-http-flv-module
== mysql 5.7版本出现 group by ( sql_mode=only_full_group_by )==
1. 修改mysql配置文件
进入 /etc/mysql/mysql.conf.d/mysqld.cnf
添加
sql_mode =‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’
重启
== /etc/init.d/mysql restart ==
升级nginx才能 --with-stream
wget http://nginx.org/download/nginx-1.14.1.tar.gz
安装stream模块
wget https://github.com/yaoweibin/nginx_upstream_check_module/archive/master.zip
http://www.mamicode.com/info-detail-1346899.html