One person's experience with installing mx

From mx Help Wiki
Revision as of 17:12, 22 January 2007 by Adeans (Talk | contribs)

Jump to: navigation, search

This is my experience with installing mx on my laptop (Apple Powerbook), so I can edit it/customize it. Here's what you need:

Contents

Apple's developer tools

You need developer's tools, and it's easy to get them. They should be on the start-up disk you got with your mac. Otherwise you can get them here You'll need to create an account if you don't have one already. The download is pretty straightforward. try this first:

gcc -v

If you see something other than 'command not found' you're probably ok.

MySQL

Another straightforward download (I used this link). Make sure you install MySQL, the MySQL start-up item, and the MySQL.prefPane. You will also want to secure your mysql.

bash login

Make sure you have the bash login fiel set up correctly. Open a terminal window and type the following at the prompt (prompt$):

vi .bash_login

Now look for this line: export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

It should be at the end of the file (if file exists); if not, hit the i key to insert, paste the line in there, hit the escape key, and then type (don't include the quotes): ':wq'

Open a new terminal window and type:

echo $PATH

You should see this:

/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/mysql/bin

terminal settings

If terminal is open check your preferences (Terminal -> preferences). Make sure the 'When creating a new Terminal window' settings are set to "Execute this command (specify complete path):" with '/bin/bash' in the text box.

Readline

To install Redline open a terminal window and type these commands one by one:

 curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
 tar xzvf readline-5.1.tar.gz
 cd readline-5.1
 ./configure --prefix=/usr/local
 make
 sudo make install
 cd ..

RubyGems

To install RubyGems open a terminal window (or keep using the one you've been using) and use these commands:

curl -O http://rubyforge-files.ruby-forum.com/rubygems/rubygems-0.9.0.tgz
tar xzvf rubygems-0.9.0.tgz
cd rubygems-0.9.0
sudo ruby setup.rb
cd ..

Rails

To install RubyGems open a terminal window (or keep using the one you've been using) and use this command:

sudo gem install rails --include-dependencies

And also install RedCloth:

sudo gem install redcloth

SVN

You probably also want to install SVN (a.k.a. Subversion). I used this link, and the download/install was pretty straight forward.

Set up the database

Assuming you have successfully installed mx you'll need to set up your database. Migrate your terminal to the 'db' directory. This command will likely do it:

cd ~/mx/trunk/db 

from db directory use these commands (you should have secured your MySQL first):

mysql -u root -p

then type these in MySQL (commands always have to end in ';'):

GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';
create database mx_development;
use mx_development;
source tables.sql;

If you can get a copy of data that's already in use you can set it up by quitting MySQL and then, in your terminal window type:

cd dumps
rake restore file=data.sql
Personal tools