How to install and set up FreeBSD 9.0
22-06-2014

How to install and set up FreeBSD 9.0
The first thing to do is to make your bootable use/cd then boot into it first you will come to this screen.
A bored coder
Just press enter.

Next you'll come to this screen.
A bored coder
We want to install FreeBSD so select install and press enter.

Next you'll need to select your key map.
A bored coder
Select your key map and press enter.
A bored coder
Next setup your hostname, put in whatever host name you want for your PC.
A bored coder
Next select what you want to install from the disk, I keep it minimal and diselect everything.
A bored coder
Next you have to set your partitions, if you want to dual boot or set up your own partitions select manual, I ususally have 20GB /, 1GB /var and /tmp, 2GB swap and the rest on /home, but for this tutorail I'm going to use guided.
A bored coder
Next you select the hard drive you want to use, make sure if you're installing from a usb you don't select the usb, you should be able to tell by the size of the drive.
A bored coder
Next select if you want to use the entire disk or a partition.
A bored coder
A bored coder
Next commit to the install.
A bored coder
A bored coder
Next you'll be asked too set the root password, make sure you set it to something unique.
A bored coder
Next setting up your network, this is pretty straight foward for wired/wireless with or without dhcpcd so I don't feel like I need to exsplane anything.
A bored coder
[/img]http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall/bsdinstall-configure-network-interface-ipv4.png[/img]
A bored coder
A bored coder
A bored coder
Next select your time zone.
A bored coder
A bored coder
A bored coder
Next select the things you want to start on start up if you select things you don't want or don't select tings you did want here it is easy to change in /etc/rc.conf so don't be worried about adding in something you might not want in the future. You'll need sshd on startup if you want to connect to this PC remotely over ssh.
A bored coder
You should enable crash dumps but if you don't want to don't.
A bored coder
Most of the things you can leave default just put in the name you want and the shell you want I use tcsh and put the account in the wheel group and then set the password then press enter and type yes then press enter again.
A bored coder
We are done with the install exit and reboot to reboot into your new FreeBSD system :)[img]http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall/bsdinstall-finalconfiguration.pngNow that FreeBSD is installed and running log into root and install the ports by running the following commands.
portsnap fetch portsnap extract
Now we'll install nano if you're okay with vi use vi, I'm using nano in this tutorial because everyone can easily use it easily, run the following commands to install nano.
cd /usr/ports/editors/nanomake BATCH=yes install cleanln -s /usr/local/bin/nano /usr/bin/nano
If there's any other things you want to install you can run pkg_add -r filename if you have a slow pc or are not bothered about compiling things to be more minimal and faster. The better way to do things install them form ports type whereis filename it'll say it's in /usr/ports/something/something cd to that directory, then to install it by typing make install clean there will be some dialog boxes that pop up asking you what you want to compile the program with meaning you can remove anything that's useless for you.

Next install sudo with the following commands.
cd /usr/ports/security/sudo make install clean
This shouldn't take too long to install, so we'll just wait and then we can go on to configure it.Now edit sudoers with the following command.
nano /usr/local/etc/sudoers
Then take out the # from %wheel ALL=(ALL) ALL

Now log out and log into the user account you made earlier and run the following command.
sudo portsnap extract
Now it's time too install and setup xorg, run the following commands.
cd /usr/ports/x11/xorg
sudo make BATCH=yes install clean
This might take a while.

Next edit rc.conf with the following command.
nano /etc/rc.conf
Add the following lines to the bottom of your rc.conf file.
hald_enable="YES"
dbus_enable="YES"
Now reboot.

Now run startx and test if xorg is working if it is not have a look at FreeBSD's xorg config guid here.

Now for installing a window manager I will show you how to install gnome and xfce gnome first if you don't want to install gnome skip this part for xfce.

To install gnome run the following commands.
cd /usr/ports/x11/gnome2
make BATCH=yes install clean
To install xfce run the following commands.
cd /usr/ports/x11/xfce4
make BATCH=yes install clean
Next we need to add a few lines to fstab, run the following command to open fstab up in nano,
sudo nano /etc/fstab
Add the following line at the bottom of the file.
proc /proc procfs rw 0 0
If you want to use the GDM login manager add gdm_enable="YES" to /etc/rc.conf or you can add gnome_enable="YES" if you want to enable Gnome services together with GDM.Next edit your .xinitrc file by running the following command.
nano ~/.xinitrc
Add the following into that file.For gnome
exec /usr/local/bin/gnome-session
For xfce
exec /usr/local/bin/xfce4
That's your window manager all done reboot to start the GDM login manager or run startx if you didn't set up a login manager.

Some useful applications.
Web browsers
Firefox
cd /usr/ports/www/firefox
sudo make install clean
Opera
cd /usr/ports/www/opera
sudo make install clean
Chromium
cd /usr/ports/www/chromium
sudo make install clean
Flashplayer
cd /usr/ports/emulators/linux_base-f10
sudo make install clean
You need to kld load linux to install flash so run the following.
kldload linux
To do this automaticly at startup add linux_enable="YES" to /etc/rc.conf. Next run
cd /usr/ports/www/linux-f10-flashplugin10
sudo make install clean
cd /usr/ports/www/nspluginwrapper
sudo make install clean
Then run the following command, make sure you run this as the user you want to be using flash if you run this as root root will have flash not your user account.
nspluginwrapper -a -v -i
Java
cd /usr/ports/java/openjdk6
sudo make install clean
cd /usr/ports/java/icedtea-web
sudo make install clean
To make java work with firefox run the following command.
ln -s /usr/local/lib/IcedTeaPlugin.so ~/.mozilla/plugins/
To make Java work with Chromium run the following commands.
mkdir -p /usr/local/share/chromium/plugins
ln -s /usr/local/lib/IcedTeaPlugin.so /usr/local/share/chromium/plugins/
Office
LibreOffice
cd /usr/ports/editors/libreoffice
sudo make install cleanOpenOffice
OpenOffice
cd /usr/ports/editors/openoffice.org-4
sudo make install clean
Xpdf
cd /usr/ports/graphics/xpdf
sudo make install clean

Name:
*

Email:
*

Website:





Page generated in 0.0101 seconds.