Learn CentOS Part 7 - Changing the Hostname
차례:
WordPress는 전 세계에서 가장 인기있는 오픈 소스 블로그 및 CMS 플랫폼으로 오늘날 인터넷의 모든 웹 사이트 중 1/4을 지원합니다. PHP 및 MySQL을 기반으로하며 무료 및 프리미엄 플러그인 및 테마로 확장 할 수있는 많은 기능을 제공합니다. WordPress는 온라인 상점, 웹 사이트 또는 블로그를 만드는 가장 간단한 방법입니다.
이 튜토리얼에서는 CentOS 7에 WordPress를 설치하는 방법을 설명합니다.이 기사를 작성할 당시 최신 버전의 WordPress는 버전 5.0.3입니다.
우리는 Apache를 웹 서버, SSL 인증서, 최신 PHP 7.2 및 MySQL / MariaDB를 데이터베이스 서버로 사용하여 LAMP 스택을 사용할 것입니다.
전제 조건
이 학습을 계속하기 전에 다음 전제 조건이 충족되는지 확인하십시오.
- 도메인 이름이 서버 공용 IP 주소를 가리 켰습니다.
example.com을 사용합니다. sudo 권한이있는 사용자로 로그인합니다.이 지침에 따라 Apache를 설치합니다.이 지침에 따라 HP 7.2를 설치합니다. 도메인에 SSL 인증서가 설치되어 있습니다. 다음 지침에 따라 무료 Let 's Encrypt SSL 인증서를 생성 할 수 있습니다. 
MySQL 데이터베이스 생성
WordPress는 데이터 및 구성을 MySQL 데이터베이스에 저장합니다. CentOS 서버에 MySQL 또는 MariaDB가 설치되어 있지 않은 경우 아래 가이드 중 하나에 따라 설치할 수 있습니다.
- CentOS 7에 MySQL 설치 CentOS 7에 MariaDB 설치
 
다음 명령을 실행하여 MySQL 쉘에 로그인하십시오.
mysql -u root -p
MySQL 셸 내에서 다음 SQL 문을 실행하여
wordpress
라는 새 데이터베이스를 만듭니다.
CREATE DATABASE wordpress CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
다음으로
wordpressuser
라는 MySQL 사용자 계정을 만들고 다음 명령을 실행하여 사용자에게 필요한 권한을 부여하십시오.
GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'change-with-strong-password';
완료되면 다음을 입력하여 mysql 콘솔을 종료하십시오.
Wordpress 다운로드
다음 명령은 wget을 사용하여 WordPress 다운로드 페이지에서 최신 버전의 WordPress를 다운로드하고 아카이브를 도메인의 문서 루트 디렉토리로 추출합니다.
wget -q -O - "http://wordpress.org/latest.tar.gz" | sudo tar -xzf - -C /var/www/html --transform s/wordpress/example.com/
웹 서버가 사이트의 파일 및 디렉토리에 완전히 액세스 할 수 있도록 올바른 권한을 설정하십시오.
sudo chown -R apache: /var/www/html/example.com
아파치 설정
지금까지이 학습서의 전제 조건을 확인하지 않으면 시스템에 SSL 인증서가있는 Apache가 이미 설치되어 있어야합니다.
텍스트 편집기를 열고 도메인의 Apache 가상 호스트 구성을 편집하십시오.
sudo nano /etc/httpd/conf.d/example.com.conf
example.com
을 Wordpress 도메인으로 바꾸고 SSL 인증서 파일의 올바른 경로를 설정하는 것을 잊지 마십시오.
ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted
ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted
ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted
ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted
ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted
이 구성은 Apache에게
http
를
https
,
www
를
www
가
non-www
도메인으로 리디렉션하도록 지시합니다.
변경 사항을 적용하려면 Apache 서비스를 다시 시작하십시오.
워드 프레스 설치 완료
이제 Wordpress가 다운로드되고 Apache 서버가 구성되었으므로 웹 인터페이스를 통해 설치를 완료 할 수 있습니다.
브라우저를 열고 도메인을 입력하면 다음과 유사한 화면이 나타납니다.








여기에서 새로운 테마 및 플러그인을 설치하여 WordPress 설치 사용자 정의를 시작할 수 있습니다.
결론
축하합니다. CentOS 7 서버에 Apache와 함께 WordPress를 성공적으로 설치했습니다. WordPress의 첫 단계는 WordPress를 시작하는 방법에 대한 자세한 정보를 제공하는 좋은 출발점입니다.
centos 워드 프레스 mysql mariadb cms 아파치Windows 10/8/7에 WordPress를 설치하는 방법
인스턴트 워드 프레스는 WordPress를 로컬에 설치하고 설치하는 데 도움이되는 멋진 소프트웨어입니다 Windows 10 / 8 / 7 / Server 시스템.
Google Cloud Platform에 WordPress를 설치하는 방법
이 자습서를 따라 Google Cloud에 가입하고 Google Cloud Platform에 WordPress를 설치하고 호스트 할 수 있습니다. 가입시 $ 300 무료 크레딧을 받으십시오.
CentOS 7에서 Nginx로 WordPress를 설치하는 방법
이 자습서에서는 CentOS 7 시스템에 WordPress를 설치하는 방법을 보여줍니다. 워드 프레스는 전 세계적으로 가장 인기있는 오픈 소스 블로그 및 CMS 플랫폼입니다.







