Changes between Version 2 and Version 3 of InstallingMacPorts
- Timestamp:
- 10/08/06 20:46:25 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallingMacPorts
v2 v3 2 2 1. Download the latest verson of Xcode Tools from [http://connect.apple.com/ Apple's developer site] —do not install an older version from the OS X 10.4 install disk or some ports may fail to install. 3 3 2. Run the binary installer and perform an "easy install" —the default install also copies the X11SDK required by X11. 4 5 = Install the MacPorts Binary =6 1. Download the latest MacPorts .dmg disk image you find in the [http://svn.macosforge.org/repository/macports/downloads/ MacPorts download area]7 2. Run the binary installer8 3. Perform an “easy” install9 4 10 5 = Install XWindows (X11) = … … 15 10 4. Drag the /Applications/Utilities/X11 icon to your dock —you must open X11 before launching an X11 application 16 11 17 '''N OTES:'''12 '''Notes:''' 18 13 * XWindows (X11) is required for many MacPorts apps and it is highly recommended that you install it even if you don't plan to run X11 apps immediately. 19 14 * The X11SDK is also required to run X11 software, but it is installed by default during the Xcode Tools install above. Look in /Library/Receipts if you wish to verify that X11 and/or X11SDK were installed. … … 23 18 == Requirements for the MacPorts' shell environment == 24 19 25 The MacPorts binary installer places a .profile file in your home directory (view files preceded by a dot with 'ls -a'). The contents of this ~/.profile file adds the MacPorts paths in front of the standard Unix paths for the default BASH shell. This is done so that if you have utilities or libraries from both MacPorts and OS X's standard install, the MacPorts libraries will be run instead of the ones provided by Apple. The ~/.profile path statement is:20 The MacPorts binary installer places a .profile file in your home directory (view files preceded by a dot with 'ls -a'). The contents of this ~/.profile file adds the MacPorts paths in front of the standard Unix paths for the default BASH shell. This is done so that if you have utilities or libraries from both MacPorts and OS X's standard install, the MacPorts libraries will be run instead of the ones provided by Apple. 26 21 27 22 '''{{{export PATH=/opt/local/bin:/opt/local/sbin:$PATH}}}''' 28 23 29 You'll need to add this variable to your ~/.profile to be able torun X11 applications:24 You'll need to add this variable to your ~/.profile to run X11 applications: 30 25 31 26 '''{{{export DISPLAY=:0.0}}}''' 32 27 33 '''IMPORTANT NOTES:''' 28 So a basic ~./profile file will look like this: 29 30 {{{ 31 export PATH=/opt/local/bin:/opt/local/sbin:$PATH 32 export DISPLAY=:0.0 33 }}} 34 35 '''Important Notes:''' 34 36 35 37 * To understand why MacPorts libraries are often installed when Apple has provided one, see section "Why is MacPorts using its own libraries?" in the [wiki:FAQ]. … … 39 41 * ~/.bash_profile 40 42 41 == Options for the MacPorts' shell environment ==43 == Options for the MacPorts' shell and X11 environment == 42 44 43 To launch X11 apps directly from an X11 window (instead of a terminal window), you need to add the MacPorts paths to X11's .xinitrc. An easy way to do that is to add this statement to the file /etc/X11/xinit/xinitrc: 45 To set a default editor for use with the port command (e. g. 'port ed mysql5'), add a variable EDITOR with the path of your favorite editor to the ~./profile file. 46 47 '''{{{export EDITOR=/usr/bin/pico}}}''' 48 49 A sample ~/.profile with optional EDITOR variable set: 50 {{{ 51 export PATH=/opt/local/bin:/opt/local/sbin:$PATH 52 export DISPLAY=:0.0 53 export EDITOR=/usr/bin/pico 54 }}} 55 56 57 To launch X11 apps directly from an X11 window (instead of a terminal window), you need to add the MacPorts paths to X11's .xinitrc. An easy way to do that is to add this statement to the file /etc/X11/xinit/xinitrc at the top: 44 58 45 59 '''{{{source ~/.profile}}}''' 46 60 47 To set a default editor for use with the port command (e. g. 'port ed mysql5'), set the EDITOR variable to the path of your favorite editor. 61 Sample xinitrc snippet: 62 {{{ 63 #!/bin/sh 64 # $Id: xinitrc,v 1.1.1.1 2005/02/24 22:35:39 akosut Exp $ 48 65 49 '''{{{export EDITOR=/usr/bin/pico}}}''' 66 source ~/.profile 67 68 }}} 69 = Install the MacPorts Binary = 70 1. Download the latest MacPorts .dmg disk image you find in the [http://svn.macosforge.org/repository/macports/downloads/ MacPorts download area] 71 2. Run the binary installer 72 3. Perform an “easy” install 73 74 = Download the latest MacPorts portfiles = 75 1. Open a terminal window 76 2. Execute the MacPorts selfupdate command 77 78 {{{ 79 port selfupdate 80 }}} 81 or for verbose output: 82 {{{ 83 port -vd selfupdate 84 }}} 85 86 '''Note:''' The selfupdate command also updates the MacPorts program to the latest point release since the binary installer was created.

