#!/bin/bash # # metadata_begin # recipe: ghost # tags: debian9 # revision: 1 # description_ru: . # metadata_end #
echo 'deb http://ftp.ru.debian.org/debian unstable main' > /etc/apt/sources.list.d/nodejs.list
echo -e 'Package: *\nPin: release a=unstable\nPin-Priority: -9' > /etc/apt/preferences
apt update
apt -y install --no-install-recommends -t unstable nodejs npm
apt -y install --no-install-recommends nginx-light yarn
adduser --shell /bin/bash --gecos 'Ghost application' ghost --disabled-password
npm i -g ghost-cli
ghost help
hostname -f
ghost install -d /var/www/$(hostname -f) --no-stack --url http://$(hostname -f) --db sqlite3 --dbpath /home/ghost/bd --no-setup-nginx --no-setup-systemd --no-start
chown -R ghost:ghost /var/www/$(hostname -f)
cd /var/www/$(hostname -f)
rm /etc/nginx/sites-enabled/default
ghost setup nginx
ghost setup systemd && ghost start
#!/bin/bash # # metadata_begin # recipe: ghost # tags: debian9 # revision: 1 # description_ru: GHost # metadata_end # echo 'deb http://ftp.ru.debian.org/debian unstable main' > /etc/apt/sources.list.d/nodejs.list echo -e 'Package: *\nPin: release a=unstable\nPin-Priority: -9' > /etc/apt/preferences apt update apt -y install --no-install-recommends -t unstable nodejs npm apt -y install --no-install-recommends nginx-light yarn adduser --shell /bin/bash --gecos 'Ghost application' ghost --disabled-password npm i -g ghost-cli ghost install -d /var/www/$(hostname -f) --no-stack --url http://$(hostname -f) --db sqlite3 --dbpath /home/ghost/bd --no-setup-nginx --no-setup-systemd --no-start chown -R ghost:ghost /var/www/$(hostname -f) cd /var/www/$(hostname -f) rm /etc/nginx/sites-enabled/default ghost setup nginx ghost setup systemd && ghost start
Source: https://habr.com/ru/post/339360/
All Articles