CentOS 8 에 WordPress 를 설치해보자

CentOS 8 에 WordPress 를 설치해보자

반응형

CentOS 8 에 워드프레스 설치형 패키지를 설치하는 방법을 소개합니다.

우선, 워드프레스는 PHP, MySQL (혹은 MiriaDB) 그리고 Apache Web Server 가 기본적으로 설치되어 있어야만 됩니다.

물론, DB 혹은 Apache Web Server 는 다른 솔루션으로 대체 하셔도 됩니다.

$ sudo dnf makecache

$ sudo dnf install mariadb mariadb-server httpd php-mysqlnd php-pecl-zip wget

$ sudo systemctl start httpd

$ sudo systemctl status httpd

$ sudo systemctl enable httpd

$ sudo systemctl status mariadb

$ sudo systemctl start mariadb

$ sudo systemctl status mariadb

$ sudo systemctl enable mariadb

$ sudo mysql -u root -p

MariaDB> CREATE DATABASE wordpress; MariaDB> GRANT ALL ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'secret'; MariaDB> FLUSH PRIVILEGES; MariaDB> quit

$ cd /var/www

$ sudo wget https://wordpress.org/latest.tar.gz

$ sudo tar xvzf latest.tar.gz

$ sudo rm -v latest.tar.gz

$ sudo chown -Rf apache:apache ./wordpress/

$ sudo chmod -Rf 775 ./wordpress/

$ sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/wordpress(/.*)?"

$ sudo restorecon -Rv /var/www/wordpress

$ sudo vi /etc/httpd/conf.d/wordpress.conf

ServerAdmin root@localhost DocumentRoot /var/www/wordpress Options Indexes FollowSymLinks AllowOverride all Require all granted ErrorLog /var/log/httpd/wordpress_error.log CustomLog /var/log/httpd/wordpress_access.log common

$ sudo systemctl restart httpd

$ sudo systemctl status httpd

$ ip a

IP 확인

웹브라우저에서 접속하여 wordpress 초기 설정하면 됨

http://your_server_ip

from http://indienote.tistory.com/586 by ccl(A) rewrite - 2021-04-14 12:25:04