Monday, February 28, 2011

How to install and maintain oss software on Mac OS X

Since Mac OS X has a full blown unix under the hood (i.e. 100% posix compliance) and brings a X11 server by default you can run nearly all software packages you know and love from Linux and BSD.
An easy way to install and maintain oss software is using MacPorts, a packet management system that allows you to install software from a huge software tree that should cover all your nerdy needs.
Unlike most packet managers MacPorts will download and compile the software package on your machine instead of downloading binaries which can be a time (and cpu) consuming task.

Preparements

X11: You find X11 on your Mac OS X Installation DVD as "Optional Installs".

Xcode: You need to install Xcode which you find on your Mac OS X Installation DVD. Make sure you install the optional components for the command line development aswell. (unix development)



Usage

After the installation of Macports (which is pretty straightforward) you just need to open terminal.

Note: commands with "sudo" infront are executed with superuser rights, therefore os x will ask for your password.

First we do a update of the port library
sudo port -v selfupdate

to search software we simply use
port search imagemagick


to obtain information about a package
port info imagemagick


and finally we install the package
sudo port install imagemagick


to uninstall you can simply do
sudo port uninstall imagemagick


to check a list of currently installed packages
port installed


and upgrade all installed packages to the newest version
sudo port upgrade outdated


If you have any questions or comments feel free to post em, next time we will look how to install and use Windows programs under Mac OS X.

Download Macports

82 comments:

JakeM said...

Thanks man; this will come in handy!

thenitefalls said...

Thanks for the tutorial! This will come in use when installing windows programs :D

ed said...

windows programs running on mac? thats really useful

Daan said...

Oh wow this is very useful

mac-and-me said...

windows on mac is in my next tutorial, this is about linux/oss software on osx

Motivationalized said...

Wow, I did not know that!

Triper said...

Very thanks!

DC said...

I can say that you're instructionals are way more detailed than mine! :)

AdamScottson said...

I know someone who's mac is gonna be manipulated a bit... that person is me.

MTensor said...

Another good tut. Thanks for the post!

Body1 said...

Nice post BRO!!

I went here today!!

$upporting

Blunders From 6 Foot 2 said...

Great blog! I'm a Mac user, nice to find someone showing me something new! Following!

Obi-wan Mikenobi said...

One of my mates has done this on his Mac, personally I can't stand them.

Tweeks Coffee said...

thanks for the info.

anoodle said...

Lame prompt, bro. Real men use '; '.

Laughing Vault said...

thanks for the tips

Questions said...

Seriously though, if I wanted to mess around with a command line, I wouldn't shell out the mega bucks required for an Apple product.

mac-and-me said...

@Questions well its awesome you have the choice, unix under the hood is always big + for me

Trelin said...

I've been drooling over the new macbook pros lately and, being a windows/linux guy exclusively, this would be the first thing I look up once I get one. Now I can just bookmark your blog and come back in 3 years when I've saved up $1200+

topcat said...

mac OS looks so clean.

blewp said...

Seems a bit complicated for me, I think my mac wouldn't like me tinkering at the UNIX under it's hood.

Glovey said...

Cool man! Defintely going to takes these tips on board for my mac! thanks again!

Dj DeKu said...

Very nice guide, thanks.

Alejandro Tlaie Boria said...

Wow, really useful, although it seems a bit complex :S

Bubi said...

very useful info,thanks bro

Chuck said...

Or just use a pc.

Copyboy said...

I wish I had the brain power to not fully screw that up. haha BTW...if you're interested I'd be honored if you joined my blog community at bloggerdise.com.

Baws said...

useful information

Candlej- said...

windows on a mac???

randomramblingggg.blogspot.com

Anonymouse said...

some good info here. i didn't know it was unix under the hood.

Chris said...

This is great, thanks!

A Beer for the Shower said...

Good info! I'm definitely eager to hear about Windows on Mac.

Shelby Fox said...

That first sentence went completely over my head, and it went downhill from there.

Sorry, I guess I'm just not technical enough.

Hombre720 said...

