By other's faults, wise men correct their own.
By other's faults, wise men correct their own.
我发现有许多类似的文章,但是大多都是过时的或者有许多我并不认为是最好的做法。所以打算自己写篇教程,希望可以帮助到需要的人。
由于某些因素,ghost官方支持的linux系统是Ubuntu。有许多的人已经从各方面比较过Ubuntu和Debian,在这里我们并不打算再次讨论它们。我个人比较喜欢Debian。
我们从一个纯净的Debian系统开始
adduser coolguyusermod -aG sudo coolguysu - coolguysudo apt-get updatesudo apt-get upgradesudo apt-get install nginxcurl -sL https://deb.nodesource.com/setup_10.x | sudo bash -sudo apt-get install nodejssudo apt-get install mariadb-serversudo mysql_secure_installation为ghost设置数据库
sudo mysqlCREATE DATABASE ghost_coolsite_db;CREATE USER 'ghost_coolsite_usr'@'localhost' IDENTIFIED BY 'my_password';GRANT ALL PRIVILEGES ON ghost_coolsite_db.* TO 'ghost_coolsite_usr'@'localhost';exitsudo npm install ghost-cli@latest -gsudo mkdir -p /var/www/coolsitesudo chown coolguy:coolguy /var/www/coolsitesudo chmod 775 /var/www/coolsitecd /var/www/coolsite安装ghost
ghost install下面是详细步骤