2019-02-16 12:40:49 -05:00
## Installation (Easy mode - For development environments)
#### Prerequisites
* Latest version of VirtualBox and the VM Extension Pack ([download](https://www.virtualbox.org/wiki/Downloads))
* Latest version of Vagrant ([download](https://www.vagrantup.com))
#### Installation
1. Download and install the prerequisites
2. Open Command Prompt/Terminal and run the following commands:
```
vagrant plugin install vagrant-hostmanager
vagrant plugin install vagrant-bindfs
vagrant plugin install vagrant-vbguest
```
3. Download and extract the repo
4. `cd` into the repo using Command Prompt/Terminal
5. Run the following command:
`vagrant up`
5. This would be a good time to rewatch your favorite TV series installment, cook & have breakfast/lunch/dinner, walk the dog, clean your room, etc.< br >
By the time you get back the install will surely have completed.< sup > 1< / sup >
6. ???
7. Profit!
< sub > < sup > 1< / sup > If the install did not finish by the time an activity is complete please select another activity to avoid crippling boredom.< / sub >
2018-08-01 18:32:10 -04:00
## Installation
2010-02-04 15:08:49 -05:00
2011-09-30 15:50:08 -04:00
It is recommended that you install Danbooru on a Debian-based system
2015-05-21 15:15:34 -04:00
since most of the required packages are available on APT. Danbooru
2011-10-05 17:53:43 -04:00
has been successfully installed on Fedora, CentOS, FreeBSD, and OS X.
The INSTALL.debian install script is straightforward and should be
2015-05-21 15:15:34 -04:00
simple to adapt for other platforms.
2010-02-11 14:59:58 -05:00
2011-09-30 15:50:08 -04:00
For best performance, you will need at least 256MB of RAM for
PostgreSQL and Rails. The memory requirement will grow as your
2015-05-21 15:15:34 -04:00
database gets bigger.
On production Danbooru uses PostgreSQL 9.4, but any 9.x release should
work.
2010-02-11 14:59:58 -05:00
2011-09-30 15:50:08 -04:00
Use your operating system's package management system whenever
possible. This will simplify the process of installing init scripts,
which will not always happen when compiling from source.
2010-02-04 15:08:49 -05:00
2018-08-01 18:32:10 -04:00
## Troubleshooting
2010-02-04 15:08:49 -05:00
2011-09-30 15:50:08 -04:00
These instructions won't work for everyone. If your setup is not
working, here are the steps I usually recommend to people:
2010-02-04 15:08:49 -05:00
2011-09-30 15:50:08 -04:00
1) Test the database. Make sure you can connect to it using psql. Make
sure the tables exist. If this fails, you need to work on correctly
installing PostgreSQL, importing the initial schema, and running the
migrations.
2010-02-04 15:08:49 -05:00
2010-02-11 14:59:58 -05:00
2) Test the Rails database connection by using rails console. Run
2011-09-30 15:50:08 -04:00
Post.count to make sure Rails can connect to the database. If this
fails, you need to make sure your Danbooru configuration files are
correct.
2010-02-04 15:08:49 -05:00
2011-09-30 15:50:08 -04:00
3) Test Nginx to make sure it's working correctly. You may need to
debug your Nginx configuration file.
2010-02-04 15:08:49 -05:00
2011-09-30 15:50:08 -04:00
4) Check all log files.
2014-03-24 17:38:06 -04:00
2018-08-01 18:32:10 -04:00
## Services
Danbooru employs numerous external services to delegate some
functionality.
For development purposes, you can just run mocked version of these
services. They're available in `scrtip/mock_services` and can be started
automatically using Foreman and the provided Procfile.
2017-04-04 20:10:00 -04:00
### Amazon Web Services
In order to enable the following features, you will need an AWS SQS
account:
* Pool versions
* Post versions
* IQDB
* Saved searches
* Related tags
### Google APIs
The following features requires a Google API account:
* Bulk revert
* Post versions report
2018-08-01 18:32:10 -04:00
### IQDB Service
2014-03-24 17:38:06 -04:00
2018-08-01 18:32:10 -04:00
IQDB integration is delegated to the [IQDBS service ](https://github.com/r888888888/iqdbs ).
2016-12-14 21:09:45 -05:00
### Archive Service
2017-09-25 17:51:04 -04:00
In order to access versioned data for pools and posts you will
2016-12-21 14:54:43 -05:00
need to install and configure the [Archives service ](https://github.com/r888888888/archives ).
2017-04-04 20:10:00 -04:00
### Reportbooru Service
The following features are delegated to the [Reportbooru service ](https://github.com/r888888888/reportbooru ):
* Related tags
* Missed searches report
* Popular searches report
* Favorite searches
* Upload trend graphs
2018-07-20 13:36:16 -04:00
2018-08-01 18:48:34 -04:00
### Recommender Service
Post recommendations require the [Recommender service ](https://github.com/r888888888/recommender ).
2018-07-20 13:36:16 -04:00
### Cropped Thumbnails
There's optional support for cropped thumbnails. This relies on installing
2018-08-01 18:32:10 -04:00
`libvips-8.6` or higher and setting `Danbooru.config.enable_image_cropping`
to true.