From: "Nikolay A. Fetisov" <naf@naf.net.ru>
To: sysadmins@lists.altlinux.org
Subject: Re: [Sysadmins] Как установить Redmine?
Date: Tue, 23 Jul 2013 13:51:41 +0400
Message-ID: <1374573101.10824.9.camel@v3405.naf.net.ru> (raw)
In-Reply-To: <CAH5o5+G6+w3gyd-UaowYDZWgt6_PqHq-22RZz64UFA7sAat1jw@mail.gmail.com>
В Вт, 23/07/2013 в 12:53 +0400, Михаил Радюк пишет:
> Подскажите, как сейчас правильно устанавливать Redmine? Замечательная
> инструкция на http://admdev.blogspot.ru/search?q=redmine уже устарела,
> поиск по спискам рассылки конкретного ничего не дал.
> Система - Сизиф (обновленный).
По Sisyphus не скажу, и более-менее оформленной инструкции нет,
но в виртуальный сервер с t6 ставилось следующим образом:
- Установка MySQL
- Установка webserver-common
- Создание пользователя webadmin
- Установка rubygems:
# apt-get install rubygems ruby
# gem install bundler
# apt-get install libruby-devel libmysqlclient-devel glibc-devel libssl-devel
# apt-get install make
# apt-get install gcc gcc-c++
(с заменой на последнюю предложенную версию)
# gem install thin
# adduser -r -G _webserver -M -d /dev/empty -s /dev/null -c 'Thin Ruby web server' _thin
Вытаскивается архив Redmine, разворачивается в /opt/redmine/
# chown -R webadmin:webmaster /opt/redmine
# cd /opt/redmine
В Gemfile добавить строку
gem "thin"
Далее,
# bundle install --without development test rmagick postgresql sqlite
# cp config/database.yml.example config/database.yml
Заполнение config/database.yml настройками базы.
# rake generate_secret_token
# RAILS_ENV=production rake db:migrate
# RAILS_ENV=production rake redmine:load_default_data
# mkdir tmp public/plugin_assets
# chown -R _thin:webmaster files log tmp public/plugin_assets
# chmod -R 2775 files log tmp public/plugin_assets
# cp config/configuration.yml.example config/configuration.yml
В config/configuration.yml - адрес сервера SMTP, локальный sendmail не
работает.
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "mailhub"
port: 25
Настройка Thin:
cd /etc
mkdir thin
cat >thin/redmine.yml <<END
pid: /var/run/thin/thin.pid
timeout: 30
log: /var/log/thin/thin.log
max_conns: 32
require: []
environment: production
max_persistent_conns: 32
address: 0.0.0.0
port: 9000
servers: 3
daemonize: true
chdir: /opt/redmine/
user: _thin
group: _thin
END
cat > rc.d/init.d/thin <<END
#!/bin/sh
### BEGIN INIT INFO
# Provides: thin
# Required-Start: \$local_fs $remote_fs
# Required-Stop: \$local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: thin initscript
# Description: thin
### END INIT INFO
# Original author: Forrest Robertson
# Do NOT "set -e"
DAEMON=/usr/local/bin/thin
SCRIPT_NAME=/etc/rc.d/thin
CONFIG_PATH=/etc/thin
# Exit if the package is not installed
[ -x "\$DAEMON" ] || exit 0
PIDDIR=/var/run/thin
LOGDIR=/var/log/thin
RETVAL=0
[ -d "\$PIDDIR" ] || mkdir -p "\$PIDDIR"
chown root:_thin "\$PIDDIR"
chmod 775 "\$PIDDIR"
case "\$1" in
start)
# Need to change $HOME for Git > 1.8.1.1
export HOME=/var/empty
\$DAEMON start --all \$CONFIG_PATH
;;
stop)
\$DAEMON stop --all \$CONFIG_PATH
;;
restart)
\$DAEMON restart --all \$CONFIG_PATH
;;
*)
echo "Usage: \$SCRIPT_NAME {start|stop|restart}"
;;
esac
exit \$RETVAL
END
chmod +x rc.d/init.d/thin
chkconfig thin --add
chkconfig thin on
mkdir /var/log/thin/
chown :_thin /var/log/thin/
chmod 1775 /var/log/thin/
Далее в вышестоящий nginx добавляется что-то вида
upstream redmine_upstream {
ip_hash;
server 172.16.1.100:9000;
server 172.16.1.100:9001;
server 172.16.1.100:9002;
}
location /redmine/ {
client_max_body_size 1000m;
send_timeout 360;
proxy_pass http://redmine_upstream;
}
Запрашивается из браузера http://<...>/redmine/,
учётная запись администратора - admin : admin .
--
С уважением,
Николай Фетисов
next prev parent reply other threads:[~2013-07-23 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 8:53 Михаил Радюк
2013-07-23 9:51 ` Nikolay A. Fetisov [this message]
2013-07-23 13:25 ` Михаил Радюк
2013-07-23 12:29 ` Илюхин Андрей
2013-07-23 13:28 ` Михаил Радюк
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374573101.10824.9.camel@v3405.naf.net.ru \
--to=naf@naf.net.ru \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git