웹사이트 검색

CentOS 7에서 NGINX와 함께 Bludit CMS를 설치하는 방법


이 페이지에서

  1. 요구 사항\n
  2. 전제 조건
  3. 초기 단계
  4. 1단계 - PHP 설치
  5. 2단계 - acme.sh 클라이언트 설치 및 Lets Encrypt 인증서 획득(선택 사항)\n
  6. 3단계 - NGINX 설치 및 구성
  7. 4단계 - Bludit 설치
  8. 5단계 - Bludit 설치 마법사 완료
  9. 링크

Bludit은 간단하고 빠르고 안전한 플랫 파일 CMS로 자신의 웹 사이트나 블로그를 몇 초 만에 만들 수 있습니다. 완전히 무료이며 오픈 소스입니다. Github에서 소스 코드를 검색할 수 있습니다. Bludit은 JSON 형식의 파일을 사용하여 콘텐츠를 저장하므로 데이터베이스를 설치하거나 구성할 필요가 없습니다. PHP를 지원하는 웹 서버만 있으면 됩니다. Bludit은 모든 SEO 도구를 통합하여 모든 검색 엔진 및 소셜 네트워크에서 순위를 향상시킵니다. 사이트의 모양과 느낌을 변경하는 데 사용할 수 있는 풍부한 테마 및 플러그인 시스템이 있습니다. 이 튜토리얼에서는 NGINX를 웹 서버로 사용하여 CentOS 7 시스템에서 Bludit CMS 설치 및 설정을 진행합니다.

요구 사항

시스템이 다음 요구사항을 충족하는지 확인하세요.

  • mbstring, gd, dom 및 JSON 확장자가 있는 PHP 버전 5.3 이상.\n
  • Nginx, Apache, Lighttpd, H2O와 같은 PHP를 지원하는 웹 서버. 이 가이드에서는 NGINX를 사용합니다.\n

전제 조건

  • CentOS 7을 실행하는 시스템입니다.\n
  • sudo 권한이 있는 루트가 아닌 사용자.\n

초기 단계

CentOS 버전 확인:

cat /etc/centos-release
# CentOS Linux release 7.6.1810 (Core)

시간대 설정:

timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'

운영 체제 패키지(소프트웨어)를 업데이트합니다. 이는 운영 체제 기본 소프트웨어 패키지에 대한 최신 업데이트 및 보안 수정 사항이 있는지 확인하기 때문에 중요한 첫 번째 단계입니다.

sudo yum update -y

CentOS 운영체제의 기본 관리에 필요한 몇 가지 필수 패키지를 설치합니다.

sudo yum install -y curl wget vim git unzip socat bash-completion epel-release

1단계 - PHP 설치

Webtatic YUM 저장소 설정:

sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

PHP와 필요한 PHP 확장을 설치합니다.

sudo yum install -y php72w php72w-cli php72w-fpm php72w-common php72w-mbstring php72w-zip php72w-pgsql php72w-sqlite3 php72w-curl php72w-gd php72w-mysql php72w-intl php72w-json php72w-opcache php72w-xml

모듈로 컴파일된 PHP를 표시하려면 다음을 실행할 수 있습니다.

php -m

ctype
curl
exif
fileinfo
. . .
. . .

PHP 버전 확인:

php --version
# PHP 7.2.14 (cli) (built: Jan 12 2019 12:47:33) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
# with Zend OPcache v7.2.14, Copyright (c) 1999-2018, by Zend Technologies

PHP-FPM 서비스 시작 및 활성화:

sudo systemctl start php-fpm.service
sudo systemctl enable php-fpm.service

2단계 - acme.sh 클라이언트 설치 및 Lets Encrypt 인증서 획득(선택 사항)

HTTPS로 웹 사이트를 보호할 필요는 없지만 사이트 트래픽을 보호하는 것이 좋습니다. Lets Encrypt에서 TLS 인증서를 얻기 위해 Acme.sh 클라이언트를 사용합니다. Acme.sh는 종속성이 없는 Lets Encrypt에서 TLS 인증서를 얻기 위한 순수 Unix 셸 소프트웨어입니다.

