Ok, first make sure you have installed the ports and src collections from the install CD. Also, you will need to be logged in as root to do these steps. If you have not installed cvsup already, you will want to run:
to install cvsup (you will need a network connection to do this).
Then, you'll want to login as root and execute this command:
Code:
cp /usr/share/examples/etc/make.conf /etc
This file stores variables that will be used when make.conf is invoked.
Now, we will set up make.conf for your system. We'll just change the compile flags and configure cvs updating. First, you'll see the line:
The octothorpe (#) symbolizes a comment in this file. Change the line to:
These are options that are sent to the compiler when compiling the kernel, userland, and ports. O2 just stands for the second level of optimizations, while pipe cuts down on hard disk usage during compiles.
Next, find this line:
Code:
#COPTFLAGS= -O -pipe
and change it to:
Code:
COPTFLAGS= -O2 -ffast-math -pipe
Finally, scroll down till you see this section:
Code:
#SUP_UPDATE=
#
#SUP= /usr/local/bin/cvsup
#SUPFLAGS= -g -L 2
#SUPHOST= cvsup.uk.FreeBSD.org
#SUPFILE= /usr/share/examples/cvsup/standard-supfile
#PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
#DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile
Change it to:
Code:
SUP_UPDATE=
SUP= /usr/local/bin/cvsup
SUPFLAGS= -g -L 2
SUPHOST= cvsup.de.FreeBSD.org
SUPFILE= /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile
This will allow for easy updates of src and ports. cvsup.de.freebsd.org is a German server that should be relatively fast for you. Once you are done editing make.conf, save it. Then:
Code:
cd /usr/src;
make update
This should update all of the files in src, ports, and docs. Once it is complete, ports will be updated and ready to use. For example, to install xorg, you will do this:
Code:
cd /usr/ports/x11/xorg;
make install clean
This will download, compile, and install Xorg and all of its dependencies. All of the ports are organized under /usr/ports; just cd into the port you wish to install and install it. If you need to search for a port, you can either:
Code:
cd /usr/ports;
make search name=kde | more
which will search for ports that haver a name which matches the name variable (which in this case is kde) or you can do this:
Code:
cd /usr/ports;
make search key=kde | more
which will find ports that have kde (in this case) in the description.
I think that covers the setup and usage of ports well enough. Try it out and see how well it works for you.