host Rocky9-1 Rocky9-2 W10
ip 10.0.0.11 10.0.0.12 10.0.0.101
sm 255.255.255.0
dg 10.0.0.254
dns 10.0.0.11, 168.126.63.1
roles wordpress5.8.7 mysql-Server5.7 Test
php
Mysql8.0-client
httpd
시간 동기화
dnf install -y chrony
vi /etc/chrony.conf
pool 2 밑에 server time.bora.net iburst
systemctl start chronyd
chronyc sources -v 동작 확인
워드 프레스
https://ko.wordpress.org/wordpress-5.7.8-ko_KR.tar.gz
https://virtualtech.tistory.com/223
1번 서버
dnf install -y wget tar httpd
wget https://ko.wordpress.org/wordpress-5.7.8-ko_KR.tar.gz
tar xvfz wordpress-5.7.8-ko_KR.tar.gz
cp -ar wordpress/* /var/www/html/
cp /var/www/html/{wp-config-sample.php,wp-config.php}
vi /etc/httpd/conf/httpd.conf 169번째줄 DirectoryIndex index.php 로변경
sed -i 's/DirectoryIndex index.html/DirectoryIndex index.php/g' /etc/httpd/conf/httpd.conf
dnf install -y php php-common php-opcache php-cli php-gd php-curl php-mysqlnd
systemctl start httpd
firewall-cmd --add-port=80/tcp
2번 서버 가서 진행
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.12/g' /var/www/html/wp-config.php
dnf install -y mysql
mysql -uroot -pIt12345! -h 10.0.0.12
create database wordpress;
2번서버
dnf install -y mysql-server
systemctl start mysqld
mysql_secure_installation
y
2
y
N
y
y
y
mysql -uroot -p
use mysql;
create user 'root'@'%' identified by 'It12345!';
grant all privileges on *.* to 'root'@'%';
flush privileges;
exit
firewall-cmd --add-port=3306/tcp
'Linux' 카테고리의 다른 글
Untangle + CentOS7(apache,php) + CentOS7(MySQL5.7) (0) | 2023.10.31 |
---|---|
Linux Rocky9 Loadbalancer, Loadbalancer를 이용한 wordpress, mysql 구축 (0) | 2023.09.18 |
Linux Rocky9 기본설정, dhcp, vsftpd, dns, http, mail (1) | 2023.09.18 |
Linux Storage (0) | 2023.09.18 |
Linux ssh key generator (0) | 2023.09.18 |