Kris
December 21, 2021, 9:06pm
1
Bug / Issue documented and reported on ghost github, posting here for visibility as it seems multiple users with different configurations are having similar issues:
opened 03:05PM - 04 Dec 21 UTC
closed 04:01PM - 20 Jan 22 UTC
Trying to set up ghost on a pi 4, 4GB, running piOS bullseye, 64bit using mariad… b and nginx
Having trouble with ` ghost install ` failing to find the running services for both mysql and nginx
I have reproduced this twice with clean installations of the OS image, skipping hardening steps like firewall just to test a successful install
- install OS
- install nginx, mariadb, node.js
- update root mysql password, create ghost database/user and set perms, create system user/ghost directory and set perms
- run ` ghost install `
When running ` ghost install ` I get the following:
```
/var/www/ghost $ ghost install
✔ Checking system Node.js version - found v16.13.1
ℹ Ensuring user is not logged in as ghost user [skipped]
ℹ Checking if logged in user is directory owner [skipped]
✔ Checking current folder permissions
Local MySQL install was not found or is stopped. You can ignore this if you are using a remote MySQL host.
Alternatively you could:
a) install/start MySQL locally
b) run `ghost install --db=sqlite3` to use sqlite
c) run `ghost install local` to get a development install using sqlite3.
? Continue anyway? No
✖ Checking for a MySQL installation
✔ Validating config
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
One or more errors occurred.
1) Checking for a MySQL installation
Message: MySQL check failed.
```
I created the link and ran the script provided in this comment:
https://github.com/TryGhost/Ghost-CLI/issues/460#issuecomment-890541435
When this script is running, I am able to get passed the mysql checks, but then the installer fails to find nginx
```
/var/www/ghost $ ghost install
✔ Checking system Node.js version - found v16.13.1
✔ Checking logged in user
✔ Checking current folder permissions
System checks failed with message: 'Linux version is not Ubuntu 16, 18, or 20'
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using `ghost install local` instead.
? Continue anyway? Yes
System stack check skipped
ℹ Checking system compatibility [skipped]
✔ Checking for a MySQL installation
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v4.25.1
✔ Finishing install process
? Enter your blog URL: http://localhost:2368
? Enter your MySQL hostname: localhost
? Enter your MySQL username: [hidden]
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: ghost
✔ Configuring Ghost
✔ Setting up instance
+ sudo useradd --system --user-group ghost
? Sudo Password [hidden]
+ sudo chown -R ghost:ghost /var/www/ghost/content
✔ Setting up "ghost" system user
ℹ Setting up "ghost" mysql user [skipped]
Nginx is not installed. Skipping Nginx setup.
ℹ Setting up Nginx [skipped]
Nginx setup task was skipped, skipping SSL setup
ℹ Setting up SSL [skipped]
? Do you wish to set up Systemd? No
Systemd setup skipped, reverting to local process manager
ℹ Setting up Systemd [skipped]
? Do you want to start Ghost? No
ℹ Starting Ghost [skipped]
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:
http://localhost:2368/ghost/
```
The required services are configured and running:
```
$ systemctl --type=service
...
mariadb.service loaded active running MariaDB 10.5.12 database server
...
nginx.service loaded active running A high performance web server and a reverse proxy server
...
```
Unless the script from the comment is running, I cannot pass the mysql checks - I cannot find or figure out a solution to passing the nginx checks to do a complete setup and I am not sure what changes are made during the nginx steps to make the changes manually - any insights into this would be greatly appreciated. Please let me know if there is any other information I could provide.
Debug Information:
OS: Debian GNU/Linux, v11
Node Version: v16.13.1
Ghost Version: 4.25.1
Ghost-CLI Version: 1.18.1
Environment: production
Command: 'ghost install'
- [✔] Tried to find help in the forum & docs
- [✔ ] Checked for existing issues
- [❌] Attached log file (no 'additional errors' to note)
- [✔] Provided technical details incl. operating system
tl;dr: mariadb fails the mysql check, you can fix this by editing the doctor check script as noted in a comment on a related issue.
Setup goes thru until the nginx checks, those fail and setup skips nginx/ssl config
Retrying with: ghost setup nginx
…fails with the same result
No updates on my or related issues in weeks. Does anyone have any insight on a fix or potential workaround?
Hello Kris,
I have the same config Debian 11 and the same problem.
I’ve found a “workaround” to the problem by downgrading my ghost-cli to the 1.17.0 by doing a
npm i ghost-cli@1.17.0 -g
Best
Skip the MySQL check. For Nginx install the basic one that comes with your package manager, then let it make the site config file, then update Nginx after. Best suggestion would be to ignore this and make your own Nginx config and use Certbot to get your certs.
system
Closed
June 19, 2022, 9:37pm
4
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.