Home > Tags > dreamhost
dreamhost
dreamhost に redmine をインストール
- 2009/02/11
- Web開発関連
dreamhost に redmine をインストールした。参考にしたのは Redmine - DreamHost 。
ほんとにこの通りにやったら動いた。ただ英語がちゃんと読めてなくてけっこうはまったのでつまづいた箇所をメモしておく。
- 0. 基本は下の英語をよく読んで作業を進める
- 1.2. 「Specify your web directory:」というドキュメントルートの設定項目が dreamhost のドメイン設定画面にあるので、そのドキュメントルートを「yoursubdomain.yourdomain.com」から「yoursubdomain.yourdomain.com/public」に変更する。
- 12. .htaccess をこの 6 行で置き換えます。
- 99. config/environment.rb の line:8「RAILS_GEM_VERSION」を 2.2.2 に変更します。これをしないとバージョンが一致しないエラーが発生しました。
1. From the Dreamhost control panel, create a new subdomain for the application such as yoursubdomain.yourdomain.com
1. Make sure the domain supports “Ruby on Rails Passenger (mod_rails)?”
2. Specify your web directory: /home/username/yoursubdomain.yourdomain.com/public
* you must add the public!!!
2. From the Dreamhost control panel create a new MySQL database named yourdatabasename
3. ssh into your Dreamhost account
4. cd ~/yoursubdomain.yourdomain.com
5. svn export --force svn://rubyforge.org/var/svn/redmine/branches/0.7-stable ./
* check http://www.redmine.org/wiki/redmine/Download for the latest version
6. also watch out for permissions
* chmod -v -R 755 ./*
7. cd ~/yoursubdomain.yourdomain.com/config
8. cp database.yml.example database.yml
9. nano database.yml
1. edit the database.yml config file with the appropriate info. Should be similar to the following
production:
adapter: mysql
database: yourdatabasename
username: yourusername
password: yourpassword
host: mysql.yourdomain.com
10. cd ~/yoursubdomain.yourdomain.com/public
11. cp dispatch.rb.example dispatch.rb
12. nano .htaccess (replace with following text)
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
ErrorDocument 500 "H2Application errorH2 Rails application failed to start properly"
* replace the H2 with the proper HTML tag when you place it in the .htaccess
13. cd ~/yoursubdomain.yourdomain.com
14. from application root type
* rake db:migrate RAILS_ENV="production"
15. also type the following to load config defaults
* rake redmine:load_default_data RAILS_ENV="production"
* choose "en" for english
16. browse to http://yoursubdomain.yourdomain.com
1. Make sure the domain supports “Ruby on Rails Passenger (mod_rails)?”
2. Specify your web directory: /home/username/yoursubdomain.yourdomain.com/public
* you must add the public!!!
2. From the Dreamhost control panel create a new MySQL database named yourdatabasename
3. ssh into your Dreamhost account
4. cd ~/yoursubdomain.yourdomain.com
5. svn export --force svn://rubyforge.org/var/svn/redmine/branches/0.7-stable ./
* check http://www.redmine.org/wiki/redmine/Download for the latest version
6. also watch out for permissions
* chmod -v -R 755 ./*
7. cd ~/yoursubdomain.yourdomain.com/config
8. cp database.yml.example database.yml
9. nano database.yml
1. edit the database.yml config file with the appropriate info. Should be similar to the following
production:
adapter: mysql
database: yourdatabasename
username: yourusername
password: yourpassword
host: mysql.yourdomain.com
10. cd ~/yoursubdomain.yourdomain.com/public
11. cp dispatch.rb.example dispatch.rb
12. nano .htaccess (replace with following text)
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
ErrorDocument 500 "H2Application errorH2 Rails application failed to start properly"
* replace the H2 with the proper HTML tag when you place it in the .htaccess
13. cd ~/yoursubdomain.yourdomain.com
14. from application root type
* rake db:migrate RAILS_ENV="production"
15. also type the following to load config defaults
* rake redmine:load_default_data RAILS_ENV="production"
* choose "en" for english
16. browse to http://yoursubdomain.yourdomain.com
phpフレームワークsymfonyをdreamhostへインストールする方法
- 2009/01/11
- 日記
dreamhost へ symfony をインストールしようと試みました。
- symfony をインストール
- symfony のバージョンを確認(エラーが発生)
- エラーの原因を調査する
symfony 本家から tar.gz のアーカイブを wget で取得して解凍します。
% cd ~
% mkdir -p symfony/vendor
% cd symfony/vendor
% wget http://www.symfony-project.org/get/symfony-1.2.2.tgz
% tar zxvf symfony-1.2.2.tgz
% mkdir -p symfony/vendor
% cd symfony/vendor
% wget http://www.symfony-project.org/get/symfony-1.2.2.tgz
% tar zxvf symfony-1.2.2.tgz
% cd ~/symfony/
% vendor/symfony-1.2.2/data/bin/symfony -V
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in
% vendor/symfony-1.2.2/data/bin/symfony -V
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in
dreamhost の wiki を検索すると、symfony についてのページがあるので参考にする。(dreamhost で困ったらとりあえず wiki で検索する。)
原因はパスの設定のようなので対応
% export PATH=/usr/local/php5/bin:${PATH}
これで正常に動く
% vendor/symfony-1.2.2/data/bin/symfony -V
symfony version 1.2.2
symfony version 1.2.2
Premature end of script headers: php5.cgi
CakePHPをセットアップしてindex.phpにアクセスすると500 Internal Server Error。
エラーログは以下。
Premature end of script headers: php5.cgi
今のところ手がかりなし
仕方がないので以下のようにphp4で動作するように.htaccessを無理矢理修正
- RewriteRule ^(.*)$ index.php4?url=$1 [QSA,L]
+ RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
ホーム > タグ > dreamhost