티스토리 뷰
#! /bin/bash
sudo su -
setenforce 0
yum install -y wget httpd
wget https://ko.wordpress.org/latest-ko_KR.tar.gz
tar xvfz latest-ko_KR.tar.gz
cp -a wordpress/* /var/www/html/
cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
sed -i 's/'database_name_here'/'mysql'/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.16.3'/g' /var/www/html/wp-config.php
sed -i 's/DirectoryIndex index.html/DirectoryIndex index.php/g' /etc/httpd/conf/httpd.conf
yum install -y epel-release yum-utils
yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php73
yum install -y php php-cli php-pdo php-fpm php-json php-mysqlnd
systemctl start httpd
해당 스크립트를 인스턴스 생성 시 포함하면 자동으로 wordpress 페이지가 뜨도록 설정할 수 있다
'Cloud > Google' 카테고리의 다른 글
GCP Cloud DNS (0) | 2022.06.27 |
---|