ついでに、Redmineの導入についても…

書いておこう。

もちろん、先の「Redmine Update」に関しても、この事も、テキストファイルとして(最低3カ所に)保存はしてあるのだが、アクセスできなくなってしまったときの事を考慮しておく必要がある。

------------------------------
参考サイト
http://redmine.jp/guide/RedmineInstall/
------------------------------
==================================================
sudo
==================================================
gem update --system --verbose
gem install rails --verbose
gem install rack --verbose
gem install rake --verbose
gem install fastthread --verbose
gem install simplecov-rcov --verbose
setenv ARCHFLAGS "-arch x86_64" 
# gem install mysql -- --with-mysql-config=/usr/local/bin/mysql_config
gem install mysql2 -- --with-mysql-config=/usr/local/bin/mysql_config
# setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/lib/pkgconfig
# gem install rmagick --verbose
gem install rmagick --verbose
gem install bundler --verbose
==================================================
mysql
==================================================
create database Redmine character set utf8;
create user 'Redmine'@'localhost' identified by 'Redmine';
grant all privileges on Redmine.* to 'Redmine'@'localhost';
==================================================
User
==================================================
cd redmine
==================================================
# bundle install --without development test rmagick
sudo bundle install --without development test
rake generate_secret_token
==================================================
cd config
cp database.yml.example database.yml
vi database.yml
production:
adapter: mysql2
database: Redmine
host: localhost
username: Redmine
password: "Redmine" 
encoding: utf8
socket: /var/mysql/mysql.sock
==================================================
rake db:migrate RAILS_ENV="production" 
==================================================
cd config
==================================================
cp -p configuration.yml.example configuration.yml
vi configuration.yml
cf. grep -v # configuration.yml
default:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: localhost
port: 25
domain: redmine.org
enable_starttls_auto: false
attachments_storage_path:
autologin_cookie_name:
autologin_cookie_path:
autologin_cookie_secure:
scm_subversion_command:
scm_mercurial_command:
scm_git_command:
scm_cvs_command:
scm_bazaar_command:
scm_darcs_command:
scm_stderr_log_file:
database_cipher_key:
rmagick_font_path:
production:
development:
==================================================
vi application.rb
config.time_zone = 'Osaka'
==================================================
cd environments
vi production.rb
# Prepend all log lines with the following tags
config.log_tags = [ :host, :remote_ip ]
==================================================
test
==================================================
ruby script/rails server webrick -e production
http://localhost:3000/
==================================================
sudo
==================================================
brew install passenger
To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
LoadModule passenger_module /usr/local/opt/passenger/libout/apache2/mod_passenger.so
PassengerRoot /usr/local/opt/passenger
PassengerDefaultRuby /usr/bin/ruby
To activate Phusion Passenger for Nginx, run:
brew install nginx --with-passenger
==> Summary
/usr/local/homebrew/Cellar/passenger/4.0.14: 2902 files, 73M, built in 95 seconds
==================================================
gem install passenger --verbose
passenger-install-apache2-module
--------------------------------------------
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-4.0.14/buildout/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-4.0.14
PassengerDefaultRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!
Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:
ServerName www.yourhost.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /somewhere/public    
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:
/Library/Ruby/Gems/1.8/gems/passenger-4.0.14/doc/Users guide Apache.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
==================================================
0000_80_.conf
<Directory "/Library/WebServer/Documents">
Options All -Indexes +ExecCGI +Includes +MultiViews
AllowOverride None
DAV Off
Deny from all
ErrorDocument 403 /customerror/websitesoff403.html
AllowOverride All
Order allow,deny
Allow from all
RailsBaseURI /redmine
==================================================
シンボリックリンクの作成
==================================================
cd /Library/WebServer/
ln -s redmine-2.x.x redmine
cd Documents/
ln -s ../redmine/public redmine
==================================================
データのバックアップ
==================================================
/usr/local/mysql/bin/mysqldump redmine -uroot -p --default-character-set=UTF8 --opt -r_redmine_dump.sql
mysql -u root -p Redmine < _redmine_dump.sql
==================================================
アクセスURL
==================================================
http://サーバーネーム/redmine/
==================================================
crontab ... 仕事をしてねぇヤツにメールを送る
==================================================
#==================================================
sudo
==================================================
gem update --system --verbose
gem install rails --verbose
gem install rack --verbose
gem install rake --verbose
gem install fastthread --verbose
gem install simplecov-rcov --verbose
setenv ARCHFLAGS "-arch x86_64" 
# gem install mysql -- --with-mysql-config=/usr/local/bin/mysql_config
gem install mysql2 -- --with-mysql-config=/usr/local/bin/mysql_config
# setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/lib/pkgconfig
# gem install rmagick --verbose
gem install rmagick --verbose
gem install bundler --verbose
==================================================
mysql
==================================================
create database Redmine character set utf8;
create user 'Redmine'@'localhost' identified by 'Redmine';
grant all privileges on Redmine.* to 'Redmine'@'localhost';
==================================================
User
==================================================
cd /Redmine_Root/redmine/
==================================================
# bundle install --without development test rmagick
sudo bundle install --without development test
rake generate_secret_token
==================================================
cd config
cp database.yml.example database.yml
vi database.yml
production:
adapter: mysql2
database: Redmine
host: localhost
username: Redmine
password: "Redmine" 
encoding: utf8
socket: /var/mysql/mysql.sock
==================================================
rake db:migrate RAILS_ENV="production" 
==================================================
cd config
==================================================
cp -p configuration.yml.example configuration.yml
vi configuration.yml
cf. grep -v # configuration.yml
default:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: localhost
port: 25
domain: redmine.org
enable_starttls_auto: false
attachments_storage_path:
autologin_cookie_name:
autologin_cookie_path:
autologin_cookie_secure:
scm_subversion_command:
scm_mercurial_command:
scm_git_command:
scm_cvs_command:
scm_bazaar_command:
scm_darcs_command:
scm_stderr_log_file:
database_cipher_key:
rmagick_font_path:
production:
development:
==================================================
vi application.rb
config.time_zone = 'Osaka'
==================================================
cd environments
vi production.rb
# Prepend all log lines with the following tags
config.log_tags = [ :host, :remote_ip ]
==================================================
test
==================================================
ruby script/rails server webrick -e production
http://localhost:3000/
==================================================
sudo
==================================================
brew install passenger
To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
LoadModule passenger_module /usr/local/opt/passenger/libout/apache2/mod_passenger.so
PassengerRoot /usr/local/opt/passenger
PassengerDefaultRuby /usr/bin/ruby
To activate Phusion Passenger for Nginx, run:
brew install nginx --with-passenger
==> Summary
/usr/local/homebrew/Cellar/passenger/4.0.14: 2902 files, 73M, built in 95 seconds
==================================================
gem install passenger --verbose
passenger-install-apache2-module
--------------------------------------------
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-4.0.14/buildout/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-4.0.14
PassengerDefaultRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!
Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Rails application in /somewhere. Add a virtual host to your
Apache configuration file and set its DocumentRoot to /somewhere/public:
ServerName www.yourhost.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /somewhere/public    
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
And that's it! You may also want to check the Users Guide for security and
optimization tips, troubleshooting and other useful information:
/Library/Ruby/Gems/1.8/gems/passenger-4.0.14/doc/Users guide Apache.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
==================================================
0000_80_.conf
==================================================
<Directory "/Documents_Root">
Options All -Indexes +ExecCGI +Includes +MultiViews
AllowOverride None
DAV Off
Deny from all
ErrorDocument 403 /customerror/websitesoff403.html
AllowOverride All
Order allow,deny
Allow from all
RailsBaseURI /redmine
==================================================
シンボリックリンクの作成
==================================================
cd /Redmine_Root/
ln -s redmine-2.x.x redmine
cd Documents/
ln -s ../redmine/public redmine
==================================================
データのバックアップ
==================================================
/usr/local/mysql/bin/mysqldump redmine -uroot -p --default-character-set=UTF8 --opt -r_redmine_dump.sql
mysql -u root -p Redmine < _redmine_dump.sql
==================================================
アクセスURL
==================================================
http://サーバーネーム/redmine/
==================================================
crontab ... 仕事をしてねぇヤツにメールを送る
==================================================
#
00 06 * * * cd /Redmine_Root/redmine/ ; /usr/bin/rake redmine:send_reminders RAILS_ENV=production 2>&1
#

コメントを残す