Update INSTALL.debian, for Debian 9(stretch)

This commit is contained in:
nothink
2019-08-05 23:29:12 +09:00
parent b9bb5467b8
commit 72ceb484ce
5 changed files with 22 additions and 14 deletions

View File

@@ -40,13 +40,17 @@ echo "* Installing packages..."
if [ -n "$(uname -a | grep Ubuntu)" ] ; then if [ -n "$(uname -a | grep Ubuntu)" ] ; then
LIBSSL_DEV_PKG=libssl-dev LIBSSL_DEV_PKG=libssl-dev
LIBJPEG_TURBO_DEV_PKG=libjpeg-turbo8-dev
else else
LIBSSL_DEV_PKG=$( verlt `lsb_release -sr` 9.0 && echo libssl-dev || echo libssl1.0-dev ) LIBSSL_DEV_PKG=$( verlt `lsb_release -sr` 9.0 && echo libssl-dev || echo libssl1.0-dev )
LIBJPEG_TURBO_DEV_PKG=libjpeg62-turbo-dev
fi fi
apt-get update apt-get update
apt-get -y install apt-transport-https
apt-get -y install zlib1g-dev libglib2.0-dev
apt-get -y install $LIBSSL_DEV_PKG build-essential automake libxml2-dev libxslt-dev ncurses-dev sudo libreadline-dev flex bison ragel memcached libmemcached-dev git curl libcurl4-openssl-dev sendmail-bin sendmail nginx ssh coreutils ffmpeg mkvtoolnix apt-get -y install $LIBSSL_DEV_PKG build-essential automake libxml2-dev libxslt-dev ncurses-dev sudo libreadline-dev flex bison ragel memcached libmemcached-dev git curl libcurl4-openssl-dev sendmail-bin sendmail nginx ssh coreutils ffmpeg mkvtoolnix
apt-get -y install libpq-dev postgresql-client apt-get -y install libpq-dev postgresql-client
apt-get -y install liblcms2-dev libjpeg-turbo8-dev libexpat1-dev libgif-dev libpng-dev libexif-dev apt-get -y install liblcms2-dev $LIBJPEG_TURBO_DEV_PKG libexpat1-dev libgif-dev libpng-dev libexif-dev
# vrack specific stuff # vrack specific stuff
if [ -n "$VLAN_IP_ADDR" ] ; then if [ -n "$VLAN_IP_ADDR" ] ; then
@@ -103,7 +107,7 @@ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~danbooru/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~danbooru/.bash_profile echo 'eval "$(rbenv init -)"' >> ~danbooru/.bash_profile
sudo -u danbooru mkdir -p ~danbooru/.rbenv/plugins sudo -u danbooru mkdir -p ~danbooru/.rbenv/plugins
sudo -u danbooru git clone git://github.com/sstephenson/ruby-build.git ~danbooru/.rbenv/plugins/ruby-build sudo -u danbooru git clone git://github.com/sstephenson/ruby-build.git ~danbooru/.rbenv/plugins/ruby-build
sudo -u danbooru bash -l -c "rbenv install $RUBY_VERSION" sudo -u danbooru bash -l -c "RUBY_CONFIGURE_OPTS=--disable-install-doc rbenv install --verbose $RUBY_VERSION"
sudo -u danbooru bash -l -c "rbenv global $RUBY_VERSION" sudo -u danbooru bash -l -c "rbenv global $RUBY_VERSION"
# Generate secret token and secret key # Generate secret token and secret key
@@ -138,7 +142,10 @@ echo "* Enter a new password for the danbooru account"
passwd danbooru passwd danbooru
echo "* Setting up SSH keys for the danbooru account" echo "* Setting up SSH keys for the danbooru account"
sudo -u danbooru ssh-keygen sudo -u danbooru ssh-keygen -t rsa -f ~danbooru/.ssh/id_rsa -N ""
sudo -u danbooru touch ~danbooru/.ssh/authorized_keys
sudo -u danbooru cat ~danbooru/.ssh/id_rsa.pub >> ~danbooru/.ssh/authorized_keys
sudo -u danbooru chmod 600 ~danbooru/.ssh/authorized_keys
mkdir -p /var/www/danbooru2/shared/config mkdir -p /var/www/danbooru2/shared/config
mkdir -p /var/www/danbooru2/shared/data mkdir -p /var/www/danbooru2/shared/data
@@ -166,7 +173,7 @@ read -p "Press [enter] to continue..."
echo "* Commit your changes and push them to your fork. You are now ready to" echo "* Commit your changes and push them to your fork. You are now ready to"
echo "* deploy with the following command:" echo "* deploy with the following command:"
echo "*" echo "*"
echo "* bundle exec capistrano production deploy" echo "* bundle exec cap production deploy"
echo "*" echo "*"
echo "* You can also run a server locally without having to deal with deploys" echo "* You can also run a server locally without having to deal with deploys"
echo "* by running the following command:" echo "* by running the following command:"

View File

@@ -3,7 +3,7 @@ set :default_stage, "staging"
set :application, "danbooru" set :application, "danbooru"
set :repo_url, "git://github.com/r888888888/danbooru.git" set :repo_url, "git://github.com/r888888888/danbooru.git"
set :scm, :git set :scm, :git
set :deploy_to, "/var/www/danbooru" set :deploy_to, "/var/www/danbooru2"
set :rbenv_ruby, "2.5.1" set :rbenv_ruby, "2.5.1"
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle') set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle')
set :branch, ENV.fetch("branch", "master") set :branch, ENV.fetch("branch", "master")

View File

@@ -1,5 +1,5 @@
# Set your full path to application. # Set your full path to application.
app_path = "/var/www/danbooru/current" app_path = "/var/www/danbooru2/current"
# Set unicorn options # Set unicorn options
worker_processes 12 worker_processes 12

View File

@@ -1,7 +1,7 @@
server { server {
listen 80; listen 80;
server_name __hostname__; server_name __hostname__;
root /var/www/danbooru/current/public; root /var/www/danbooru2/current/public;
index index.html; index index.html;
access_log off; access_log off;
error_log off; error_log off;
@@ -53,5 +53,6 @@ server {
} }
upstream app_server { upstream app_server {
server 127.0.0.1:9000; # server 127.0.0.1:9000;
server unix:/tmp/.unicorn.sock
} }