20070723

macports & ruby installation part II

I had to post another one... F*cking thing is a pain when it's the first time running it....

So this post is dedicated to anyone that has a mac and wants to pursue a macport way of installing RoR & MySQL

1) Download & install iTerm
2) Download & install XCode 2.4.1
3) Download & install macports
4) update /etc/profile or ~/.profile with the following PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
5) open iTerm and type: sudo port selfupdate
6) install ruby: sudo port install ruby rb-rubygems rb-termios
7) install mysql sudo port install mysql5 +server
8) create a symbolic link to mysql.sock: sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock
9) to autostart mysql: launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
10) configure mysql: sudo mysql_install_db5 --user=mysql
11) secure mysql: sudo -u mysql mysql_install_db5
12) start mysql: sudo -u mysql /opt/local/lib/mysql5/bin/mysqld_safe
13) update mysql root password: /opt/local/lib/mysql5/bin/mysqladmin -u root password 'your_password'
14) install ruby mysql adapter: sudo port install rb-mysql
15) Finally install rails and other stuff: sudo gem install rake rails capistrano mongrel mongrel_cluster deprec --include-dependencies

2 comments:

Jason said...

Nice comprehensive post. Looks like you got yourself up and running nicely.

Jonas Avellana said...

it was a f*cking pain for mysql to run... i keep on getting the ".../mysql.sock" not found error...

but now time to learn some RoR!!!!