创建develop目录
mkdir /usr/local/develop/
cd /usr/local/develop
下载
wget http://nginx.org/download/nginx-1.17.4.tar.gz
yum install git
git clone https://github.com/arut/nginx-rtmp-module.git
解压文件
tar zxmf nginx-1.17.4.tar.gz
进入解压目录
cd nginx-1.17.4/
安装编译工具及依赖库 都安装成功后再次执行会有下面提示
yum -y install gcc pcre-devel zlib-devel openssl-devel libxml2-devel libxslt-devel gd-devel GeoIP-devel jemalloc-devel libatomic_ops-devel perl-devel perl-ExtUtils-Embed
./configure --add-module=/usr/local/develop/nginx-rtmp-module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-stream_ssl_preread_module --with-compat --with-pcre-jit
make && make install
编译后默认安装目录为 /usr/local/nginx
cd /usr/local/nginx
mkdir cert
将ssl证书放进去
vim /usr/local/nginx/conf/nginx.conf
server {
listen 80;
#填写证书绑定的域名
server_name www.aaaa.com;
#将所有HTTP请求通过rewrite指令重定向到HTTPS。
rewrite ^(.*)$ https://$host$1;
location / {
index index.html index.htm;
}
}
server {
#HTTPS的默认访问端口443。
#如果未在此处配置HTTPS的默认访问端口,可能会造成Nginx无法启动。
listen 443 ssl;
#填写证书绑定的域名
server_name www.aaaa.com;
#填写证书文件绝对路径
ssl_certificate cert/<cert-file-name>.pem;
#填写证书私钥文件绝对路径
ssl_certificate_key cert/<cert-file-name>.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
#自定义设置使用的TLS协议的类型以及加密套件(以下为配置示例,请您自行评估是否需要配置)
#TLS协议版本越高,HTTPS通信的安全性越高,但是相较于低版本TLS协议,高版本TLS协议对浏览器的兼容性较差。
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
#表示优先使用服务端加密套件。默认开启
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
cd /usr/local/nginx/sbin
./nginx
安装JDK
cd /usr/local/develop
tar -zxvf /usr/local/develop/jdk-8u191-linux-x64.tar.gz -C /usr/local/develop/
配置JAVA_HOME
1.系统环境
vim /etc/profile
到最下面
export JAVA_HOME=/usr/local/develop/jdk1.8.0_191
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib
让环境变量生效
source /etc/profile
java -version 查看jdk版本 至此JDK安装完成
安装Redis
cd /usr/local/develop
tar -zxvf /usr/local/develop/redis-6.2.14.tar.gz -C /usr/local/develop
cd /usr/local/develop/redis-6.2.14
make install PREFIX=/usr/local/redis
cd /usr/local/redis/bin
cp /usr/local/develop/redis-6.2.14/redis.conf /usr/local/redis/bin/
vim /usr/local/redis/bin/redis.conf
cd /usr/local/redis/bin
启动redis
./redis-server /usr/local/redis/bin/redis.conf