Acme.sh 다운로드 및 설치:

sudo mkdir /etc/letsencrypt
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
sudo ./acme.sh --install --home /etc/letsencrypt --accountemail
cd ~

Acme.sh 버전 확인:

/etc/letsencrypt/acme.sh --version
# v2.8.0

도메인/호스트 이름에 대한 RSA 및 ECC/ECDSA 인증서를 얻습니다.

# RSA 2048
sudo /etc/letsencrypt/acme.sh --issue --standalone --home /etc/letsencrypt -d example.com --keylength 2048
# ECDSA
sudo /etc/letsencrypt/acme.sh --issue --standalone --home /etc/letsencrypt -d example.com --keylength ec-256

위 명령어를 실행하면 인증서가 다음 위치에 있게 됩니다.

  • RSA의 경우: /etc/letsencrypt/example.com 디렉토리.
  • ECC/ECDSA의 경우: /etc/letsencrypt/example.com_ecc 디렉토리.

3단계 - NGINX 설치 및 구성

CentOS 저장소에서 Nginx를 다운로드하고 설치합니다.

sudo yum install -y nginx

Nginx 버전 확인:

nginx -v
# nginx version: nginx/1.12.2

Nginx 서비스 시작 및 사용 설정:

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

다음을 실행하여 Bludit용 NGINX를 구성합니다.

sudo vim /etc/nginx/conf.d/bludit.conf

그리고 다음 구성으로 파일을 채웁니다.

server {
  listen 80;
  listen 443 ssl;

ssl_certificate /etc/letsencrypt/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/example.com/private.key;
ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key;
server_name example.com; root /var/www/bludit; index index.php; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } location / { try_files $uri $uri/ /index.php?$args; } location ^~ /bl-content/tmp/ { deny all; } location ^~ /bl-content/pages/ { deny all; } location ^~ /bl-content/databases/ { deny all; } }

NGINX 구성에서 구문 오류를 확인하세요.

sudo nginx -t

NGINX 서비스 다시 로드:

sudo systemctl reload nginx.service

4단계 - Bludit 설치

Bludit이 위치해야 하는 문서 루트 디렉터리를 만듭니다.

sudo mkdir -p /var/www/bludit

/var/www/bludit 디렉토리의 소유권을 [your_user]:로 변경합니다.

sudo chown -R [your_user]:[your_user] /var/www/bludit

문서 루트로 이동:

cd /var/www/bludit

공식 페이지에서 최신 버전을 다운로드하고 zip 파일을 추출합니다.

wget https://www.bludit.com/releases/bludit-3-8-1.zip
unzip bludit-3-8-1.zip
rm bludit-3-8-1.zip
mv bludit-3-8-1/* . && mv bludit-3-8-1/.* .
rmdir bludit-3-8-1

참고: 최신 버전이 있는 경우 다운로드 URL을 업데이트하세요.

적절한 소유권을 제공합니다.

sudo chown -R nginx:nginx /var/www/bludit

sudo vim /etc/php-fpm.d/www.conf를 실행하고 사용자 및 그룹을 nginx로 설정합니다. 처음에는 apache:로 설정됩니다.

sudo vim /etc/php-fpm.d/www.conf
# user = nginx
# group = nginx

PHP-FPM 서비스를 다시 시작합니다.

sudo systemctl restart php-fpm.service

5단계 - Bludit 설치 마법사 완료

웹 브라우저에서 사이트를 엽니다. 웹 브라우저에서 사이트를 열면 다음 페이지로 리디렉션되어 언어를 선택해야 합니다.

그런 다음 사용자 admin의 비밀번호를 생성하고 "설치"를 클릭합니다.

관리자 비밀번호를 생성하면 Bludit 프런트엔드로 리디렉션됩니다.

Bludit 관리 영역에 액세스하려면 사이트 IP 또는 URL에 /admin을 추가하세요. Bludit 관리자는 다음과 같습니다.

설치가 완료되었습니다. Bludit CMS와 함께 즐거운 블로깅하세요.

연결

  • https://plugins.bludit.com/
  • https://themes.bludit.com/
  • https://github.com/bludit/bludit