Project

General

Profile

RedmineInstallOSXMavericksServer » History » Revision 9

Revision 8 (Roland Laussat, 2013-10-29 03:11) → Revision 9/35 (Roland Laussat, 2013-10-29 03:12)

h1. Installing Redmine on OS X 10.9 Mavericks Server 

 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]]. 

 h2. Install Prerequisites  

 *Xcode ## Xcode 5 and MySQL Server* Server 

 Get Xcode 5 from the Mac App Store or register for a free account and download from: https://developer.apple.com/downloads/ 
 Next, install the command line-tools via Terminal: 
 <pre>xcode-select install</pre> 

 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). 
 It will install a nifty little preference pane to start and stop the MySQL server. 

 Because the installer doesn't set a root password during the installation, you've got to set it with mysqladmin: 
 <pre>mysqladmin -u root password "newpwd"</pre> 
 Next, login to mysql and create the database: 
 <pre>mysql -u root -p</pre> 
 <pre>CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_general_ci</pre> 
 Grant _root_ user full privileges on the database: 
 <pre>GRANT ALL PRIVLEGES ON redmine.* TO root@localhost IDENTIFIED BY password;</pre> 

 The Redmine installer expects the MySQL client library in a different place, so you need to create a symbolic link to the original location: 
 <pre>sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib    /usr/lib/libmysqlclienrt.18.dylib</pre> 

 *Redmine Prerequisites* # Redmine Prerequisites 

 Redmine is built on Ruby which comes with Xcode, but some gems are missing: 
 <pre>sudo gem install rails bundler passenger</pre> 
 Next, use passenger to build the apache2-passenger module: 
 <pre>sudo passenger-install-apache2-module</pre> 
 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: 
 <pre>/Library/Server/Web/Config/apache2/httpd_server_app.conf</pre> 
 and  
 <pre>/private/etc/httpd.conf</pre> 
 Simply add the lines to the end of your Apache configuration files. 

 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. 
 Get the following packages: 
 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.) 
 Pgkconfig - http://macpkg.sourceforge.net 
 rmagick - http://rubygems.org/gems/rmagick (sometimes the download during installation fails, it's easier to have it stored locally) 

 Install ImageMagick and Pkgconfig, both should be installed in the /opt directory by default. 
 Because Pkgconfig doesn't add the path to the executable during the installation, you have to export the path variable: 
 <pre>export PATH=/opt/pkgconfig/bin:$PATH</pre> 

 The following command should install the rmagick gem without errors (if it fails please check the paths to MagickCore.pc and MagickWand.h): 
 <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> 
 (Assuming rmagick has been downloaded to your Downloads directory) 

 h2. Install Redmine 

 Get the latest stable build of Redmine and move the redmine directory to your web server root folder. 

 *Configure Redmine* 

	 
 # Configure Redmine 
	 @cd /Library/WebServer/Sites/redmine 
	 sudo mkdir tmp public/plugin_assets 
         sudo chown -R www:www tmp public/plugin_assets log files 
    	 sudo chmod -R 755 files log tmp public/plugin_assets 
	 sudo cp config/database.yml.example config/database.yml@ 
 Edit database.yml, e.g. 
 <pre>production: 
   adapter: mysql 
   database: redmine 
   host: localhost 
   username: redmine 
   password: MYPASSWORD 
   socket: /tmp/mysql.sock</pre> 

 *Run Bundler:* 

 
 # Run Bundler: 
 <pre>sudo bundle install --without development test</pre> 
 Assuming the installation finished without errors you can generate the secret token: 
 <pre>sudo rake generate_secret_token</pre> 
 Next steps: 
 <pre>sudo RAILS_ENV=production rake db:migrate</pre> 
 <pre>sudo RAILS_ENV=production rake redmine:load_default_data</pre> 

 Last but not least you need to point Apache to the public folder inside the red mine directory to serve Redmine as a website. 
 Please make sure you tick _Allow overrides using .htaccess file_ in the advanced settings of your website configuration. 

 For further information please see 
 [[RedmineInstallOSXServer|HowTo Install Redmine on Mac OS X Server]] 10.6 Snow Leopard 
 and 
 [[RedmineInstallOSXLionServer|HowTo Install Redmine on Mac OS X Lion Server]] 
 in case some details are missing here.