特殊:Badtitle/NS100:Danbooru
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Danbooru }} |
点击翻译: |
English {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/af | • {{#if: php5|Afrikaans| [[::Danbooru/af|Afrikaans]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ar | • {{#if: php5|العربية| [[::Danbooru/ar|العربية]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/az | • {{#if: php5|azərbaycanca| [[::Danbooru/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/bcc | • {{#if: php5|جهلسری بلوچی| [[::Danbooru/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/bg | • {{#if: php5|български| [[::Danbooru/bg|български]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/br | • {{#if: php5|brezhoneg| [[::Danbooru/br|brezhoneg]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ca | • {{#if: php5|català| [[::Danbooru/ca|català]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/cs | • {{#if: php5|čeština| [[::Danbooru/cs|čeština]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/de | • {{#if: php5|Deutsch| [[::Danbooru/de|Deutsch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/el | • {{#if: php5|Ελληνικά| [[::Danbooru/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/es | • {{#if: php5|español| [[::Danbooru/es|español]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/fa | • {{#if: php5|فارسی| [[::Danbooru/fa|فارسی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/fi | • {{#if: php5|suomi| [[::Danbooru/fi|suomi]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/fr | • {{#if: php5|français| [[::Danbooru/fr|français]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/gu | • {{#if: php5|ગુજરાતી| [[::Danbooru/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/he | • {{#if: php5|עברית| [[::Danbooru/he|עברית]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/hu | • {{#if: php5|magyar| [[::Danbooru/hu|magyar]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/id | • {{#if: php5|Bahasa Indonesia| [[::Danbooru/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/it | • {{#if: php5|italiano| [[::Danbooru/it|italiano]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ja | • {{#if: php5|日本語| [[::Danbooru/ja|日本語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ko | • {{#if: php5|한국어| [[::Danbooru/ko|한국어]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ksh | • {{#if: php5|Ripoarisch| [[::Danbooru/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/mr | • {{#if: php5|मराठी| [[::Danbooru/mr|मराठी]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ms | • {{#if: php5|Bahasa Melayu| [[::Danbooru/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/nl | • {{#if: php5|Nederlands| [[::Danbooru/nl|Nederlands]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/no | • {{#if: php5|norsk| [[::Danbooru/no|norsk]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/oc | • {{#if: php5|occitan| [[::Danbooru/oc|occitan]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/pl | • {{#if: php5|polski| [[::Danbooru/pl|polski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/pt | • {{#if: php5|português| [[::Danbooru/pt|português]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ro | • {{#if: php5|română| [[::Danbooru/ro|română]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/ru | • {{#if: php5|русский| [[::Danbooru/ru|русский]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/si | • {{#if: php5|සිංහල| [[::Danbooru/si|සිංහල]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/sq | • {{#if: php5|shqip| [[::Danbooru/sq|shqip]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/sr | • {{#if: php5|српски / srpski| [[::Danbooru/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/sv | • {{#if: php5|svenska| [[::Danbooru/sv|svenska]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/th | • {{#if: php5|ไทย| [[::Danbooru/th|ไทย]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/tr | • {{#if: php5|Türkçe| [[::Danbooru/tr|Türkçe]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/vi | • {{#if: php5|Tiếng Việt| [[::Danbooru/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/yue | • {{#if: php5|粵語| [[::Danbooru/yue|粵語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/zh | • {{#if: php5|中文| [[::Danbooru/zh|中文]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/zh-hans | • {{#if: php5|中文(简体)| [[::Danbooru/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}Danbooru}}/zh-hant | • {{#if: php5|中文(繁體)| [[::Danbooru/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:php5|:Danbooru|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Danbooru/zh | | {{#ifexist: Danbooru/zh | | {{#ifeq: {{#titleparts:Danbooru|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Danbooru|1|-1|}} | zh | | }}
Danbooru, from the japanese for cardboard box, is a powerful image board system with tagging.
It is built on RubyOnRails.
This HOWTO explains how to install it on a debian-like distribution; it has been tested with ubuntu 6.06 and ubuntu feisty.
Prerequisites
Install this and more. There used to be a more complete list on the wiki, most of which I had already installed. Additions are welcome.
Note: Ensure that you have the Universe repository enabled in your /etc/sources.list. See [1].
sudo apt-get install rails postgresql-8.1 postgresql-8.1-plruby rubygems libgd2-xpm-dev sudo gem install diff-lcs acts_as_versionedGet the source
svn co svn://donmai.us/danbooru/trunk danbooru cd danbooru Tell it where rails is installed system-wideln -sf /usr/share/rails vendor/ Rebuild the image resizer binary.rm -f lib/resizer/resizer make -C lib/resizer resizerSet up the database
Create a self-contained postgresql runtimeexport PATH=$PATH:/usr/lib/postgresql/8.1/bin export LOCAL_DB=$PWD/var-db export PGDATA=$LOCAL_DB/data initdb export PGHOST=$LOCAL_DB pg_ctl -w -l $LOCAL_DB/server.log start -o "-c listen_addresses= -c unix_socket_directory=$LOCAL_DB" for i in dev test prod; do createdb danbooru-$i; done createuser -sDR danbooru-dbuser Load a schema into the DB - I had some errors, but it still worked. For a real life example, use the schema recently published on http://mapored.net/dump.db.bz2psql danbooru-dev danbooru-dbuser -f db/postgres.sql Optionally, play around with your new databasepsql danbooru-dev danbooru-dbuser Stop the databaseLOCAL_DB=~+/var-db eval 'PGDATA=$LOCAL_DB/data /usr/lib/postgresql/8.1/bin/pg_ctl -w stop' Write a DB config file for RubyOnRailscat <<EOF > config/database.yml common: &common adapter: postgresql host: $PGHOST username: danbooru-dbuser development: database: danbooru-dev <<: *common test: database: danbooru-test <<: *common production: database: danbooru-prod <<: *common EOFSetup the website, and test it
Edit the website settings You will probably change the e-mail address and the server address, where image and previews are found.cp config/config_local.yml{.example,} sensible-editor config/config_local.yml Run a few tests. Don't run just «rake» right now, you won't get meaningful error messages. First test with a specific target like test:functionalsrake test:functionals rakeStart a server
Start a databaseLOCAL_DB=~+/var-db eval 'PGHOST=$LOCAL_DB PGDATA=$LOCAL_DB/data /usr/lib/postgresql/8.1/bin/pg_ctl -w -l $LOCAL_DB/server.log start -o "-c listen_addresses= -c unix_socket_directory=$LOCAL_DB"' Start a local web server until you type Ctrl-Cruby script/server Visit it, create the first user (who automagically becomes admin)sensible-browser http://localhost:3000 Enjoy your danbooru!