GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Distribuire Ghost Blog con Nginx su Ubuntu 20.04

Ghost è una piattaforma di publishing open source basata su Node.js, focalizzata su scrittura e distribuzione di contenuti. Supporta Markdown, temi, analytics e funzioni membership.

Questa guida distribuisce Ghost dietro Nginx con SSL Let's Encrypt su Ubuntu 20.04.

Prerequisiti

  • Server Ubuntu 20.04.
  • Dominio puntato al server.
  • Accesso root o sudo.

1. Installare le dipendenze

apt-get update -y
apt-get install gnupg2 curl unzip git acl -y
curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install nodejs -y
node -v
npm -v

2. Installare MariaDB e Nginx

apt-get install mariadb-server nginx -y
mysql_secure_installation

Crea database e utente per Ghost:

mysql -u root -p
CREATE DATABASE ghostdb;
CREATE USER 'ghostuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON ghostdb.* TO 'ghostuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

3. Installare Ghost CLI

npm install -g ghost-cli@1.16.3
ghost version

4. Installare Ghost

Crea un utente dedicato e prepara la directory:

adduser user1
usermod -aG sudo user1
su - user1
sudo mkdir /var/www/ghost
sudo chown -R user1:user1 /var/www/ghost
cd /var/www/ghost
ghost install

Durante l'installazione fornisci URL del blog, nome database, utente e password. Consenti a Ghost CLI di configurare Nginx e systemd.

5. Abilitare Let's Encrypt

sudo apt-get install certbot python3-certbot-nginx -y
sudo certbot --nginx -d ghost.example.com

Scegli il reindirizzamento HTTPS.

6. Accedere a Ghost

Apri https://ghost.example.com/ghost/ e crea l'account amministratore. La dashboard apparirà dopo la configurazione iniziale.

Conclusione

Ghost è distribuito su Ubuntu 20.04 con Node.js, MariaDB, Nginx e Let's Encrypt, pronto per pubblicare e gestire contenuti.

Ubuntu
  1. MediaWiki su Nginx e Ubuntu 16.04: installazione con SSL gratuito

  2. Come installare Magento con Nginx su Ubuntu 15.10

  3. Come compilare Nginx con Google PageSpeed su Ubuntu 20.04

  4. Come installare ModSecurity con Nginx su Ubuntu 20.04 LTS

  5. Distribuire un'app Flask con Nginx e Gunicorn su Ubuntu 20.04

Come Configurare LibreNMS Monitoring Tool con Nginx su Ubuntu 20.04

Come installare Craft CMS con Nginx su Ubuntu 20.04

Installare Nginx con ModSecurity su Ubuntu 15.04

Installare MediaWiki con Nginx e SSL Let's Encrypt su Ubuntu 20.04

zzupdate: aggiornare Ubuntu con un solo comando

Distribuire Laravel con Nginx su Ubuntu