Thanks bud.

The Game Store Guy said...

I imagine this would be very helpful...were I running a Mac right now. haha. Thanks nonetheless. I'll keep this in mind for reference.

XXII said...

very informative, where do you learn all this stuff?

Patti D. said...

I love openBSD

Assange No.1 Fan said...

Insane hipstery

MrFredrik said...

Nice guide thx!

ankmanpro said...

Wow, now i HAVE to try this. followe
alphabetalife.blogspot.com

Havuelete said...

really helpful, thanks!

rinns said...

*cough* PC *cough*

Ugh said...

good guide cheers for this x

baxxman said...

I do also use OS X, but did not know that! big thanks
http://baxxmans.blogspot.com/

Alexander said...

Nice posts, looking forward to more customization related ones

T3CH said...

I must say, Macs are best for photo and video editing ...

PvtCarlin said...

This is madness mate! Thanks for sharing.

Joseph White said...

Nice, haven't seen this so clearly explained, thanks!

Raini said...

thx for tutorial

MacAttack said...

It's not that complicated! =] looking forward to your next post

Natefrogg said...

I did not know you could do this, thanks mate!

haluk said...

thanks

guoyixia said...

Yea, MacPorts definitely helped the installation run smoothly.

guoyixia said...
This comment has been removed by a blog administrator.
Venus said...

thanks for the info!

Josh said...

This is fantastic. I'll have to play around.

Robert Fünf said...

Sorry, but I'm not a huge fan of Macs.

The Angry Lurker said...

This is good for future reference.

Adventure Person said...

MacPorts has helped me quite a bit on my other machine, I'm glad they simplified the process of installing/compiling.

SQUIRRELL! said...

fantastic write up

anonymous said...

great post! this will do me well.

James the Giant Leach said...

glad i found you,followed
Soma_Shank_Tank

GFTM said...

Wow i've been looking everywhere for this info!!

C.M. said...

Thanks for the information!

KUSHtunes said...

really interesting post. thanks for the info.

PekkaK said...

Great tutorial mate!

-DO- said...

didn't know that this works!

Mike Yang said...

MP is fantastic -- just wish there was a standalone OSX GCC so I wouldn't have to install xcode just to get coreutils...

husar said...

Good to know, thanks.

Toto said...

thanks for the info!

http://all-around-toto.blogspot.com/

Aaron M. Gipson said...

I have been in IT for about 15 years, but I have very little experience with Macs. I see a lot of potential in this blog, and I will be following you from here on out.

NewYami said...

Great tip! Thank you.

Rachel Neilson said...

Macs, hahaha

ebm93 said...

Nice, thanks for the info

Nakuke said...

thanks for the info bro

Nik Mekeena said...

wow, looks very cool

Sa itte Miyo said...

i don't like apple. but maybe this blog change my point of view!?

Killy said...

re-read this article and well,i hate x11

Swerto said...

I was always more of a linux guy, I've steered clear of apple due to business ethics. I have no issue with the operating system, just the company that owns it. Hell, it's a sister-system to Linux since they're both based off unix.

Tracerz said...

I have a friend who created a Geometry program/game, and he uses Mac because of the unix thing... it helps him with programming? Or something? I forgot why exactly. I always thought he was just being pretentious with his little Macbook until he explained. ^_~

alfonsgrabher said...

MacBook-Air:~ admin$ sudo port install cowsay
Password:
---> Fetching cowsay
---> Attempting to fetch cowsay-3.03.tar.gz from http://distfiles.macports.org/cowsay
---> Verifying checksum(s) for cowsay
---> Extracting cowsay
---> Applying patches to cowsay
---> Configuring cowsay
---> Building cowsay
---> Staging cowsay into destroot
---> Installing cowsay @3.03_1
---> Activating cowsay @3.03_1
---> Cleaning cowsay
MacBook-Air:~ admin$ cowsay evill33t rulz
_______________
< evill33t rulz >
---------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
MacBook-Air:~ admin$

metaphysicalfarms said...

is lion officially out yet?