Debian 및 Ubuntu에 Ghost (CMS) 블로그 게시 플랫폼 설치


Ghost는 블로깅 또는 온라인 출판을위한 무료 오픈 소스 및 경량 플랫폼입니다. Nodejs로 작성되었으며 온라인 출판물을 쉽게 구축하고 실행하기 위해 설계된 다양한 최신 출판 도구와 함께 제공됩니다.

기능이 풍부하며 이제 컴퓨터에서 Ghost의 모든 기능과 성능을 제공하는 데스크톱 앱 (Linux, Windows 및 Mac OS에서 실행)이 있습니다. 즉, 이동 중에 여러 사이트간에 쉽게 전환 할 수 있으므로 절대적으로 효율적입니다.

  • Fast, scalable and efficient.
  • Offers a markdown based editing environment.
  • Comes with a desktop app.
  • Comes with beautiful handlebars templates.
  • Supports for simple content management.
  • Supports for multiples roles for authors, editors and administrators.
  • Allows scheduling content in advance.
  • Supports accelerated mobile Pages.
  • Fully supports search engine optimization.
  • Provides detailed structured data.
  • Supports subscriptions by RSS, Email and Slack.
  • Enables simple site editing and so much more.
  1. A Debian Server Minimal Install with 1GB Memory
  2. A Ubuntu Server Minimal Install with 1GB Memory
  3. Node v6 LTS – Install Latest Node.js and NPM in Debian and Ubuntu
  4. A Debian/Ubuntu server with Nginx installed

중요 : Ghost를 직접 설치하기 전에 좋은 VPS 호스팅이 필요합니다. BlueHost를 적극 권장합니다.

이 기사에서는 Debian 및 Ubuntu 시스템에 오픈 소스 Ghost (Content Management System) 블로그 플랫폼을 설치하는 방법을 설명합니다.

1 단계 : Debian 및 Ubuntu에 Nodejs 설치

1. Nodejs는 기본 Debian 및 Ubuntu 소프트웨어 리포지토리에서 사용할 수 없으므로 먼저 해당 리포지토리를 추가 한 후 다음과 같이 설치합니다.

$ sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$ sudo apt-get install nodejs

2. nodejs가 설치되면 명령을 사용하여 권장되는 Nodejs 및 npm 버전이 설치되어 있는지 확인할 수 있습니다.

$ node -v 
$ npm -v

2 단계 : Debian 및 Ubuntu에 Ghost 설치

3. 이제 권장 설치 위치 인/var/www/ghost에 응용 프로그램 파일을 저장할 Ghost 루트 디렉토리를 만듭니다.

$ sudo mkdir -p /var/www/ghost

4. 그런 다음 Ghost의 GitHub 저장소에서 최신 버전의 Ghost를 가져와 방금 위에서 만든 디렉토리에 아카이브 파일의 압축을 풉니 다.

$ curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
$ sudo unzip -uo ghost.zip -d  /var/www/ghost

5. 이제 새 ghost 디렉토리로 이동하고 아래 명령을 사용하여 Ghost (생산 종속성 만 해당)를 설치하십시오.

$ sudo cd /var/www/ghost 
$ sudo npm install --production

3 단계 : 기본 Ghost 블로그 시작 및 액세스

6. Ghost를 시작하려면/var/www/ghost 디렉토리에서 다음 명령을 실행하십시오.

$ sudo npm start --production

7. 기본적으로 Ghost는 포트 2368에서 수신 대기해야합니다. 새로 설정된 Ghost 블로그를 보려면 웹 브라우저를 열고 아래 URL을 입력하십시오.

http://SERVER_IP:2368
OR
http://localhost:2368

참고 : 처음으로 Ghost를 실행하면 Ghost의 루트 디렉토리에 config.js 파일이 생성됩니다. 이를 사용하여 고스트에 대한 환경 수준 구성을 설정할 수 있습니다. 사이트 URL, 데이터베이스, 메일 설정 등과 같은 옵션을 구성 할 수 있습니다.

4 단계 : Ghost 용 Nginx 설치 및 구성

9.이 섹션에서는 사용자가 URL 끝에 : 2368 포트를 추가하지 않고도 Ghost 블로그에 액세스 할 수 있도록 포트 80에서 Ghost 블로그를 서버에 Nginx를 설치하고 구성합니다.

먼저 터미널에서 CTRL + C 키를 눌러 Ghost 서비스를 중지 한 다음 그림과 같이 nginx를 설치하십시오.

# sudo apt install nginx
# systemctl start nginx
# systemctl enable nginx

10. nginx가 설치되면/etc/nginx/sites-available/ghost 아래에 새 파일을 만듭니다.

$ sudo vi /etc/nginx/sites-available/ghost

다음 구성을 추가하고 강조 표시된 다음 줄을 your_domain_or_ip_address로 변경해야합니다.

server {
    listen 80;
    server_name your_domain_or_ip_address;
    location / {
    proxy_set_header HOST $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass         http://127.0.0.1:2368;
    }
}

/ etc/nginx/sites-enabled 디렉토리에 심볼릭 링크를 만들어 파일을 저장하고이 구성을 활성화합니다.

$ sudo ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/ghost

11. 이제 /etc/nginx.conf 파일을 엽니 다. "사이트가 활성화 된 디렉토리에 구성 파일을 포함하고 표시된대로 기본 사이트를 비활성화합니다.

$ sudo vi /etc/nginx/nginx.conf

이제 http 블록 내부에 다음 줄을 추가하여 사이트 사용 디렉터리에 구성 파일을 포함합니다.

http {
...
    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

그런 다음 http 블록 안에있는 기본 서버 블록을 완전히 주석 처리합니다.

...

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;


#    server {
#       listen       80 default_server;
#       listen       [::]:80 default_server;
#       server_name  _;
#       root         /usr/share/nginx/html;
#
#       # Load configuration files for the default server block.
#       include /etc/nginx/default.d/*.conf;
#
#       location / {
#       }
#
#       error_page 404 /404.html;
#           location = /40x.html {
#       }
#
#       error_page 500 502 503 504 /50x.html;
#           location = /50x.html {
#       }
...
...

마지막으로 nginx 웹 서버를 저장하고 다시 시작하십시오.

$ sudo systemctl restart nginx

다시 한 번 http :/your_domain_or_ip_address 를 방문하면 Ghost 블로그를 볼 수 있습니다.

추가 정보를 보려면 Ghost 공식 웹 사이트로 이동하십시오 : https://ghost.org/

그게 다야! "이 기사에서는 Debian 및 Ubuntu에서 Ghost를 설정하는 방법을 보여주었습니다. 아래 피드백 양식을 통해이 가이드에 대한 질문이나 의견을 보내주십시오.