**nginx 설치**
1. repository 등록
vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
2. 설치
yum -y install nginx
3. status 확인가능하도록 변경
vi /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name localhost;
charset UTF-8;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
pcs resource create nginxWeb ocf:heartbeat:nginx configfile=/etc/nginx/nginx.conf status10url op monitor interval=5s
pcs property set default-resource-stickiness="10"
pcs constraint order virtual_ip then nginxWeb
pcs constraint colocation add nginxWeb virtual_ip INFINITY
'Programming > Linux' 카테고리의 다른 글
scp(secure copy) 사용법 (0) | 2017.06.08 |
---|---|
[CentOS] Server HA - 3. pacemaker 설치, VIP설정 (0) | 2017.06.02 |
[CentOS] Server HA - 2. 네트워크 설정 변경 (0) | 2017.06.01 |
[CentOS] Server HA - 1. 가상머신 Oracle VM VirtualBox 설치 및 Setting (0) | 2017.05.31 |
[CentOS] Server HA - 0. 서버 이중화 작업 계획 (0) | 2017.05.30 |