Difference between revisions of "One person's experience with installing mx"

From mx Help Wiki
Jump to: navigation, search
(terminal settings)
m (Rails)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This is my experience with installing mx on my laptop (Apple Powerbook), so I can edit it/customize it. It's worth learning some typical [http://www.google.com/search?q=Unix+commands Unix], [http://www.google.com/search?q=MySQL+commands MySQL], and [http://www.google.com/search?q=vi+commands vi] commands before attempting this. Here's what you need:
+
This is my experience with installing mx on my laptop (Apple Powerbook), so I can edit it/customize it. It's worth learning some typical [http://www.google.com/search?q=Unix+commands Unix], [http://www.google.com/search?q=MySQL+commands MySQL], and [http://www.google.com/search?q=vi+commands vi] commands before attempting this. I might have missed a couple steps. If there are obvious omissions please feel free to add them, and make sure you check the other installing directions ([[Installation]]). Here's what you need:
  
 
== Apple's developer tools ==
 
== Apple's developer tools ==
Line 12: Line 12:
 
== MySQL ==
 
== MySQL ==
  
Another straightforward download (I used this [http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-standard-5.0.27-osx10.4-powerpc.dmg/from/http://mysql.mirrors.hoobly.com/ link]). Make sure you install MySQL, the MySQL start-up item, and the MySQL.prefPane. You will also want to [[secure your mysql]].
+
Another straightforward download (I used this [http://dev.mysql.com/downloads/ 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 ==
 
== bash login ==
Line 40: Line 40:
 
  /usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/mysql/bin
 
  /usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/mysql/bin
  
== terminal settings ==
+
----
 +
 
 +
 
 +
== Note from another person about defining a PATH: ==
 +
 +
The path defines where the computer will look for the necessary programs, you can add as many paths to the PATH as you want.  So in the example above '''/usr/local/bin:''' is one path '''/sbin:''' is another etc. 
 +
If svn is installed but when you type  '''svn help''' and nothing happens then you may just need to define the correct PATH.
 +
First find where your computer has actually installed the software:
 +
    prompt:~ Name$ '''find / -name svn -print''' : this command will take a while but will print all of the places where svn resides
 +
than...
 +
  type '''env''' to find how your present PATH is set
 +
than if these two dont match you can correct it by:
 +
  prompt:~ Name$ '''echo $PATH > .bash_profile'''
 +
  prompt:~ Name$ '''emacs .bash_profile''' Edit your present PATH (This uses emacs but vi will work)
 +
  prompt:~ Name$ cat .bash_profile This command will then show you whats set (ex.    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/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.
 
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.
Line 46: Line 64:
 
== Readline ==
 
== Readline ==
  
To install Redline open a terminal window and type these commands one by one:
+
To install Readline open a terminal window and type these commands one by one:
  
 
   curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
 
   curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
Line 70: Line 88:
 
To install RubyGems open a terminal window (or keep using the one you've been using) and use this command:
 
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
+
  sudo gem install rails -v 1.2.6 --include-dependencies
  
 
And also install RedCloth:
 
And also install RedCloth:
Line 80: Line 98:
 
You probably also want to install SVN (a.k.a. [http://subversion.tigris.org/ Subversion]). I used this [http://subversion.tigris.org/servlets/NewsItemView?newsItemID=1755 link], and the download/install was pretty straight forward.
 
You probably also want to install SVN (a.k.a. [http://subversion.tigris.org/ Subversion]). I used this [http://subversion.tigris.org/servlets/NewsItemView?newsItemID=1755 link], and the download/install was pretty straight forward.
  
 +
For OSX try this quick install package: [http://www.codingmonkeys.de/mbo/Subversion-1.4.3.pkg.zip codingmonkeys] Its Subversion-1.4.3.pkg
 
== Set up the database ==
 
== Set up the database ==
  
Line 90: Line 109:
 
  mysql -u root -p
 
  mysql -u root -p
  
then type these in MySQL (commands always have to end in ';'):
+
then type these commands one by one in MySQL (commands always have to end in ';'):
  
 
  GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';
 
  GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';
Line 97: Line 116:
 
  source tables.sql;
 
  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:
+
For the last command make sure you are in the directory that contains '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
+
  cd <path to mx root>/db
  rake restore file=data.sql
+
  rake restore file=data.sql (or whatever the datafile name is)

Latest revision as of 09:26, 12 February 2008

This is my experience with installing mx on my laptop (Apple Powerbook), so I can edit it/customize it. It's worth learning some typical Unix, MySQL, and vi commands before attempting this. I might have missed a couple steps. If there are obvious omissions please feel free to add them, and make sure you check the other installing directions (Installation). Here's what you need:

Contents

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

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

[edit] bash login

Make sure you have the bash login file 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 the file exists); if not, hit the i key to insert, paste the line in there, hit the escape key, and then type

:wq

If you are unsure and want to leave without making changes hit escape and type this instead:

:q!

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


[edit] Note from another person about defining a PATH:

The path defines where the computer will look for the necessary programs, you can add as many paths to the PATH as you want. So in the example above /usr/local/bin: is one path /sbin: is another etc. If svn is installed but when you type svn help and nothing happens then you may just need to define the correct PATH. First find where your computer has actually installed the software:

   prompt:~ Name$ find / -name svn -print : this command will take a while but will print all of the places where svn resides

than...

  type env to find how your present PATH is set

than if these two dont match you can correct it by:

  prompt:~ Name$ echo $PATH > .bash_profile
  prompt:~ Name$ emacs .bash_profile Edit your present PATH (This uses emacs but vi will work)
  prompt:~ Name$ cat .bash_profile This command will then show you whats set (ex.    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin)


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

[edit] Readline

To install Readline 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 ..

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

[edit] 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 -v 1.2.6 --include-dependencies

And also install RedCloth:

sudo gem install redcloth

[edit] SVN

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

For OSX try this quick install package: codingmonkeys Its Subversion-1.4.3.pkg

[edit] 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 commands one by one 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;

For the last command make sure you are in the directory that contains '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 <path to mx root>/db 
rake restore file=data.sql (or whatever the datafile name is)
Personal tools