Danbooru

Danbooru install script for Debian

Posted under General

I believe I've worked out all the kinks. This script will setup Ruby, Ruby Gems, Rails, PostgreSQL, Nginx, and Danbooru itself. I've tested it on a fresh install of Debian Lenny in VMware and had no issues, but I'd like to release it for more testing. Hopefully this script will also serve as a template for automated Fedora/FreeBSD scripts. Just download it and run as root.

In case it's not obvious, you need a decent VPS or a dedicated server for this script to work. It won't work on a shared hosting environment (I don't think).

Get it here: http://danbooru.donmai.us/pkg/INSTALL.debian

Updated by Lalaca

Hey Albert, if I were to actually buy a VPS and test this script, would you be willing to maybe give some support if I run into problems? I won't be asking for any n00b Linux help, don't worry.

Thanks!

This looks interesting, I might give it a test run later... though, I'd need to modify the install script to use a different directory instead of plain /var/www/ because I am running multiple vhosts there...

The script itself looks very straight forward, and I'd imagine it working on any debian based system (IE: Ubuntu), as well as RH systems if they have the alien package installed.

Before I actually go and run it, is there any particular aspect(s) that you'd like me to monitor / test?

Also, another thing... Have you looked into Varnish? I've heard good things about it, but I don't know which one (varnish or nginx) works better, of if they can work together.

Furvy said:
Hey Albert, if I were to actually buy a VPS and test this script, would you be willing to maybe give some support if I run into problems? I won't be asking for any n00b Linux help, don't worry.

Thanks!

If you come on IRC, sure.

Done!! Just to confirm, the installation script works, but of course, only in a perfect situation. The script can, however, be followed *almost* exactly and executed manually step-by-step.

This took roughly 4 hours for me to install on a Debian "Etch" VPS because of dependencies and a few other problems inherent with using a VPS. In other words, most of the install had to be done manually and step-by-step. First and foremost, I am going to say that this script is really intended for a DEDICATED server running "Lenny". Otherwise, you will probably have to deal with backports, hunting down dependencies, and running every line in the script manually.

Also be forewarned that you need *plenty* of room to expand. The bare system takes up roughly ~120MB of memory, and it's mentioned somewhere that ~400MB is used to run this site? A gig or more of memory is essential.

Additionally, if your system comes with Apache already running, you will have to stop it before starting nginx:
/etc/init.d/apache2 stop

There is one small bug in the script at line 77:
# Set up nginx
77 DANBOORU_CONF_FILE="/etc/nginx/sites-enabled/danbooru.conf"

'danbooru.conf' does not exist until it is manually created. I had to manually create this before any of the following code could write to it.

I'm not sure what happened, either. The file was missing and none of the echo commands created the file. However, I tried again today and it works just fine now. I don't know how to reproduce my error.

Perhaps as a precaution, you could add:
touch /etc/nginx/sites-enabled/danbooru.conf

After line 76?

1