Ghost CMS

 1.wrong nodejs detection was because of globally nodejs installation which was fixed after removing complete nodejs 

2.mysql database root password should not be empty for setup


3. same site appearing for both domains fixed by adding proper nginx conf for the domain



download ghost-cli from github

webho8542@server:~/Ghost-CLI-main/bin$ pwd

/home/webhostingcloud.in/Ghost-CLI-main/bin

webho8542@server:~/Ghost-CLI-main/bin$ cd ..

webho8542@server:~/Ghost-CLI-main$ ls

bin  CHANGELOG.md  extensions  lib  LICENSE  node_modules  package.json  package-lock.json  README.md  renovate.json  SECURITY.md  test  yarn.lock

webho8542@server:~/Ghost-CLI-main$ cd ..

webho8542@server:~$ ls

Ghost-CLI-main  logs  main.zip  public_html

webho8542@server:~$ cd public_html/

webho8542@server:~/public_html$ ls

webho8542@server:~/public_html$ /home/webhostingcloud.in/Ghost-CLI-main/bin/ghost install


Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.

https://careers.ghost.org




✔ Checking system Node.js version - found v16.19.0

✔ Checking current folder permissions

✔ Checking memory availability

✔ Checking free space

✔ Checking for latest Ghost version

✔ Setting up install directory

☴ Downloading and installing Ghost v5.26.2 > Installing dependencies > [3/5] Fetching packages...


---------------------------

server {


    server_name workdaytraining.app;

    root /var/www/asha24in/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)


    location / {

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header Host $http_host;

        proxy_pass http://127.0.0.1:2369;


    }


    location ~ /.well-known {

        allow all;

    }


    client_max_body_size 50m;


    listen [::]:443 ssl ipv6only=on; # managed by Certbot

    listen 443 ssl; # managed by Certbot

    ssl_certificate /etc/letsencrypt/live/workdaytraining.app/fullchain.pem; # managed by Certbot

    ssl_certificate_key /etc/letsencrypt/live/workdaytraining.app/privkey.pem; # managed by Certbot

    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}

server {

    if ($host = workdaytraining.app) {

        return 301 https://$host$request_uri;

    } # managed by Certbot



    listen 80;

    listen [::]:80;


    server_name workdaytraining.app;

    return 404; # managed by Certbot

}

-------------------------

root@vmi728455:~# nvm use v16

Your user’s .npmrc file (${HOME}/.npmrc)

has a `globalconfig` and/or a `prefix` setting, which are incompatible with nvm.

Run `nvm use --delete-prefix v16.18.1` to unset it.

root@vmi728455:~# vi ${HOME}/.npmrc




sudo /root/.nvm/versions/node/v16.18.1/bin/npm install ghost-cli@latest -g




1) SystemError


Message: The directory /home/asha24.in/ is not readable by other users on the system.

This can cause issues with the CLI, you must either make this directory readable by others or install node and Ghost-CLI in another location.



2) Checking current folder permissions


Message: The directory /home/asha24.in/public_html is not readable by other users on the system.

This can cause issues with the CLI, you must either make this directory rea



dable by others or run `ghost install` in another location.





✖ Starting Ghost

One or more errors occurred.


1) CliError


Message: Error trying to connect to the MySQL database.

Help: You can run `ghost config` to re-enter the correct credentials. Alternatively you can run `ghost setup` again.



2) ProcessError


Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  ./acme.sh --install --home /etc/letsencrypt

sudo: unable to execute ./acme.sh: Permission denied



Exit code: 1




3) GhostError


Message: Ghost was able to start, but errored during boot with: Access denied for user 'root'@'localhost'

Help: Unknown database error

Suggestion: journalctl -u ghost_asha24-in -n 50


Debug Information:

    OS: Ubuntu, v22.04.1 LTS

    Node Version: v16.18.1

    Ghost Version: 5.25.3

    Ghost-CLI Version: 1.23.1

    Environment: production

    Command: 'ghost install'


Additional log info available in: /home/asha24in/.ghost/logs/ghost-cli-debug-2022-12-10T10_14_09_531Z.log


Try running ghost doctor to check your system for known issues.


You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.




Ghost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/docs/config/#mail


------------------------------------------------------------------------------


Ghost was installed successfully! To complete setup of your publication, visit:


    https://asha24.in/ghost/









Successfully received certificate.

Certificate is saved at: /etc/letsencrypt/live/asha24.in/fullchain.pem

Key is saved at:         /etc/letsencrypt/live/asha24.in/privkey.pem

This certificate expires on 2023-03-10.

These files will be updated when the certificate renews.

Certbot has set up a scheduled task to automatically renew this certificate in the background.


Deploying certificate

Successfully deployed certificate for asha24.in to /etc/nginx/sites-enabled/asha24.in.conf

Congratulations! You have successfully enabled HTTPS on https://asha24.in



/etc/letsencrypt/live/workdaytraining.app



startup file

root@vmi977996:/lib/systemd/system# ll | grep ghost

-rw-rw-r--  1 asha24in           asha24in             296 Dec 10 11:14 ghost_asha24-in.service

-rw-rw-r--  1 cloudvariationco   cloudvariationco     309 Dec 15 19:15 ghost_cloudvariation-co.service

-rw-rw-r--  1 workdaytrainingapp workdaytrainingapp   316 Dec 10 13:57 ghost_workdaytraining-app.service



enabled symlink for conf

root@vmi977996:/etc/nginx/sites-enabled# ln -S cloudvariation.co.conf /etc/nginx/sites-available/cloudvariation.co.conf




One or more errors occurred.

1) Checking current folder permissions

Message: The directory /home/workdaytraining.uk/public_html is not readable by other users on the system.


sudo chmod 775 /home

sudo chmod 775 /home/workdaytraining.uk/
sudo chmod 775 /home/workdaytraining.uk/public_html

execute all three cmds one by one



Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation