Changes between Version 1 and Version 2 of UsingMacPortsQuickStart


Ignore:
Timestamp:
Mar 31, 2007, 3:25:53 AM (17 years ago)
Author:
markd@…
Comment:

Fix old and broken links and change occurrances of DarwinPorts to MacPorts

Legend:

Unmodified
Added
Removed
Modified
  • UsingMacPortsQuickStart

    v1 v2  
    11== Overview ==
    22
    3 This guide is designed to help provide you with a quick start to using DarwinPorts. It will cover installing, updating, and removing open source software from your computer provided via the DarwinPorts infrastructure, in addition to some other important basics.
     3This guide is designed to help provide you with a quick start to using MacPorts. It will cover installing, updating, and removing open source software from your computer provided via the MacPorts infrastructure, in addition to some other important basics.
    44
    5 It is important to understand that DarwinPorts is designed so that all software installed within DarwinPorts is installed to its own self-contained directory (`/opt/local`, by default). Software can be built into this directory without interfering with any Apple-provided services, or OS X in general, tested, and even packaged into an OS X-style disk image for deployment on other systems. Using guides such as [http://www.netmusician.org/wiki/index.php/Build_server_with_DarwinPorts this], DarwinPorts installed open source software can even be used to integrate with or replace Apple's installed versions of this same software without having to give up Apple's GUI controls.
     5It is important to understand that MacPorts is designed so that all software installed within MacPorts is installed to its own self-contained directory (`/opt/local`, by default). Software can be built into this directory without interfering with any Apple-provided services, or OS X in general, tested, and even packaged into an OS X-style disk image for deployment on other systems. Using guides such as [http://www.netmusician.org/wiki/index.php/Build_server_with_DarwinPorts this], MacPorts installed open source software can even be used to integrate with or replace Apple's installed versions of this same software without having to give up Apple's GUI controls.
    66
    7 This guide was written by [mailto:joe@opendarwin.org Joe Auty] @ [http://www.netmusician.org NetMusician]
     7This guide was written by [mailto:joe@macports.org Joe Auty] @ [http://www.netmusician.org NetMusician]
    88
    9 == Adding DarwinPorts to your Terminal's path ==
     9== Adding MacPorts to your Terminal's path ==
    1010
    11 You can interact with DarwinPorts either using the [http://dpgui.sourceforge.net/ Port Authority] GUI, or using the Terminal. If you choose to use the Terminal, the Terminal needs to know to look in your DarwinPorts directory (i.e. `/opt/local` if you are using the defaults) to find its utilities. If you installed MacPorts using the [wiki:InstallingMacPorts InstallingMacPorts] page then you should be able to open a Terminal window and type:
     11You can interact with MacPorts either using the [http://www.codebykevin.com/portauthority.html/ Port Authority] GUI, or using the Terminal. If you choose to use the Terminal, the Terminal needs to know to look in your MacPorts directory (i.e. `/opt/local` if you are using the defaults) to find its utilities. If you installed MacPorts using the [wiki:InstallingMacPorts InstallingMacPorts] page then you should be able to open a Terminal window and type:
    1212
    1313port
     
    1818== Selfupdate ==
    1919
    20 The basic syntax for using DarwinPorts is:
     20The basic syntax for using MacPorts is:
    2121
    2222`port <command-name>`
    2323
    24 where "command-name" is one of the commands, or "targets" that DarwinPorts recognizes. For a list of all DarwinPorts targets, type in man port in your Terminal to read the man page for a complete reference guide to the Port command. We will touch on some important ones here, starting with "selfupdate".
     24where "command-name" is one of the commands, or "targets" that MacPorts recognizes. For a list of all MacPorts targets, type in man port in your Terminal to read the man page for a complete reference guide to the Port command. We will touch on some important ones here, starting with "selfupdate".
    2525
    26 Selfupdate is the command used to automatically download new Portfiles so that your local copy of DarwinPorts is aware of new DarwinPorts software or upgrades to existing software that have been committed to the DarwinPorts infrastructure. Additionally, this command is used to update the DarwinPorts software itself - think of it is a Software Update, like its name suggests.
     26Selfupdate is the command used to automatically download new Portfiles so that your local copy of MacPorts is aware of new MacPorts software or upgrades to existing software that have been committed to the MacPorts infrastructure. Additionally, this command is used to update the MacPorts software itself - think of it is a Software Update, like its name suggests.
    2727
    28 After installing DarwinPorts, try running a selfupdate to grab all the latest DarwinPorts Portfiles (Portfiles contain information about how to install DarwinPorts software "ports"). You will need to run this command as an administrator, and it requires root access, so you'll need to "sudo":
     28After installing MacPorts, try running a selfupdate to grab all the latest MacPorts Portfiles (Portfiles contain information about how to install MacPorts software "ports"). You will need to run this command as an administrator, and it requires root access, so you'll need to "sudo":
    2929
    3030`sudo port selfupdate`
    3131
    32 Running DarwinPorts commands, you can add the `-v` command for more verbose ("v" for "verbose") output if you'd like more detail about what DarwinPorts is attempting to do:
     32Running MacPorts commands, you can add the `-v` command for more verbose ("v" for "verbose") output if you'd like more detail about what MacPorts is attempting to do:
    3333
    3434`sudo port -v selfupdate`
    3535
    36 If you are a developer and would like even more specific accounting of what DarwinPorts is doing, add the `-d` flag.
     36If you are a developer and would like even more specific accounting of what MacPorts is doing, add the `-d` flag.
    3737
    3838== Searching for ports ==
    3939
    40 To find out what software is available within the DarwinPorts infrastructure, you can consult the [http://www.darwinports.org/ports Available Ports] page, or run a quick search using DarwinPorts. For instance, if you wanted to search for the PHP language:
     40To find out what software is available within the MacPorts infrastructure, you can view the [http://trac.macosforge.org/projects/macports/browser/trunk/dports Browse Source link], or run a quick search using MacPorts. For instance, if you wanted to search for the PHP language:
    4141
    4242`port search php`
     
    6767`port variants php5`
    6868
    69 Variants are options that can be built into your install of the port. If you have ever compiled software by hand, you'll know that these options can be set via configure script arguments (e.g. `./configure --prefix=/opt/local`). It can be confusing to figure out what each variant enables, but if you are confused you can ask the port maintainer or the [http://www.opendarwin.org/mailman/listinfo/darwinports DarwinPorts mailing list]. The variants for PHP 5 include specifying operating system version (overriding what the install will automatically attempt to determine for itself), modules for Apache 1.x, 2.x, and support for MySQL 3.x, 4.x, 5.x, or PostgreSQL.
     69Variants are options that can be built into your install of the port. If you have ever compiled software by hand, you'll know that these options can be set via configure script arguments (e.g. `./configure --prefix=/opt/local`). It can be confusing to figure out what each variant enables, but if you are confused you can send a question to one of the  [http://trac.macosforge.org/projects/macports/wiki/MailingLists MacPorts mailing lists]. The variants for PHP 5 include specifying operating system version (overriding what the install will automatically attempt to determine for itself), modules for Apache 1.x, 2.x, and support for MySQL 3.x, 4.x, 5.x, or PostgreSQL.
    7070
    7171== Installing ports ==
     
    7979`sudo port -v install php5 +apache2 +mysql5`
    8080
    81 You may notice that DarwinPorts will build software that you didn't specifically request. This will occur if the port you originally requested has other ports marked as dependencies. Even if the software already exists without OS X, remember the whole DarwinPorts self-contained design approach. Some recreation of existing software may be necessary to produce a functional self-contained environment.
     81You may notice that MacPorts will build software that you didn't specifically request. This will occur if the port you originally requested has other ports marked as dependencies. Even if the software already exists without OS X, remember the whole MacPorts self-contained design approach. Some recreation of existing software may be necessary to produce a functional self-contained environment.
    8282
    8383== Verifying your install ==
     
    8787`port installed`
    8888
    89 If you are not seeing your port listed, chances are there were some errors in the install. Please share any error messages you encountered with the DarwinPorts mailing list so that we can commit corrections.
     89If you are not seeing your port listed, chances are there were some errors in the install. Please share any error messages you encountered with the MacPorts mailing list so that we can commit corrections.
    9090
    9191== Upgrading existing ports ==
    9292
    93 To list all outdated ports, quickly running a selfupdate will make sure that your list of outdated ports reflects the latest versions available within the DarwinPorts infrastructure. To run a selfupdate:
     93To list all outdated ports, quickly running a selfupdate will make sure that your list of outdated ports reflects the latest versions available within the MacPorts infrastructure. To run a selfupdate:
    9494
    9595`sudo port -v selfupdate`
     
    113113== What if my port install/upgrade fails? ==
    114114
    115 Regardless of whether you include the verbose flag, if there is an error it will be provided. Please send these error messages to the port maintainer, or to the DarwinPorts mailing list. You can search for the port maintainer [http://www.darwinports.org/ports here], and/or subscribe to the list via the instructions provided [http://www.darwinports.org/help here].
     115Regardless of whether you include the verbose flag, if there is an error it will be provided. Please file a ticket in MacPorts' Trac ticketing system and assign it to the port maintainer listed in the Portfile or send a message to the [http://trac.macosforge.org/projects/macports/wiki/MailingLists MacPorts mailing list].
    116116
    117 == How do I configure my DarwinPorts installed application and start it up for the first time? ==
     117== How do I configure my MacPorts installed application and start it up for the first time? ==
    118118
    119119Many configuration files for non-Aqua software will be located in `/opt/local/etc`. If applicable to your port, you will need to edit your config file in this location in preparation for use. If your config file ends in a suffix containing something like "sample", you may need to rename it to exclude this suffix. The general approach of providing a "template" config file ensures that the config file you have setup will not be overwritten the next time you upgrade your port. In fact, all ports should be designed not to blow away your configuration. If this isn't the case, please contact the port maintainer or send an email to the list.
     
    121121You will need to consult the documentation for the software you have installed to find out how to manually start and stop it if it includes a daemon that is necessary to be running in order for the software to work.
    122122
    123 == How do I set my DarwinPorts installed software to automatically startup at boot? ==
     123== How do I set my MacPorts installed software to automatically startup at boot? ==
    124124
    125125Software that includes a daemon that needs to run in order for the software to work often include a variant to install the hooks necessary for the daemon to automatically start at boot time.  In versions of Mac OS X older than and including 10.3.x, when the appropriate variant is specified the SystemStarter script will be installed. In versions newer than and including 10.4.x, a launchd item will be installed. Please check your SystemStarter or launchctl man pages to learn how to manually invoke these startup scripts so that you can test the starting/stopping of your software without having to reboot your machine. In some cases, using SystemStarter/Launchd may be the only way to manually start/stop the daemon(s).
    126126
    127 If your DarwinPorts installed software is intended to replace an Apple-provided service, you should disable it to prevent conflicts. There are several techniques you can use to replace various Apple-provided bits. Please contact the list for further information.
     127If your MacPorts installed software is intended to replace an Apple-provided service, you should disable it to prevent conflicts. There are several techniques you can use to replace various Apple-provided bits. Please contact the list for further information.
    128128
    129129== How do I know when an update is available? Do I have to constantly perform manual checks? ==
    130130
    131 Selfupdate is a command that can safely be scheduled to automatically run, as it doesn't actually update your installed software, it just "teaches" DarwinPorts about new updates. Take a look at using crontabs to run your selfupdate. You will probably have to provide the full path to the "port" command in your crontab, i.e.:
     131Selfupdate is a command that can safely be scheduled to automatically run, as it doesn't actually update your installed software, it just "teaches" MacPorts about new updates. Take a look at using crontabs to run your selfupdate. You will probably have to provide the full path to the "port" command in your crontab, i.e.:
    132132
    133133`/opt/local/bin/port selfupdate`
     
    139139== Help! ==
    140140
    141 Please see the [http://www.darwinports.org/help Get Help] page on the [http://www.darwinports.org DarwinPorts website] for further help.
     141Please see the [http://darwinports.opendarwin.org/help Get Help] page on the [http://darwinports.opendarwin.org/ legacy DarwinPorts website] for further help.