在linux Red Hat 7.6 7.8部署keepalived + nginx 高可用集群。
安装版本包,版本包存放路径/home/vlog/nginx
keepalived-2.1.5.tar.gz
nginx-1.11.0.tar.gz
nginx-1.11.0.tar.gz
zlib-1.2.11.tar.gz
openssl-1.0.2k.tar.gz
pcre-8.38.tar.gz
nginx-sticky-module.tar.gz
openssl-1.1.1g.tar.gz
一、安装nginx
在root用户下开始安装nginx
# 从VLOG用户切换到root用户
[vlog@hostname]$ su root
Password:
# 1、安装zlib
[root@hostname]$ cd /home/vlog/nginx
[root@hostname]$ tar -xvf zlib-1.2.11.tar.gz
[root@hostname]$ cd zlib-1.2.11
[root@hostname]$ ./configure
[root@hostname]$ make
[root@hostname]$ make install
# 2、安装openssl
[root@hostname]$ cd /home/vlog/nginx
[root@hostname]$ tar -xvf openssl-1.0.2k.tar.gz
[root@hostname]$ cd openssl-1.0.2k
[root@hostname]$ ./config
[root@hostname]$ make
[root@hostname]$ make install
# 3、安装Pcre
[root@hostname]$ cd /home/vlog/nginx
[root@hostname]$ tar -xvf pcre-8.38.tar.gz
[root@hostname]$ cd pcre-8.38
[root@hostname]$ ./configure
[root@hostname]$ make
[root@hostname]$ make install
# 4、安装nginx
[root@hostname]$ cd /home/vlog/nginx
# 4.1解压nginx-sticky-module.tar.gz
[root@hostname]$ tar -xvf nginx-sticky-module.tar.gz
# 4.2重命名nginx-sticky-module文件夹
[root@