Cum instalam Ghost CMS pe Ubuntu 22.04

Configurare noua (How To)

Situatie

Ghost este un sistem de management al conținutului (CMS) și o platformă de blogging ușor, open-source, construit cu Node.js. Este personalizabil și are multe teme predefinite disponibile.

Solutie

Pasi de urmat

Creați baza de date Ghost

  1. SSH către server ca utilizator non-root cu acces sudo.
  2. 2. Login to mysql.
sudo mysql -u root -p

3.Create a database named ghost.

CREATE DATABASE ghost;

4.Creați un utilizator al bazei de date numit ghost.

CREATE USER 'ghost'@'localhost' IDENTIFIED WITH mysql_native_password BY 'StrongPassword';

5. Acordați toate privilegiile bazei de date fantomă utilizatorului fantomă.

GRANT ALL ON ghost.* TO 'ghost'@'localhost';

Instalați Nginx

  1. Instalați Nginx
sudo apt-get install nginx -y

2.Activați serverul Nginx să pornească la pornire.

sudo systemctl enable nginx

3. Permite firewall atât pentru conexiunile HTTP, cât și pentru HTTPS.

sudo ufw allow 'Nginx Full'

Instalați Node.js

Adăugați depozitul APT NodeSource pentru Nodul 14.

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash

Instalati node.js

sudo apt-get install nodejs -y

Instalati Ghost CMS

Instalati Ghost-cli

sudo npm install ghost-cli@latest -g

Create a directory /var/www/ghost/.

sudo mkdir -p /var/www/ghost/

Setați dreptul de proprietate asupra directorului la contul de utilizator curent.

sudo chown -R $USER:$USER /var/www/ghost/

 sudo chmod 775 /var/www/ghost

Accesați directorul /var/www/ghost/.

cd /var/www/ghost/

Instalați Ghost.

ghost install

Răspundeți la solicitări așa cum se arată.

? Enter your blog URL: https://ghost.example.com

? Enter your MySQL hostname: localhost

? Enter your MySQL username: ghost

? Enter your MySQL password: [hidden]

? Enter your Ghost database name: ghost

? Configuring Ghost

? Setting up instance

? Do you wish to set up Nginx? Yes

? Do you wish to set up Systemd? Yes

? Do you want to start Ghost? (Y/n) Y

Navigați la portalul dvs. de administrare Ghost. De exemplu:

https://ghost.example.com/ghost/

Tip solutie

Permanent

Voteaza

(24 din 30 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?