# yum -y install rubygems
# gem install rake Fetching: rake-10.3.2.gem (100%) Successfully installed rake-10.3.2 Parsing documentation for rake-10.3.2 Installing ri documentation for rake-10.3.2 Done installing documentation for rake after 2 seconds 1 gem installed
参考 http://www2s.biglobe.ne.jp/~idesaku/sss/tech/rake/#install
[root@spring8 ~]# gem install rails Fetching: i18n-0.6.11.gem (100%) Successfully installed i18n-0.6.11 Fetching: thread_safe-0.3.4.gem (100%) Successfully installed thread_safe-0.3.4 Fetching: tzinfo-1.2.1.gem (100%) Successfully installed tzinfo-1.2.1 Fetching: minitest-5.4.0.gem (100%) Successfully installed minitest-5.4.0 Fetching: activesupport-4.1.4.gem (100%) Successfully installed activesupport-4.1.4 Fetching: rack-1.5.2.gem (100%) Successfully installed rack-1.5.2 Fetching: rack-test-0.6.2.gem (100%) Successfully installed rack-test-0.6.2 Fetching: builder-3.2.2.gem (100%) Successfully installed builder-3.2.2 Fetching: erubis-2.7.0.gem (100%) Successfully installed erubis-2.7.0 Fetching: actionview-4.1.4.gem (100%) Successfully installed actionview-4.1.4 Fetching: actionpack-4.1.4.gem (100%) Successfully installed actionpack-4.1.4 Fetching: activemodel-4.1.4.gem (100%) Successfully installed activemodel-4.1.4 Fetching: arel-5.0.1.20140414130214.gem (100%) Successfully installed arel-5.0.1.20140414130214 Fetching: activerecord-4.1.4.gem (100%) Successfully installed activerecord-4.1.4 Fetching: mime-types-1.25.1.gem (100%) Successfully installed mime-types-1.25.1 Fetching: polyglot-0.3.5.gem (100%) Successfully installed polyglot-0.3.5 Fetching: treetop-1.4.15.gem (100%) Successfully installed treetop-1.4.15 Fetching: mail-2.5.4.gem (100%) Successfully installed mail-2.5.4 Fetching: actionmailer-4.1.4.gem (100%) Successfully installed actionmailer-4.1.4 Fetching: thor-0.19.1.gem (100%) Successfully installed thor-0.19.1 Fetching: railties-4.1.4.gem (100%) Successfully installed railties-4.1.4 Fetching: bundler-1.6.5.gem (100%) Successfully installed bundler-1.6.5 Fetching: hike-1.2.3.gem (100%) Successfully installed hike-1.2.3 Fetching: multi_json-1.10.1.gem (100%) Successfully installed multi_json-1.10.1 Fetching: tilt-1.4.1.gem (100%) Successfully installed tilt-1.4.1 Fetching: sprockets-2.12.1.gem (100%) Successfully installed sprockets-2.12.1 Fetching: sprockets-rails-2.1.3.gem (100%) Successfully installed sprockets-rails-2.1.3 Fetching: rails-4.1.4.gem (100%) Successfully installed rails-4.1.4 Parsing documentation for actionmailer-4.1.4 Installing ri documentation for actionmailer-4.1.4 Parsing documentation for actionpack-4.1.4 Installing ri documentation for actionpack-4.1.4 Parsing documentation for actionview-4.1.4 Installing ri documentation for actionview-4.1.4 Parsing documentation for activemodel-4.1.4 Installing ri documentation for activemodel-4.1.4 Parsing documentation for activerecord-4.1.4 Installing ri documentation for activerecord-4.1.4 Parsing documentation for activesupport-4.1.4 Installing ri documentation for activesupport-4.1.4 Parsing documentation for arel-5.0.1.20140414130214 Installing ri documentation for arel-5.0.1.20140414130214 Parsing documentation for builder-3.2.2 Installing ri documentation for builder-3.2.2 Parsing documentation for bundler-1.6.5 Installing ri documentation for bundler-1.6.5 Parsing documentation for erubis-2.7.0 Installing ri documentation for erubis-2.7.0 Parsing documentation for hike-1.2.3 Installing ri documentation for hike-1.2.3 Parsing documentation for i18n-0.6.11 Installing ri documentation for i18n-0.6.11 Parsing documentation for mail-2.5.4 Installing ri documentation for mail-2.5.4 Parsing documentation for mime-types-1.25.1 Installing ri documentation for mime-types-1.25.1 Parsing documentation for minitest-5.4.0 Installing ri documentation for minitest-5.4.0 Parsing documentation for multi_json-1.10.1 Installing ri documentation for multi_json-1.10.1 Parsing documentation for polyglot-0.3.5 Installing ri documentation for polyglot-0.3.5 Parsing documentation for rack-1.5.2 Installing ri documentation for rack-1.5.2 Parsing documentation for rack-test-0.6.2 Installing ri documentation for rack-test-0.6.2 Parsing documentation for rails-4.1.4 Installing ri documentation for rails-4.1.4 Parsing documentation for railties-4.1.4 Installing ri documentation for railties-4.1.4 Parsing documentation for sprockets-2.12.1 Installing ri documentation for sprockets-2.12.1 Parsing documentation for sprockets-rails-2.1.3 Installing ri documentation for sprockets-rails-2.1.3 Parsing documentation for thor-0.19.1 Installing ri documentation for thor-0.19.1 Parsing documentation for thread_safe-0.3.4 Installing ri documentation for thread_safe-0.3.4 Parsing documentation for tilt-1.4.1 Installing ri documentation for tilt-1.4.1 Parsing documentation for treetop-1.4.15 Installing ri documentation for treetop-1.4.15 Parsing documentation for tzinfo-1.2.1 Installing ri documentation for tzinfo-1.2.1 Done installing documentation for actionmailer, actionpack, actionview, activemodel, activerecord, activesupport, arel, builder, bundler, erubis, hike, i18n, mail, mime-types, minitest, multi_json, polyglot, rack, rack-test, rails, railties, sprockets, sprockets-rails, thor, thread_safe, tilt, treetop, tzinfo after 281 seconds 28 gems installed
参考 http://www.srcw.net/blog/2007/09/redmine.html
$ svn co http://svn.redmine.org/redmine/tags/2.5.2 redmine
# yum install -y rubygem-mysql2.x86_64 # yum -y install mysql-server
[root@atom ~]# chkconfig mysqld on 情報:'systemctl enable mysqld.service'へ転送しています。 Failed to issue method call: No such file or directory [root@atom ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service
$ mysqladmin -u root password mysqlここでは、ユーザー root のパスワードを mysql に設定します。 適宜適切なパスワードを設定します。
[tsuchiyama@atom 2.5.2]$ mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 5.5.38-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE redmine CHARACTER SET utf8; CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';Query OK, 1 row affected (0.05 sec) MariaDB [(none)]> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; Query OK, 0 rows affected (0.06 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> quit
参考 http://redmine.jp/guide/RedmineInstall
# yum install rake
$ gem install bundler Fetching: bundler-1.6.5.gem (100%) Successfully installed bundler-1.6.5 Parsing documentation for bundler-1.6.5 Installing ri documentation for bundler-1.6.5 Done installing documentation for bundler after 4 seconds 1 gem installed
# yum install ruby-devel.x86_64
[tsuchiyama@atom 2.5.2]$ bundle install --without development test Your Gemfile lists the gem activerecord-jdbcmysql-adapter (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. Fetching gem metadata from https://rubygems.org/......... Fetching additional metadata from https://rubygems.org/.. Resolving dependencies... Using rake 10.1.1 Using i18n 0.6.11 Using multi_json 1.10.1 Using activesupport 3.2.19 Using builder 3.0.0 Using activemodel 3.2.19 Using erubis 2.7.0 Using journey 1.0.4 Using rack 1.4.5 Using rack-cache 1.2 Using rack-test 0.6.2 Using hike 1.2.3 Using tilt 1.4.1 Using sprockets 2.2.2 Using actionpack 3.2.19 Using mime-types 1.25.1 Using polyglot 0.3.5 Using treetop 1.4.15 Using mail 2.5.4 Using actionmailer 3.2.19 Using arel 3.0.3 Using tzinfo 0.3.40 Using activerecord 3.2.19 Using activeresource 3.2.19 Using awesome_nested_set 2.1.6 Using bundler 1.6.5 Using coderay 1.1.0 Using rack-ssl 1.3.4 Installing json 1.8.1 Installing rdoc 3.12.2 Installing thor 0.19.1 Installing railties 3.2.19 Installing jquery-rails 2.0.3 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb checking for mysql_ssl_set()... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib64 --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby --with-mysql-config --without-mysql-config /usr/share/ruby/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/share/ruby/mkmf.rb:519:in `try_link0' from /usr/share/ruby/mkmf.rb:534:in `try_link' from /usr/share/ruby/mkmf.rb:720:in `try_func' from /usr/share/ruby/mkmf.rb:1004:in `block in have_func' from /usr/share/ruby/mkmf.rb:895:in `block in checking_for' from /usr/share/ruby/mkmf.rb:340:in `block (2 levels) in postpone' from /usr/share/ruby/mkmf.rb:310:in `open' from /usr/share/ruby/mkmf.rb:340:in `block in postpone' from /usr/share/ruby/mkmf.rb:310:in `open' from /usr/share/ruby/mkmf.rb:336:in `postpone' from /usr/share/ruby/mkmf.rb:894:in `checking_for' from /usr/share/ruby/mkmf.rb:1003:in `have_func' from extconf.rb:50:in `' Gem files will remain installed in /home/tsuchiyama/.gem/ruby/gems/mysql-2.8.1 for inspection. Results logged to /home/tsuchiyama/.gem/ruby/gems/mysql-2.8.1/ext/mysql_api/gem_make.out An error occurred while installing mysql (2.8.1), and Bundler cannot continue. Make sure that `gem install mysql -v '2.8.1'` succeeds before bundling.
$ cp config/database.yml.example config/database.yml
production: adapter: mysql database: redmine host: localhost username: root password: mysql
参考 http://redmine.jp/guide/RedmineInstall
$ rake db:migrate RAILS_ENV="production" $ rake load_default_data RAILS_ENV="production" (in /home/redmine/redmine) Select language: bg, cs, de, en, es, fr, he, it, ja, ko, nl, pl, pt, pt-br, ro, ru, sr, sv, zh, zh-tw [en] ja ==================================== Loading default configuration data for language: ja Note: The rake task load_default_data has been deprecated, please use the replacement version redmine:load_default_data
参考
$ script/server -e production start => Booting WEBrick... => Rails application started on http://0.0.0.0:3000 => Ctrl-C to shutdown server; call with --help for options [2008-02-28 21:45:36] INFO WEBrick 1.3.1 [2008-02-28 21:45:36] INFO ruby 1.8.5 (2006-08-25) [i386-linux] [2008-02-28 21:45:36] INFO WEBrick::HTTPServer#start: pid=3007 port=3000
http://localhost:3000/
# gem install mongrel_cluster --include-dependencies
参考 http://rubyist.g.hatena.ne.jp/muscovyduck/20070402/p1
mongrel_rails cluster::configure を使用して、mongrel_cluster.yml を 作成する。
$ mongrel_rails cluster::configure ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix Writing configuration file to config/mongrel_cluster.yml. $ less config/mongrel_cluster.yml --- log_file: log/mongrel.log port: 3000 pid_file: tmp/pids/mongrel.pid servers: 2
$ mongrel_rails cluster::configure -e production -p 3000 -c `pwd` ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix Writing configuration file to config/mongrel_cluster.yml. $ cat config/mongrel_cluster.yml --- cwd: /home/redmine/redmine log_file: log/mongrel.log port: "3000" environment: production pid_file: tmp/pids/mongrel.pid servers: 2
$ mongrel_rails cluster::configure -e production -p 3000 -c `pwd` -N 5 ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix Writing configuration file to config/mongrel_cluster.yml. $ cat config/mongrel_cluster.yml --- cwd: /home/redmine/redmine log_file: log/mongrel.log port: "3000" environment: production pid_file: tmp/pids/mongrel.pid servers: 5
$ mongrel_rails start -e production -p 3000 ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with production environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel 1.1.2 available at 0.0.0.0:3000 ** Use CTRL-C to stop.
参考 http://d.hatena.ne.jp/hayori/20071029/1193650726
$ mongrel_rails start -d -e production -p 3000 ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
http://localhost:3000/
# yum -y install subversion # yum -y install MySQL-shared # yum -y install MySQL-ruby # yum -y install MySQL-server # yum -y install MySQL-client # yum -y install rubygems # chkconfig apache2 on # chkconfig mysql on # /etc/init.d/mysql start # gem install rake # gem install mongrel_cluster --include-dependencies # gem install rails --include-dependencies # adduser redmine # passwd redmine $ svn co http://redmine.rubyforge.org/svn/tags/0.6.3 redmine $ mysqladmin -u root password mysql $ mysql -u root -p $ cd redmine/ $ cp config/database.yml.example config/database.yml $ vi config/database.yml $ rake db:migrate RAILS_ENV="production" $ rake load_default_data RAILS_ENV="production" $ mongrel_rails cluster::configure -e production -p 3000 $ mongrel_rails start -d -e production -p 3000