{"id":216,"date":"2016-11-04T23:10:22","date_gmt":"2016-11-04T14:10:22","guid":{"rendered":"http:\/\/www.cl.cs.okayama-u.ac.jp\/?p=216"},"modified":"2017-03-28T23:13:00","modified_gmt":"2017-03-28T14:13:00","slug":"redm32","status":"publish","type":"post","link":"https:\/\/www.cl.cs.okayama-u.ac.jp\/?p=216","title":{"rendered":"redmine1.1.2\u304b\u3089 redmine3.2\u306b\u554f\u984c\u306a\u304f\u79fb\u884c(2016\/11\/04)"},"content":{"rendered":"<p>CentOS7.2 \u306b\u65b0\u898f\u306bredmine3.2\u3092\u5165\u308c\u3066\uff0c\u65e7redmine1.1.2\u3067\u4f5c\u6210\u3057\u3066\u304d\u305f\u30c7\u30fc\u30bf\u3092\u79fb\u884c\u3067\u304d\u307e\u3057\u305f\uff0eredmine\u3063\u3066\u3088\u304f\u3067\u304d\u3066\u307e\u3059\uff0e\u4e0b\u8a18\u304c\u65b9\u6cd5\u3067\u3059\uff0e<\/p>\n<h3 id=\"content_1_1\">\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58<\/h3>\n<ul class=\"list1\" style=\"padding-left:16px; \">\n<li>\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58(mysql)\n<pre>mysqldump -u root -p --default-character-set=utf8 db_redmine &gt; \/tmp\/redmine_backup_`date +%Y%m%d-%H%M%S`.sql<\/pre>\n<\/li>\n<li>\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58(wiki\u306a\u3069\u3067\u306e\u6dfb\u4ed8\u30d5\u30a1\u30a4\u30eb)\n<pre>\/var\/lib\/redmine\/files \u3092tar\u3067\u56fa\u3081\u3066\u79fb\u52d5 (\/var\/lib\/redmine\u306e\u90e8\u5206\u306f\u8a2d\u5b9a\u306b\u3088\u308b)\r\ncd \/var\/lib\/redmine\r\ntar cvfz filesback.tgz files<\/pre>\n<\/li>\n<\/ul>\n<div class=\"jumpmenu\"><a href=\"http:\/\/lyon\/pukiwiki\/index.php?redmine%20%C0%DF%C3%D6%A5%E1%A5%E2#navigator\">\u2191<\/a><\/div>\n<h3 id=\"content_1_2\">\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb (CentOS7.2)<\/h3>\n<ul class=\"list1\" style=\"padding-left:16px; \">\n<li>getenforce \u3067\u78ba\u8a8d\u3057\u3066 SELinux\u5207\u308b<\/li>\n<li>firewall \u7a7a\u3051\u308b\n<pre>firewall-cmd --zone=public --add-service=http --permanent\r\nfirewall-cmd --reload<\/pre>\n<\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n<pre>yum groupinstall \"Development Tools\"\r\nyum install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel httpd-devel \r\nyum install ImageMagick ImageMagick-devel ipa-pgothic-fonts <\/pre>\n<\/li>\n<\/ul>\n<ul class=\"list1\" style=\"padding-left:16px; \">\n<li>mysql\u3092\u5165\u308c\u308b (mariaDB\u306e\u524a\u9664)\n<pre>yum remove mariadb-libs\r\nyum install http:\/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm\r\nyum install mysql-community-server\r\nyum install mysql-devel<\/pre>\n<ul class=\"list2\" style=\"padding-left:16px; \">\n<li>\/etc\/my.cnf \u3092\u958b\u3044\u3066\u6700\u5f8c\u306b\u4e0b\u8a18\u3092\u8ffd\u52a0(\u6587\u5b57\u306fUTF-8\u3092\u5229\u7528)\n<pre>character_set_server=utf8\r\nskip-character-set-client-handshake<\/pre>\n<\/li>\n<li>\u8d77\u52d5\n<pre>touch  \/var\/lib\/mysql\/mysql.sock\r\nchown -R mysql:mysql \/var\/lib\/mysql\r\nsystemctl start mysqld.service<\/pre>\n<\/li>\n<li>mysql\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u8a2d\u5b9a\n<pre>mysql_secure_installation (\u3053\u308c\u3092\u5b9f\u884c)\r\n\u3053\u306e\u6642\uff0c\u6700\u521d\u306emysql\u306eroot\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u8cea\u554f\u306f\u7121\u8996\r\nEnter current password for root (enter for none): (\u7a7a\u3067enter)\r\n\u3042\u3068\u306f\u3044\u308d\u3044\u308d\r\nsystemctl restart mysqld.service<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>DB\u306bredmine(ver1.1.2)\u3092\u30b3\u30d4\u30fc\u3059\u308b\n<ul class=\"list2\" style=\"padding-left:16px; \">\n<li>\u307e\u305aDB\u306b\u7a7a\u306e redmine\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\uff0credmine\u30e6\u30fc\u30b6\u3092\u4f5c\u308b\n<pre>mysql -u root -p \u3067\u5165\u308b\r\nCREATE DATABASE redmine CHARACTER SET utf8;\r\nCREATE USER 'redmine'@'localhost' IDENTIFIED BY '\u30d1\u30b9\u30ef\u30fc\u30c9';\r\nGRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';\r\nquit;<\/pre>\n<\/li>\n<li>\u5148\u307b\u3069\u4fdd\u5b58\u3057\u305f\u904e\u53bb\u306eredmineDB\u3092\u5165\u308c\u308b\n<pre>mysql -u root -p --default-character-set=utf8 redmine &lt; redmine_backup_20161104-080707.sql <\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>Ruby\u3092 CentOS7.2\u306b\u3044\u308c\u308b\n<ul class=\"list2\" style=\"padding-left:16px; \">\n<li>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f 2.0.0 \u304c\u5165\u3063\u3066\u308b\u304c(\/usr\/bin\/ruby)\u305d\u308c\u306f\u524a\u9664\uff0e2.2.3\u306b\u3059\u308b\uff0e<\/li>\n<li>\u7279\u306b\u6d88\u3057\u3066\u3082\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u3066\u3082\u4eca\u306e\u3068\u3053\u308d\u554f\u984c\u306a\u304b\u3063\u305f\n<pre>curl -O https:\/\/cache.ruby-lang.org\/pub\/ruby\/2.2\/ruby-2.2.3.tar.gz\r\ntar xvfz ruby-2.2.3.tar.gz\r\ncd ruby-2.2.3\r\n.\/configure --disable-install-doc\r\nmake\r\nmake install \u3067\r\n\/usr\/local\/bin\/ruby \u306b\u5165\u308b\r\n(\u78ba\u8a8d)\r\nruby -v<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>gem\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n<pre>gem install bundler --no-rdoc --no-ri<\/pre>\n<\/li>\n<li>Redmine\u3092\u5165\u308c\u308b \u53c2\u8003\u306f <a href=\"http:\/\/blog.redmine.jp\/articles\/3_2\/install\/centos\/\" rel=\"nofollow\">http:\/\/blog.redmine.jp\/articles\/3_2\/install\/centos\/<\/a> <a href=\"http:\/\/weblabo.oscasierra.net\/install-redmine32-centos7-1\/\" rel=\"nofollow\">http:\/\/weblabo.oscasierra.net\/install-redmine32-centos7-1\/<\/a>\u306a\u3069\uff0eredmine 3.2\u3092\u5165\u308c\u308b\n<pre>curl -O http:\/\/www.redmine.org\/releases\/redmine-3.2.0.tar.gz\r\ntar xvfz redmine-3.2.0.tar.gz\r\nmv redmine-3.2.0 \/var\/lib\/  (\u3053\u3053\u306f\u304a\u597d\u307f)\r\n\u305d\u308c\u3067\u540d\u524d\u3092redmine\u306b\u5909\u3048\u308b\r\ncd \/var\/lib\/\r\nmv redmine-3.2.0  redmine\r\n(\u3053\u306e\u5f8c\uff0credmine\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e0b\u3092\u5168\u90e8 \u30e6\u30fc\u30b6apache\uff0c\u30b0\u30eb\u30fc\u30d7apache\u306b\u5909\u66f4\u3059\u308b\u304c\uff0c\u307e\u3060\u3044\u308d\u3044\u308d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u3067\u6700\u5f8c\u306b\u3059\u308b)<\/pre>\n<\/li>\n<h3 class=\"smallHeading\">Redmine\u307e\u308f\u308a\u306e\u8a2d\u5b9a\u3068\u30d5\u30a1\u30a4\u30eb\u306e\u79fb\u52d5          <\/p>\n<ul class=\"list2\" style=\"padding-left:16px; \">\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u8a2d\u5b9a\n<pre>cd \/var\/lib\/redmine\/config\/\r\ncp database.yml.example database.yml<\/pre>\n<ul class=\"list3\" style=\"padding-left:16px; \">\n<li>database.yml\u3067\u3000\u6700\u521d\u306eproduction\u3060\u3051\u66f8\u304d\u76f4\u3057\u305f\n<pre>production:\r\nadapter: mysql2\r\ndatabase: redmine\r\nhost: localhost\r\nusername: redmine\r\npassword: \"\u30d1\u30b9\u30ef\u30fc\u30c9\"\r\nencoding: utf8<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>configuration.yml\u306e\u4f5c\u6210(\u30e1\u30fc\u30eb\u306e\u8a2d\u5b9a)\n<ul class=\"list3\" style=\"padding-left:16px; \">\n<li>\/var\/lib\/redmine\/config\/configuration.yml \u3092\u65b0\u898f\u306b\u4f5c\u308b\uff0econfiguration.yml.example\u3068\u3044\u3046\u306e\u3082\u3042\u308b\u307f\u305f\u3044\u3060\u3051\u3069\u7121\u8996\u3057\u305f<\/li>\n<li>\u5185\u5bb9\u306f\u4e0b\u8a18(\u30e1\u30fc\u30eb\u306e\u8a2d\u5b9a\u306b\u5408\u308f\u305b\u308b)\n<pre>production:\r\n email_delivery:\r\n   delivery_method: :smtp\r\n   smtp_settings:\r\n     address: \"localhost\" \r\n     port: 25\r\n     domain: \"full\u306e\u30c9\u30e1\u30a4\u30f3\u540d\" \r\n\r\n rmagick_font_path: \/usr\/share\/fonts\/ipa-pgothic\/ipagp.ttf\r\n<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u306edownload\n<pre>cd \/var\/lib\/redmine\r\nbundle install --without development test --path vendor\/bundle\r\n\u3053\u3053\u3067\u30a8\u30e9\u30fc\u304c\u3067\u305f\u5834\u5408\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8aad\u3080\r\n(database.yml\u306e\u4e2d\u304c\u6b63\u3057\u3044\u304b\uff0cmysql\u95a2\u4fc2\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4e0d\u8db3\u3057\u3066\u3044\u308b\u304b?\u306a\u3069)<\/pre>\n<\/li>\n<li>\u79d8\u5bc6\u9375\u306e\u4f5c\u6210\n<pre>cd \/var\/lib\/redmine\r\nbundle exec rake generate_secret_token\r\n\u4e0b\u8a18\u306e\u30ef\u30fc\u30cb\u30f3\u30b0\u304c\u51fa\u308b\r\n\/var\/lib\/redmine\/vendor\/bundle\/ruby\/2.2.0\/gems\/htmlentities-4.3.1\/lib\/htmlentities\/mappings\/expanded.rb:465: warning: duplicated key at line 466 ignored: \"inodot\"<\/pre>\n<\/li>\n<li>httpd \u3068\u306e\u9023\u643a\u306b\u3080\u3051\u3066 (passenger\u306a\u3069\u3044\u308c\u308b)\n<pre>cd \/var\/lib\/redmine\r\ngem install passenger --no-rdoc --no-ri\r\npassenger-install-apache2-module --auto<\/pre>\n<\/li>\n<li>httpd\u306b\u767b\u9332\u3059\u3079\u304d\u5185\u5bb9\u306e\u8868\u793a\n<pre>passenger-install-apache2-module --snippet<\/pre>\n<p>\u3068\u6253\u3064\u3068<\/p>\n<pre>LoadModule passenger_module \/usr\/local\/lib\/ruby\/gems\/2.2.0\/gems\/passenger-5.0.30\/buildout\/apache2\/mod_passenger.so\r\n\r\n &lt;IfModule mod_passenger.c&gt;\r\n PassengerRoot \/usr\/local\/lib\/ruby\/gems\/2.2.0\/gems\/passenger-5.0.30\r\n PassengerDefaultRuby \/usr\/local\/bin\/ruby\r\n &lt;\/IfModule&gt;\r\n<\/pre>\n<\/li>\n<li>\u4e0a\u8a18\u306e\u5185\u5bb9\u3092httpd\u306b\u8a2d\u5b9a\n<pre>touch \/etc\/httpd\/conf.d\/redmine.conf<\/pre>\n<ul class=\"list3\" style=\"padding-left:16px; \">\n<li>\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u5185\u5bb9\u306f\u4e0b\u8a18\n<pre> \r\n &lt;Directory \"\/var\/lib\/redmine\/public\"&gt;\r\n Require all granted\r\n &lt;\/Directory&gt;\r\n \r\n LoadModule passenger_module \/usr\/local\/lib\/ruby\/gems\/2.2.0\/gems\/passenger-5.0.30\/buildout\/apache2\/mod_passenger.so\r\n \r\n &lt;IfModule mod_passenger.c&gt;\r\n  PassengerRoot \/usr\/local\/lib\/ruby\/gems\/2.2.0\/gems\/passenger-5.0.30\r\n  PassengerDefaultRuby \/usr\/local\/bin\/ruby\r\n &lt;\/IfModule&gt;\r\n \r\n RackBaseURI \/redmine\r\n (\u3053\u306e\u6700\u5f8c\u306e1\u884c\u3082\u91cd\u8981)<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/h3>\n<\/ul>\n<ul class=\"list2\" style=\"padding-left:32px; \">\n<li>\u65e7redmine\u306efile\u3092\u30b3\u30d4\u30fc\u3059\u308b\n<pre>cd \/var\/lib\/redmine\r\nmv files filesBak\r\nmv filesback.tgz  .\r\ntar xvfz filesback.tgz\r\n\u3053\u308c\u3067 files \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c \/var\/lib\/redmine\u306e\u4e0b\u306b\u3067\u304d\u308b<\/pre>\n<\/li>\n<\/ul>\n<ul class=\"list1\" style=\"padding-left:16px; \">\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4fee\u6b63\u3059\u308b(\u3053\u308c\u304c\u91cd\u8981)\n<pre>cd \/var\/lib\/redmine\r\nRAILS_ENV=production bundle exec rake db:migrate<\/pre>\n<\/li>\n<li>Redmine\u306e\u4e0b\u3092 apache\u30e6\u30fc\u30b6\uff0capache\u30b0\u30eb\u30fc\u30d7\u306e\u6a29\u9650\u306b\u5909\u3048\u308b\n<pre>chown -R apache:apache \/var\/lib\/redmine<\/pre>\n<\/li>\n<li>\/var\/www\/html\/ \u304chttpd\u304c\u516c\u958b\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6642\uff0c\u3053\u306e\u4e0b\u306b\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u5f35\u308b\n<pre>ln -s \/var\/lib\/redmine\/public \/var\/www\/html\/redmine <br \/><\/pre>\n<\/li>\n<\/ul>\n<h3>\u8d77\u52d5<\/h3>\n<pre> systemctl restart httpd.service<\/pre>\n<p>\u8d77\u52d5\u6642\u306b\u81ea\u52d5\u3067\u7acb\u3061\u4e0a\u3052\u308b\u306b\u306f<\/p>\n<pre> systemctl enable httpd.service<\/pre>\n<h3>\u30a2\u30af\u30bb\u30b9<\/h3>\n<pre>http:\/\/localhost\/redmine\/ \u306e\u3068\u3053\u308d\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u8868\u793a\u3055\u308c\u308b\uff0e <br \/><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>CentOS7.2 \u306b\u65b0\u898f\u306bredmine3.2\u3092\u5165\u308c\u3066\uff0c\u65e7redmine1.1.2\u3067\u4f5c\u6210\u3057\u3066\u304d\u305f\u30c7\u30fc\u30bf\u3092\u79fb\u884c\u3067\u304d\u307e\u3057\u305f\uff0eredmine\u3063\u3066\u3088\u304f\u3067\u304d\u3066\u307e\u3059\uff0e\u4e0b\u8a18\u304c\u65b9\u6cd5\u3067\u3059\uff0e \u30c7\u30fc\u30bf\u306e\u4fdd\u5b58 \u30c7\u30fc\u30bf\u306e\u4fdd\u5b58(mysql) my &hellip; <a href=\"https:\/\/www.cl.cs.okayama-u.ac.jp\/?p=216\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=216"}],"version-history":[{"count":2,"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=\/wp\/v2\/posts\/216\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cl.cs.okayama-u.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}