RedmineInstallOSXMavericksServer » History » Version 18
Khedron Wilk, 2014-03-01 12:41
1 | 17 | Khedron Wilk | h1. Installing Redmine on OS X 10.9 Mavericks Server and Client |
---|---|---|---|
2 | 2 | Roland Laussat | |
3 | 17 | Khedron Wilk | This is a quick summary of the necessary steps for a simple install of Redmine on Apple OS X Mavericks Server 10.9. This summary can also be applied on Mavericks Client. 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]]. This summary contains instructions for MySQL only, for PostgreSQL please see related part of the official install guide. |
4 | 2 | Roland Laussat | |
5 | h2. Install Prerequisites |
||
6 | |||
7 | 9 | Roland Laussat | *Xcode 5 and MySQL Server* |
8 | 2 | Roland Laussat | |
9 | 17 | Khedron Wilk | Get Xcode 5 from the Mac App Store or register for a free account and download from: https://developer.apple.com/downloads/. (It seems that strictly speaking the full Xcode installation is not needed to install the command-line tools but download and install ful Xcode anyway to be on the safe side.) |
10 | 2 | Roland Laussat | Next, install the command line-tools via Terminal: |
11 | 14 | Khedron Wilk | <pre>xcode-select --install</pre> |
12 | 2 | Roland Laussat | |
13 | 1 | 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 | It will install a nifty little preference pane to start and stop the MySQL server. |
||
15 | |||
16 | 17 | Khedron Wilk | To make database administration easier you should include the database binaries in your path: |
17 | 18 | Khedron Wilk | <pre>export PATH=/usr/local/mysql/bin:$PATH</pre> (To make your life easier in the long run you may want to include this command in your ~/.bash_profile file.) |
18 | 17 | Khedron Wilk | |
19 | 1 | Roland Laussat | Because the installer doesn't set a root password during the installation, you've got to set it with mysqladmin: |
20 | 2 | Roland Laussat | <pre>mysqladmin -u root password "newpwd"</pre> |
21 | 17 | Khedron Wilk | Next, login to mysql. |
22 | 2 | Roland Laussat | <pre>mysql -u root -p</pre> |
23 | 17 | Khedron Wilk | Create the database, the database user and set privileges: |
24 | <pre><code class="sql">CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_general_ci; |
||
25 | CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password'; |
||
26 | GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';</code></pre> |
||
27 | 9 | Roland Laussat | |
28 | 17 | Khedron Wilk | |
29 | 2 | Roland Laussat | The Redmine installer expects the MySQL client library in a different place, so you need to create a symbolic link to the original location: |
30 | 1 | Roland Laussat | <pre>sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib</pre> |
31 | |||
32 | *Redmine Prerequisites* |
||
33 | |||
34 | Redmine is built on Ruby which comes with Xcode, but some gems are missing: |
||
35 | <pre>sudo gem install rails bundler passenger</pre> |
||
36 | Next, use passenger to build the apache2-passenger module: |
||
37 | <pre>sudo passenger-install-apache2-module</pre> |
||
38 | 17 | Khedron Wilk | This will in the end output few lines of configuration code that you'll have to add to your Apache configuration. Here follows an example, be aware that exact content may change with newer versions of related software: |
39 | <pre><code class="xml">LoadModule passenger_module /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so |
||
40 | <IfModule mod_passenger.c> |
||
41 | PassengerRoot /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.37 |
||
42 | PassengerDefaultRuby /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby |
||
43 | </IfModule></code></pre> |
||
44 | In OS X Mavericks it's necessary to put this code in one of two files: |
||
45 | Server: |
||
46 | 2 | Roland Laussat | <pre>/Library/Server/Web/Config/apache2/httpd_server_app.conf</pre> |
47 | 17 | Khedron Wilk | Client: |
48 | <pre>/etc/apache2/httpd.conf</pre> |
||
49 | Simply add the lines to the end of your Apache configuration files. Or put the code lines in a separate file that is included by the main conf-file. A suggestion is to create the following file and put the code in there: |
||
50 | <pre>/etc/apache2/other/passenger.conf</pre> |
||
51 | 15 | Khedron Wilk | |
52 | 17 | Khedron Wilk | |
53 | 2 | Roland Laussat | 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. |
54 | Get the following packages: |
||
55 | 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.) |
||
56 | 1 | Roland Laussat | Pgkconfig - http://macpkg.sourceforge.net |
57 | rmagick - http://rubygems.org/gems/rmagick (sometimes the download during installation fails, it's easier to have it stored locally) |
||
58 | |||
59 | Install ImageMagick and Pkgconfig, both should be installed in the /opt directory by default. |
||
60 | Because neither ImageMagick or Pkgconfig seems to add the path to the executable during the installation, you have to export the path variable: |
||
61 | <pre>export PATH=/opt/ImageMagick/bin:/opt/pkgconfig/bin:$PATH</pre> |
||
62 | |||
63 | The following command should install the rmagick gem without errors (if it fails please check the paths to MagickCore.pc and MagickWand.h): |
||
64 | <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.gem</pre> |
||
65 | 9 | Roland Laussat | (Assuming rmagick has been downloaded to your Downloads directory) |
66 | |||
67 | h2. Install Redmine |
||
68 | 3 | Roland Laussat | |
69 | 13 | Roland Laussat | Get the latest stable build of Redmine and move the redmine directory to your web server root folder. |
70 | 12 | Roland Laussat | |
71 | 3 | Roland Laussat | *Configure Redmine* |
72 | |||
73 | 17 | Khedron Wilk | <pre>cd /Library/WebServer/Sites/redmine |
74 | sudo mkdir public/plugin_assets |
||
75 | sudo chown -R _www:_www tmp public/plugin_assets log files |
||
76 | sudo chmod -R 755 files log tmp public/plugin_assets |
||
77 | sudo cp config/database.yml.example config/database.yml</pre> |
||
78 | 1 | Roland Laussat | Edit database.yml, e.g. |
79 | 17 | Khedron Wilk | <pre><code class="yaml">production: |
80 | adapter: mysql2 |
||
81 | 3 | Roland Laussat | database: redmine |
82 | 1 | Roland Laussat | host: localhost |
83 | username: redmine |
||
84 | 17 | Khedron Wilk | password: my_password</code></pre> |
85 | 1 | Roland Laussat | |
86 | 3 | Roland Laussat | *Run Bundler* |
87 | 9 | Roland Laussat | |
88 | 10 | Roland Laussat | <pre>sudo bundle install --without development test</pre> |
89 | 9 | Roland Laussat | Assuming the installation finished without errors you can generate the secret token: |
90 | 2 | Roland Laussat | <pre>sudo rake generate_secret_token</pre> |
91 | Next steps: |
||
92 | <pre>sudo RAILS_ENV=production rake db:migrate</pre> |
||
93 | <pre>sudo RAILS_ENV=production rake redmine:load_default_data</pre> |
||
94 | |||
95 | 17 | Khedron Wilk | If you want to do a quick test and take Redmine for a ride your can now do so: |
96 | <pre>sudo ruby script/rails server webrick -e production</pre> |
||
97 | This will make your redmine available att http://localhost:3000 |
||
98 | |||
99 | |||
100 | 2 | Roland Laussat | Last but not least you need to point Apache to the public folder inside the red mine directory to serve Redmine as a website. |
101 | Please make sure you tick _Allow overrides using .htaccess file_ in the advanced settings of your website configuration. |
||
102 | 17 | Khedron Wilk | |
103 | 2 | Roland Laussat | |
104 | For further information please see |
||
105 | 1 | Roland Laussat | [[RedmineInstallOSXServer|HowTo Install Redmine on Mac OS X Server]] 10.6 Snow Leopard |
106 | and |
||
107 | [[RedmineInstallOSXLionServer|HowTo Install Redmine on Mac OS X Lion Server]] |
||
108 | in case some details are missing here. |