RedmineInstallOSXMavericksServer » History » Version 15
Khedron Wilk, 2014-02-28 23:11
| 1 | 1 | Roland Laussat | h1. Installing Redmine on OS X 10.9 Mavericks Server |
|---|---|---|---|
| 2 | 2 | Roland Laussat | |
| 3 | This is a quick summary of the necessary steps for a simple install of Redmine on Apple OS X Mavericks Server 10.9. This is slightly different from the install for [[RedmineInstallOSXServer|Snow Leopard Server]]. This is meant only as a supplement, not a replacement, to the official install guide found [[RedmineInstall|here]]. |
||
| 4 | |||
| 5 | h2. Install Prerequisites |
||
| 6 | |||
| 7 | 9 | Roland Laussat | *Xcode 5 and MySQL Server* |
| 8 | 2 | Roland Laussat | |
| 9 | Get Xcode 5 from the Mac App Store or register for a free account and download from: https://developer.apple.com/downloads/ |
||
| 10 | Next, install the command line-tools via Terminal: |
||
| 11 | 14 | Khedron Wilk | <pre>xcode-select --install</pre> |
| 12 | 2 | Roland Laussat | |
| 13 | 6 | Roland Laussat | Then install MySQL Community Server - get it from http://dev.mysql.com/downloads/mysql (get the Mac OS X 10.7 64-bit DMG archive). |
| 14 | 2 | Roland Laussat | It will install a nifty little preference pane to start and stop the MySQL server. |
| 15 | |||
| 16 | Because the installer doesn't set a root password during the installation, you've got to set it with mysqladmin: |
||
| 17 | <pre>mysqladmin -u root password "newpwd"</pre> |
||
| 18 | Next, login to mysql and create the database: |
||
| 19 | <pre>mysql -u root -p</pre> |
||
| 20 | <pre>CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_general_ci</pre> |
||
| 21 | 5 | Roland Laussat | Grant _root_ user full privileges on the database: |
| 22 | 2 | Roland Laussat | <pre>GRANT ALL PRIVLEGES ON redmine.* TO root@localhost IDENTIFIED BY password;</pre> |
| 23 | |||
| 24 | The Redmine installer expects the MySQL client library in a different place, so you need to create a symbolic link to the original location: |
||
| 25 | 14 | Khedron Wilk | <pre>sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib</pre> |
| 26 | 2 | Roland Laussat | |
| 27 | 9 | Roland Laussat | *Redmine Prerequisites* |
| 28 | 2 | Roland Laussat | |
| 29 | Redmine is built on Ruby which comes with Xcode, but some gems are missing: |
||
| 30 | <pre>sudo gem install rails bundler passenger</pre> |
||
| 31 | Next, use passenger to build the apache2-passenger module: |
||
| 32 | <pre>sudo passenger-install-apache2-module</pre> |
||
| 33 | This will output three lines of code that you'll have to add to your Apache configuration - in OS X Mavericks it's necessary to edit two files: |
||
| 34 | <pre>/Library/Server/Web/Config/apache2/httpd_server_app.conf</pre> |
||
| 35 | and |
||
| 36 | <pre>/private/etc/httpd.conf</pre> |
||
| 37 | Simply add the lines to the end of your Apache configuration files. |
||
| 38 | |||
| 39 | Finally, OS X Mavericks has a problem to install the rmagick gem which is optional for a successful installation of Redmine, but if you want to display images and charts it's necessary. |
||
| 40 | Get the following packages: |
||
| 41 | 6 | Roland Laussat | ImageMagick - http://cactuslab.com/imagemagick/ (Note there are two versions, one with free type which requires XQuartz to be installed - the basic version is sufficient.) |
| 42 | Pgkconfig - http://macpkg.sourceforge.net |
||
| 43 | rmagick - http://rubygems.org/gems/rmagick (sometimes the download during installation fails, it's easier to have it stored locally) |
||
| 44 | 2 | Roland Laussat | |
| 45 | Install ImageMagick and Pkgconfig, both should be installed in the /opt directory by default. |
||
| 46 | 15 | Khedron Wilk | Because neither ImageMagick or Pkgconfig seems to add the path to the executable during the installation, you have to export the path variable: |
| 47 | <pre>export PATH=/opt/ImageMagick/bin:/opt/pkgconfig/bin:$PATH</pre> |
||
| 48 | 2 | Roland Laussat | |
| 49 | 5 | Roland Laussat | The following command should install the rmagick gem without errors (if it fails please check the paths to MagickCore.pc and MagickWand.h): |
| 50 | 2 | Roland Laussat | <pre>sudo C_INCLUDE_PATH=/opt/ImageMagick/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install --local ~/Downloads/rmagick-2.13.2</pre> |
| 51 | (Assuming rmagick has been downloaded to your Downloads directory) |
||
| 52 | |||
| 53 | h2. Install Redmine |
||
| 54 | 1 | Roland Laussat | |
| 55 | Get the latest stable build of Redmine and move the redmine directory to your web server root folder. |
||
| 56 | 9 | Roland Laussat | |
| 57 | *Configure Redmine* |
||
| 58 | |||
| 59 | 3 | Roland Laussat | @cd /Library/WebServer/Sites/redmine |
| 60 | 13 | Roland Laussat | sudo mkdir public/plugin_assets |
| 61 | 12 | Roland Laussat | sudo chown -R _www:_www tmp public/plugin_assets log files |
| 62 | 3 | Roland Laussat | sudo chmod -R 755 files log tmp public/plugin_assets |
| 63 | sudo cp config/database.yml.example config/database.yml@ |
||
| 64 | Edit database.yml, e.g. |
||
| 65 | <pre>production: |
||
| 66 | adapter: mysql |
||
| 67 | database: redmine |
||
| 68 | 1 | Roland Laussat | host: localhost |
| 69 | username: redmine |
||
| 70 | password: MYPASSWORD |
||
| 71 | 3 | Roland Laussat | socket: /tmp/mysql.sock</pre> |
| 72 | 9 | Roland Laussat | |
| 73 | 10 | Roland Laussat | *Run Bundler* |
| 74 | 9 | Roland Laussat | |
| 75 | 2 | Roland Laussat | <pre>sudo bundle install --without development test</pre> |
| 76 | Assuming the installation finished without errors you can generate the secret token: |
||
| 77 | <pre>sudo rake generate_secret_token</pre> |
||
| 78 | Next steps: |
||
| 79 | <pre>sudo RAILS_ENV=production rake db:migrate</pre> |
||
| 80 | <pre>sudo RAILS_ENV=production rake redmine:load_default_data</pre> |
||
| 81 | |||
| 82 | Last but not least you need to point Apache to the public folder inside the red mine directory to serve Redmine as a website. |
||
| 83 | 4 | Roland Laussat | Please make sure you tick _Allow overrides using .htaccess file_ in the advanced settings of your website configuration. |
| 84 | 2 | Roland Laussat | |
| 85 | For further information please see |
||
| 86 | [[RedmineInstallOSXServer|HowTo Install Redmine on Mac OS X Server]] 10.6 Snow Leopard |
||
| 87 | and |
||
| 88 | [[RedmineInstallOSXLionServer|HowTo Install Redmine on Mac OS X Lion Server]] |
||
| 89 | in case some details are missing here. |