ubuntu下配置lighttpd redmin

安装 rails

apt-get install ruby ruby1.8-dev rake libopenssl-ruby

cd /tmp

wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz

tar zxf rubygems-1.3.5.tgz

cd rubygems-1.3.5

ruby setup.rb --no-ri --no-rdoc

cd /usr/bin

ln -s gem1.8 gem

gem install rails --no-ri --no-rdoc



apt-get install build-essential sqlite3 libsqlite3-dev

gem install sqlite3-ruby --no-ri --no-rdoc





安装 redmine

apt-get install subversion

svn co svn://rubyforge.org/var/svn/redmine/trunk redmine



配置 redmine

cd redmine



新建文件 config/database.yml 如下:

production:

  adapter: sqlite3

  database: db/production.sqlite3

  pool: 5

  timeout: 5000



rake config/initializers/session_store.rb

rake db:migrate RAILS_ENV=production

rake redmine:load_default_data RAILS_ENV=production





cd public

cp dispatch.fcgi.example dispatch.fcgi



测试:./script/server -e production

打开 http://IP:3000 看看,正常就OK了



把 redmine 拷到 git 用户目录下

cp redmine-0.8.5 /home/git/redmine -Rf

chown git:git redmine -Rf







安装 lighttpd

apt-get install lighttpd libfcgi-ruby1.8



配置 lighttpd

cd /etc/lighttpd

备份一下

cp lighttpd.conf lighttpd.conf.bak

下面的是最简单的配置:

server.modules = (

  "mod_fastcgi"

)



var.root = "/home/git/redmine"



server.username = "git"

server.groupname = "git"

server.document-root = var.root + "/public"

#server.errorlog = "/tmp/error.log"

#server.pid-file = "/tmp/lighttpd.pid"

server.error-handler-404 = "/dispatch.fcgi"



include_shell "/usr/share/lighttpd/create-mime.assign.pl"





fastcgi.server = ( ".fcgi" => ( "localhost" =>

    (

      "max-procs" => 1,

      "socket" => "/tmp/rails.socket",

      "bin-path" => var.root + "/public/dispatch.fcgi",

      "bin-environment" => ( "RAILS_ENV" => "production" )

    )

  )

)



重启 lighttpd

/etc/init.d/lighttpd restart


你可能感兴趣的:(git,ubuntu,lighttpd,Ruby,Rails)