Project

General

Profile

Actions

RedmineInstallOSXLionServer » History » Revision 1

Revision 1/16 | Next »
Art Kuo, 2012-06-02 01:03


Installing Redmine on Mac OS X 10.7 Lion Server

This is a quick summary of the necessary steps for a simple install of Redmine on Apple OS X Lion Server 10.7. It is meant only as a supplement, not a replacement, to the official install guide found here.

Step by Step

Install Prerequisites

  1. Install Xcode/OS X Developer Tools
    Install from the Mac App Store or register for a free account and download from: https://developer.apple.com/downloads/
  2. Install OS X MySQL and associated Libraries
    Download http://www.mysql.com/downloads/mysql/
    Select latest 64-bit version, e.g. 5.5.25
    Run the installation package .pkg file. This will install into /usr/local/mysql/bin
    Run the MySQLStartupItem.pkg file to use GUI to start automatically after startup of your server. (Of course, command line also works.)
    Open the MySQL.prefPane and install for all users. This provides a GUI for starting and stopping. (Of couse, command line also works.)
    Set the root password for your new installation of MySQL. One way is to use the MySQLWorkbench:http://www.mysql.com/products/workbench/. Or from the command line:
    mysqladmin -u root password NEWPASSWORD where your password substitutes for NEWPASSWORD
    Add MySQL to the path
    In terminal:
    sudo touch /etc/paths.d/mysql (creates a file in which you type the path)
    sudo nano /etc/paths.d/mysql
    In editor type /usr/local/mysql/bin then save and exit
    Enter startup options to tell the MySQL client and daemon to connect to the local server.
    In terminal:
    sudo nano /etc/my.cnf
    In editor, add the following as appropriate:
    [mysqld]
    socket = /tmp/mysql.sock
    [client]
    socket = /tmp/mysql.sock
    http://www.opensource.apple.com/other/MySQL-53.binaries.tar.gz (or MySQL-54 for OSX 10.6.7)
    sudo tar -xvf ~/Downloads/MySQL-53.binaries.tar -C ~/Downloads
    or if you downloaded a .gz file,
    sudo tar -xzvf ~/Downloads/MySQL-53.binaries.tar.gz -C ~/Downloads
    This will produce a root.tar archive, which must then be extracted
    sudo tar -xzvf ~/Downloads/MySQL-53.binaries/MySQL-53.root.tar.gz -C /
    If successful, tar should list the many files being placed in appropriate locations
  3. Install Ruby Gems
    sudo gem install rails -v=2.3.5
    sudo gem install rack -v=1.0.1
    sudo gem install rake -v=0.8.3
    sudo gem install fastthread
    sudo env ARCHFLAGS="-arch x86_64" gem install mysql -v=2.8.1
  4. If you are running desktop OS X (not the Server edition): See RedmineInstallOSX
  5. If you are running OS X Server: Install Passenger
    sudo gem install passenger
    sudo passenger-install-apache2-module
    The apache2 module installation will ask you to add several lines to the apache configuration file. Some likely locations for this are /etc/apache2/httpd.conf (standard OS X Server installation) and /opt/local/apache2/conf/httpd.conf (MacPorts installation).
  6. Install Passenger Pref Pane
    Download and Install: http://www.fngtps.com/passenger-preference-pane

Install Redmine

  1. Checkout Redmine
    cd /Library/WebServer/Sites/
    sudo svn checkout http://redmine.rubyforge.org/svn/trunk redmine
  2. Configure Passenger
    Open /Library/WebServer/Sites/redmine in Finder
    Start Passenger preference pane in System Preferences
    Drag redmine folder to Passenger (you may have to 'click to make changes')
    Set "Address" and click "Production"
  3. If you are running desktop OS X (not the Server edition): See RedmineInstallOSX
  4. If you are running OS X Server: Enable MySQL
    Launch Server Admin, click + Sign, Add Service, Check MySQL box, click Save
    Choose the MySQL service, click Set Root Password, click Start to start the service
  5. Setup Database
    mysql -u root -p
        create database redmine character set utf8;
        create user 'redmine'@'localhost' identified by 'my_password';
        grant all privileges on redmine.* to 'redmine'@'localhost';
  6. Configure Redmine
    cd /Library/WebServer/Sites/redmine
    sudo mkdir tmp public/plugin_assets
    sudo chmod -R 755 files log tmp public/plugin_assets
    sudo cp config/database.yml.example config/database.yml
    Edit database.yml, ie.:
    production:
      adapter: mysql
      database: redmine
      host: localhost
      username: redmine
      password: my_password
    
  7. Establish Defaults
    sudo rake generate_session_store (may require gems i18n and updated rails)
    sudo RAILS_ENV=production rake db:migrate
    RAILS_ENV=production rake redmine:load_default_data
    (If rails cannot access log file, do this: sudo chmod 0666 log/production.log)

Try out using webrick

  1. Run the ruby web server with ruby script/server webrick -e production
  2. Go to a web browser and view http://localhost:3000
    There may be some errors. An error regarding undefined "csrf_meta_tag" can be dealt with by deleting the corresponding line in app/views/layouts/base.rhtml (perhaps line 8, but use the error message to be sure of proper line).

For automated installs, check out How to install Redmine in Linux Windows and OS X using BitNami Redmine Stack

Updated by Art Kuo over 12 years ago · 1 revisions