FreeBSD Obtain and Install Ports File in /usr/ports

‮.www‬lautturi.com
FreeBSD Obtain and Install Ports File in /usr/ports

To obtain and install the ports collection on a FreeBSD system, you will need to do the following:

  1. Download the ports collection from a FreeBSD mirror.

You can download the ports collection from a FreeBSD mirror using a utility such as fetch.

For example, to download the ports collection from the FreeBSD mirror at ftp://ftp.freebsd.org, you can run the following command:

# fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports.tar.gz

This will download the ports.tar.gz file to the current working directory.

  1. Extract the ports collection to the /usr/ports directory.

You can extract the ports collection using a utility such as tar.

For example, to extract the ports.tar.gz file to the /usr/ports directory, you can run the following command:

# tar -xzf ports.tar.gz -C /usr

This will extract the contents of the ports.tar.gz file to the /usr/ports directory.

  1. Change the ownership of the /usr/ports directory to the ports user and group.

You can change the ownership of the /usr/ports directory using the chown command.

For example, to change the ownership of the /usr/ports directory to the ports user and group, you can run the following command:

# chown -R ports:ports /usr/ports

This will change the ownership of the /usr/ports directory and all its contents to the ports user and group.

After the ports collection has been installed, you can use it to install software on your FreeBSD system using a utility such as pkg or portmaster.

For more information about the ports collection and how to use it on a FreeBSD system, you can refer to the FreeBSD documentation and the ports man page by running man ports on the command line. You can also refer to the pkg and portmaster man pages by running man pkg and man portmaster for more information about installing software using the ports collection.

Created Time:2017-10-28 20:40:35  Author:lautturi