环境准备
服务器系统 | Centos7.3 |
---|---|
内存 | 1G |
CPU | 2核 |
IP地址 | 10.0.0.41 |
服务 | Ansible管理主机 |
服务器系统 | Centos7.3 |
---|---|
内存 | 1G |
CPU | 2核 |
IP地址 | 10.0.0.42 |
服务 | httpd |
服务器系统 | Centos7.3 |
---|---|
内存 | 1G |
CPU | 2核 |
IP地址 | 10.0.0.43 |
服务 | httpd |
服务器系统 | Centos7.3 |
---|---|
内存 | 1G |
CPU | 2核 |
IP地址 | 10.0.0.44 |
服务 | nginx |
在41Ansible管理主机上操作,我们需要准备nginx源码包和配置文件
mkdir nginx
cd nginx/
tar zxf nginx-1.12.0.tar.gz
cd nginx-1.12.0/conf/
cp nginx.conf ../../
cd -
rm -rf nginx-1.12.0
vim nginx.conf
vim nginx.yml