在ubuntu14.04上安裝redmine

基本上安裝過程都可以透過redmine的how to查看:

1.http://martin-denizet.com/install-redmine-2-5-x-git-subversion-ubuntu-14-04-apache2-rvm-passenger/
2.http://www.redmine.org/projects/redmine/wiki/HowToss

需要特別注意的是,我在安裝過程中沒有替網站加上ssl,裝完後去用,其實也是ok的。

其中要注意的是config/database.yml裡面的檔案:

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "my_password"
  encoding: utf8

上述的username跟password,記得改成進入mysql新增使用時的帳號密碼。然後 /etc/apache2/conf-available/passenger.conf的檔案在執行完passenger-install-apache2-module這行指令後,會顯示給你,加上去即可。記得將你自己的domain name指到/opt/redmine/current/public這個目錄下。

另外在sites-avalible裡新增一個.conf檔案,把redmine安裝過程裡說要加的都加一加。

ServerName redmine.domain.com
 

 ServerAdmin admin@domain.com
 ServerName redmine.domain.com
 
 # Enable SSL with Perfect Forward Secrecy
 SSLEngine on
 SSLProtocol +TLSv1.2 +TLSv1.1 +TLSv1
 SSLCompression off
 SSLHonorCipherOrder on
 SSLCipherSuite "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:RC4-SHA:AES256-GCM-SHA384:AES256-SHA256:CAMELLIA256-SHA:ECDHE-RSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:CAMELLIA128-SHA"
 SSLCertificateFile /etc/apache2/ssl/redmine.crt
 SSLCertificateKeyFile /etc/apache2/ssl/redmine.key
 
 DocumentRoot /opt/redmine/current/public/
 
 ## Passenger Configuration
 ## Details at http://www.modrails.com/documentation/Users%20guide%20Apache.html
 
 PassengerMinInstances 6
 PassengerMaxPoolSize 20
 RailsBaseURI /
 PassengerAppRoot /opt/redmine/current
 
 # Speeds up spawn time tremendously -- if your app is compatible. 
 # RMagick seems to be incompatible with smart spawning
 RailsSpawnMethod smart
 
 # Keep the application instances alive longer. Default is 300 (seconds)
 PassengerPoolIdleTime 1000
 
 # Keep the spawners alive, which speeds up spawning a new Application
 # listener after a period of inactivity at the expense of memory.
 RailsAppSpawnerIdleTime 3600
 
 # Additionally keep a copy of the Rails framework in memory. If you're 
 # using multiple apps on the same version of Rails, this will speed up
 # the creation of new RailsAppSpawners. This isn't necessary if you're
 # only running one or 2 applications, or if your applications use
 # different versions of Rails.
 PassengerMaxPreloaderIdleTime 0
 
 # Just in case you're leaking memory, restart a listener 
 # after processing 5000 requests
 PassengerMaxRequests 5000
 
 # only check for restart.txt et al up to once every 5 seconds, 
 # instead of once per processed request
 PassengerStatThrottleRate 5
 
 # If user switching support is enabled, then Phusion Passenger will by default run the web application as the owner if the file config/environment.rb (for Rails apps) or config.ru (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of environment.rb/config.ru.
 PassengerUser www-data
 PassengerGroup www-data
 
 # By default, Phusion Passenger does not start any application instances until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application instances during Apache startup.
 PassengerPreStart https://localhost
  
 
 Options +Indexes +FollowSymLinks -MultiViews
 AllowOverride All
 
     Order allow,deny
     Allow from all
 
 = 2.3>
     Require all granted
 
 
 
 AddOutputFilter DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css
 BrowserMatch ^Mozilla/4 gzip-only-text/html
 BrowserMatch ^Mozilla/4.0[678] no-gzip
 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
 
 
 ErrorLog ${APACHE_LOG_DIR}/redmine.error.log
 LogLevel warn
 CustomLog ${APACHE_LOG_DIR}/redmine.access.log combined
 ServerSignature Off
 


註:SSL相關的可以跳過。

其他應該都沒什麼大問題了,有空再來研究加上SSL。