728x90
PHP 설치
php7을 설치할 remi 저장소 사전 구축
yum -y install epel-release
wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm --no-check-certificate
rpm -Uvh remi-release-7.rpm
php 설치 및 웹 페이지 생성
yum install httpd -y
# yum-config-manager 설치
yum install -y yum-utils
# php7.3 설치가능한 remi repo 활성화
yum-config-manager --enable remi-php73
# php 설치
yum install -y php
# php 웹 페이지 생성
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
서비스 시작 및 방화벽 설정
systemctl restart httpd
systemctl enable httpd
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
Win 7에서 php 웹 페이지 확인
192.168.56.101/phpinfo.php
MariaDB 구축
DB 설치
yum install mariadb-server mariadb -y
systemctl enable mariadb
systemctl restart mariadb
DB 보안 설정
mysql_secure_installation
Set root password? [Y/n] y
New password: qwer1234
Re-enter new password: qwer1234
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
DB와 php를 연동하는 패키지 설치
yum install php-mysql -y
systemctl restart httpd
DB 설정
# 패스워드: qwer1234
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE wordpress;
MariaDB [(none)]> CREATE USER wordpress@localhost IDENTIFIED BY "qwer1234";
MariaDB [(none)]> GRANT ALL ON wordpress.* TO wordpress@localhost;
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit
WordPress 구축
워드프레스 설치
cd /tmp && wget http://wordpress.org/latest.tar.gz
tar -xvzf latest.tar.gz -C /var/www/html
chown -R apache /var/www/html/wordpress
홈페이지 접속
192.168.56.101/wordpress
워드프레스 설정
워드프레스 페이지 확인
192.168.56.101/wordpress/wp-admin
192.168.56.101/wordpress
728x90
'쿠버네티스 교육 > 강의 내용 정리' 카테고리의 다른 글
220607_1_앤서블_IaC 개요 (0) | 2022.06.07 |
---|---|
220519_4_실습_리눅스 서비스_NFS, AutoFS (0) | 2022.05.19 |
220519_1_실습_리눅스 서비스_FTP, SFTP (0) | 2022.05.19 |
220518_5_리눅스 서비스_FTP, vsftp (0) | 2022.05.18 |
220518_4_실습_리눅스 서비스_Apache 웹 서버-LAMP 구축, XE 설치 (0) | 2022.05.18 |