负载均衡服务器Nginx安装教程
来源:互联网 发布:mac卸载 landesk 编辑:程序博客网 时间:2024/06/11 19:43
【keepalived安装】
下载keepalived到/usr/local/src
tar -xzvf keepalived-1.2.19.tar.gz
cd /usr/local/src/keepalived-1.2.19
配置
./configure –prefix=/usr/local/keepalived
编译
make && make install
复制建立服务启动脚本,以便使用service命令控制之:
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/
chmod +x /etc/init.d/keepalived
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
mkdir /etc/keepalived
cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
启动keepalived
service keepalived start|stop
【nginx安装】
nginx安装之前要先安装pcre、openssl、zlib
注意:./configure –prefix=/usr/local/keepalived
configure:error:!!! OpenSSL is not properly installed on your system. !!!
!!! Can not include OpenSSL headers files.
解决方法:安装openssl,同时pcre也一起安装一下,gcc、zlib没有安装也可以安装一下
yum -y install pcre pcre-devel openssl openssl-devel zlib* gcc
解压
下载nginx到/usr/local/src
tar -xzvf nginx-1.11.4.tar.gz
cd nginx-1.11.4
执行配置文件
./configure
编译
make && make install
启动
cd /usr/local/nginx/sbin
./nginx
重启
cd /usr/local/nginx/sbin
./nginx -s reload
检验配置文件是否正确
检验:
ps -ef|grep nginx
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
或者
cd /usr/local/nginx/sbin
./nginx -t
- 负载均衡服务器Nginx安装教程
- 负载均衡服务器nginx安装
- Nginx 负载均衡服务器
- nginx服务器负载均衡配置
- nginx服务器搭建负载均衡
- Nginx服务器(负载均衡)
- nginx高负载均衡服务器
- nginx服务器安装并简单实现负载均衡
- 安装 Nginx 配置负载均衡
- NGINX安装及负载均衡
- Centos 安装 Nginx 负载均衡
- nginx负载均衡篇一、nginx安装
- 安装nginx和 nginx负载均衡
- 关于Nginx负载均衡的详解教程
- 服务器数据库系列 - Nginx 负载均衡配置
- 服务器数据库系列 - 解析nginx负载均衡
- Nginx+tomcat负载均衡缓存服务器集群
- 使用 Nginx 创建服务器的负载均衡
- sql server 存储过程用到的知识
- 计算机网络读书笔记
- 支持向量机简明教程及其在python和R下的调参
- This application requires Visual Studio 2013 Redistributable. Please install the Redistributable the
- 探索深入理解java虚拟机之线程安全与锁优化(8)
- 负载均衡服务器Nginx安装教程
- protobuf-java中的一些小技巧
- rails之自定义Rake任务
- VB文件系统编程中的input/line input,print和write语句相同点和区别
- 开放式授权OAuth
- 希尔排序
- 设计模式【传输对象模式TransferObjectPattern】
- C++高级编程 第十三章: 有效的内存管理
- 位运算