Notice
Recent Posts
Recent Comments
Link
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
more
Archives
Today
Total
관리 메뉴

클라우드 엔지니어 꿈나무

loadbalancer + wordpress + sqlnd-server 설치 -Rocky9 본문

Linux

loadbalancer + wordpress + sqlnd-server 설치 -Rocky9

새싹싹이 2023. 9. 2. 23:31

Rocky9-1 (node1)

1. haproxy config 수정

vi /etc/haproxy/haproxy.cfg

방화벽 80 및 10.0.0.12 및 10.0.0.13 접속으로 설정

 

Rocky9-2 (node1) 및 Rocky9-3 (node2) 

1. wget & tar & httpd 설치

dnf install -y wget

dnf install -y tar
dnf install -y httpd

2. wget으로 wrodpress 다운로드
wget https://ko.wordpress.org/wordpress-5.7.8-ko_KR.tar.gz

3. wordpress 아카이브 해제

tar xvfz wordpress-5.7.8-ko_KR.tar.gz 

4. php 파일 설치
dnf install -y php php-cli php-pdo php-opcache php-common php-curl php-mysqlnd pho-gd

5. 인터넷창에서 넣어야 하니 파일 복사

cp -r ./wordpress/* /var/www/html/

6. 샘플창이 아닌 wp-config가 열릴 수 있게 설정
cp /var/www/html/{wp-config-sample.php,wp-config.php}

7. wp-config-sample.php에서 wp-config.php 수정 html -> php

(참고) vi /var/www/html/wp-config.php에서 변경 사항 확인

vi /etc/httpd/conf/httpd.conf

sed -i 's/DirectoryIndex index.html/DirectoryIndex index.php/g' /etc/httpd/conf/httpd.conf
sed -i 's/database_name_here/wordpress/g' /var/www/html/wp-config.php
sed -i 's/username_here/root/g' /var/www/html/wp-config.php
sed -i 's/password_here/It12345!/g' /var/www/html/wp-config.php
sed -i 's/localhost/10.0.0.14/g' /var/www/html/wp-config.php

(참고) vi /var/www/html/wp-config.php에서 변경 사항 확인

 

8. 방화벽 확인

firewall-cmd --add-port=80/tcp

9. httpd 시작

systemctl start httpd

 

Rocky9-4 (node3)

1. wget 설치

dnf install -y wget

2. wordpress 다운로드
wget https://ko.wordpress.org/wordpress-5.7.8-ko_KR.tar.gz
3. tar 설치

dnf install -y tar
4. wordpress 아카이브 해제

tar xvfz wordpress-5.7.8-ko_KR.tar.gz 
5. mysql-server 설치

dnf install -y mysql-server
6. mysqld 실행

systemctl start mysqld

7. mysql 방화벽 열기

firewall-cmd --add-pot=3306/tcp

8. mysql 로그인

mysql -uroot -p

로그인하여 root user 생성, 비밀번호 지정 및 wordpress 데이터베이스 생성

 

인터넷창

10.0.0.11을 인터넷 창에 입력하면 하기 창 출력

'Linux' 카테고리의 다른 글

Ncloud Server 생성 및 Xshell 연결  (0) 2023.09.04
Ansible 을 이용한 Apache + Wordpress + Mysql-server 설치  (0) 2023.09.03
LoadBalancer Haproxy - Rocky9  (0) 2023.09.02
SSH Ansible - Rocky9  (0) 2023.09.01
SSH Key 생성 및 연결 - CentOS7  (0) 2023.08.30