・redmineをインストール
・redmineを自宅でも使うしかねえ
・RoRの仕組みがわからなくてエラーが対応できない
・バックアップ運用は後回し
・その他ふわふわ考え事
ということで、Redmineインストール手順です。
ちょっとしたプラグインも含みます。
ログから漁ったので途中抜けてるところがあるかも。
https://www.easyredmine.com/redmine-gantt-plugin
⇒GETFREEで必要事項を入れて入手
メールでダウンロード用のURLが送られてきます。
centos 7
Redmine 3.4
まず、selinux を無効化します。
完全に隔離されたプライベート環境なので許して。
# getenforce
Enforcing
# sed -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux > /tmp/selinux
# diff /etc/sysconfig/selinux /tmp/selinux
# mv /tmp/selinux /etc/sysconfig/selinux
# reboot
httpdを許可します。
デフォルトだとpublicになっているので環境に合わせて変えてください。
iptableに慣れ切ってるので、firewalldは正直かなり戸惑いました。
# firewall-cmd --zone=public --add-service=http --permanent
# firewall-cmd --reload
# firewall-cmd --zone=public --list-services
さて、ここから本番。
個人的にはbitnamiでもよいと思ってますし、bitnamiのも使ってます。
sudo yum grouplist
sudo yum -y groupinstall base "Development Tools" --setopt=group_package_types=mandatory,default,optional
sudo yum -y install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel
sudo yum -y install postgresql postgresql-server postgresql-devel
sudo yum -y install httpd httpd-devel
sudo yum -y install ImageMagick ImageMagick-devel ipa-pgothic-fonts
rubyは標準のはダメっぽいのでソースから引っ張ってきます。
curl -O https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
tar -xvzf ruby-2.4.1.tar.gz
cd ruby-2.4.1/
./configure --disable-install-doc
make
make install
ruby -v
# gem install bundler --no-rdoc --no-ri
Fetching: bundler-1.16.1.gem (100%)
Successfully installed bundler-1.16.1
1 gem installed
# postgresql-setup initdb
Initializing database ... OK
# vi /var/lib/pgsql/data/pg_hba.conf
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
host redmine redmine 127.0.0.1/32 md5
host redmine redmine ::1/128 md5
systemctl start postgresql.service
systemctl enable postgresql.service
cd /var/lib/pgsql
# sudo -u postgres createuser -P redmine
新しいロールのためのパスワード:
もう一度入力してください:
# sudo -u postgres createdb -E UTF-8 -l ja_JP.UTF-8 -O redmine -T template0 redmine
# svn co https://svn.redmine.org/redmine/branches/3.4-stable /var/lib/redmine
# cd /var/lib/redmine/
# vi config/database.yml
production:
adapter: postgresql
database: redmine
host: localhost
username: redmine
password: "決められたパスワードを入力"
encoding: utf8
メールの設定はご自由に
# vi config/configuration.yml
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: "localhost"
port: 25
domain: "example.com"
rmagick_font_path: /usr/share/fonts/ipa-pgothic/ipagp.ttf
# cd /var/lib/redmine/
# bundle install --without development test --path vendor/bundle
# bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
# RAILS_ENV=production REDMINE_LANG=ja bundle exec rake redmine:load_default_data
# gem install passenger -v 5.1.12 --no-rdoc --no-ri
# passenger-install-apache2-module --snippet
LoadModule passenger_module /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.12/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.12
PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>
# vi /etc/httpd/conf.d/redmine.conf
<Directory "/var/lib/redmine/public">
Require all granted
</Directory>
LoadModule passenger_module /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.12/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.12
PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 864000
PassengerStatThrottleRate 10
Header always unset "X-Powered-By"
Header always unset "X-Runtime"
Alias /redmine /var/lib/redmine/public
<Location /redmine>
PassengerBaseURI /redmine
PassengerAppRoot /var/lib/redmine
</Location>
# chown -R apache:apache /var/lib/redmine
# gem install passenger -v 5.1.12 --no-rdoc --no-ri
# passenger-install-apache2-module --auto --languages ruby
# passenger-install-apache2-module
# wget "<URL>" -O easy_gantt.zip
# tar -xvzf easy_gantt.tgz
# mv easy_gantt /var/lib/redmine/plugins/
# chown -R apache:apache /var/lib/redmine/plugins/easy_gantt/
# cd /var/lib/redmine
# bundle install
# bundle exec rake db:migrate NAME=easy_gantt_tree RAILS_ENV=production
# bundle exec rake redmine:plugins NAME=easy_gantt RAILS_ENV=production
# git clone https://github.com/Loriowar/redmine_issues_tree.git
# mv redmine_issues_tree/ /var/lib/redmine/plugins/
# cd /var/lib/redmine/
# bundle install
# bundle exec rake db:migrate NAME=redmine_issues_tree RAILS_ENV=production
# bundle exec rake redmine:plugins NAME=redmine_issues_tree RAILS_ENV=production
# git clone https://github.com/tkusukawa/redmine_work_time.git
# mv redmine_work_time/ plugins/
# bundle install
# bundle exec rake db:migrate NAME=redmine_work_time RAILS_ENV=production
# bundle exec rake redmine:plugins NAME=redmine_work_time RAILS_ENV=production
# systemctl start httpd
# systemctl enable httpd
あとは、http://<URL>/redmine へアクセス
これでインストールまでは行けます。
・メール周りの設定
・バックアップ運用
ちょっと詰まったのはこの辺。
とにかくもっと慣れるために家で使ってやれ!
ってことで家ではbitnamiで立ててやってみてます。
ちなみに担当者の名前は偽名です(笑)
後回し。とりありずここにあることだけマークして、そのうちバックアップ、
復旧手順などを試してみます。データベースの情報をすべて復旧すれば大丈夫なのかな?
[http://redmine.jp/faq/system_management/backup/]
・他の人の教育どうしよう(まずbashとgitかな?)
・gitea入れて見たら
・ansibleやるったらやる