imcrazytwkr

Moebooru install & launch on Debian

Oct 18th, 2014
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.96 KB | None | 0 0
  1. #Ubuntu only: apt-add-repository ppa:brightbox/ruby-ng
  2. apt-get update
  3. apt-get upgrade
  4. apt-get install -y postgresql-contrib python-software-properties postgresql libpq-dev libxml2-dev libxslt1-dev git jhead build-essential libgd2-noxpm libgd2-noxpm-dev ruby1.9.3 nano curl imagemagick
  5. echo "deb http://nginx.org/packages/mainline/debian/ wheezy nginx" > /etc/apt/sources.list.d/nginx.list
  6. echo "deb-src http://nginx.org/packages/mainline/debian/ wheezy nginx" >> /etc/apt/sources.list.d/nginx.list
  7. curl -sL http://nginx.org/keys/nginx_signing.key | apt-key add -
  8. curl -sL https://deb.nodesource.com/setup | bash -
  9. apt-get install -y nodejs nginx
  10. gem install bundler
  11. su postgres
  12. psql
  13. #CREATE user moe WITH password 'password' CREATEDB;
  14.  
  15. #if your hoster is a faggot and didn't set locale properly, exec the following:
  16. #-------------------------------------------------------------------------
  17. #UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
  18. #DROP DATABASE template1;
  19. #CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
  20. #UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
  21. #-------------------------------------------------------------------------
  22.  
  23. #\c template1
  24. #create extension test_parser;
  25. #VACUUM FREEZE;
  26. #\q
  27. su root
  28. cd ~
  29. mkdir moe
  30. cd moe
  31. git clone  https://github.com/moebooru/moebooru.git ./
  32. cp config/database.yml.example config/database.yml
  33. nano config/database.yml
  34. cp config/local_config.rb.example config/local_config.rb
  35. nano config/local_config.rb
  36. mkdir public/data
  37. mkdir -p public/data/{avatars,frame,frame-preview,image,inline,jpeg,preview,sample,search}
  38. bundle install
  39. bundle exec rake db:create
  40. bundle exec rake db:reset
  41. bundle exec rake db:migrate
  42. bundle exec rake i18n:js:export
  43. bundle exec rake assets:precompile
  44. bundle exec unicorn -D
  45. service nginx stop
  46. rm /etc/nginx/nginx.conf
  47. curl -o /etc/nginx/nginx.conf http://pastebin.com/raw.php?i=XFZ9acqp
  48. service nginx start
Advertisement
Add Comment
Please, Sign In to add comment