Sunday, July 8, 2007

FreeBSD 6.2

Although I had FreeBSD 5.2 i decided to install the new version FreeBSD 6. I wanted a clean install (as I really didn't have any important stuff on my server and I had a lot of time to spare). I downloaded the first cd off ftp.ro.freebsd.org
and started the sysinstall utility. I chose a standard instalation with auto partitioning of my 34GB drive (as the 17GB one I'm saving for the Document Root of the webserver and for the /home directories). The installation crippled when copying GENERIC (maybe the media was faulty) and because I didn't have any other blank CDs in my room I decided to try the FTP install. What do you know! I changed the network card on my server and the guys from my ISP make MAC-based authentification. Oh no! What am I supposed to do? Maybe this is just not my night for installing FreeBSD. I luckly found somebody from my ISP online (it was almost 1 AM) and requested my MAC address from their database. I went to the Fixit menu and made a emergency shell on tty4. Yupee! Who knows, maybe I will get lucky after all.


# ifconfig fxp1 ether 00:00:00:00:00:00 <- (my real MAC here)


(Don't you just hate the way freebsd sees your devices?)

As FreeBSD doesn't require to take down the interface for changing MAC address I jumped to my instalation screen (Alt+F1 btw), entered my IP configuration and from then on everything went smoothly. I no time I was sitting in front of a command prompt.


#


Pretty ugly since I am used to my bash shell with auto-completion and pwd. This could be fixed in no time:



# pkg_add -r bash
# chsh -s bash
# bash


Ah, much better now. The next step was to install some dearly applications to me: sudo and screen. But where are they?


# cd /usr/ports
# make search name=sudo
Path /usr/ports/security/sudo
#make search name=screen
Path: /usr/ports/sysutils/screen
# cd /usr/ports/security/sudo
# make install clean
# visudo
Added user ALL=(ALL) ALL after root
# cd /usr/ports/sysutils/screen
# make install clean


That was it. Beautiful and simple.

I then logged out of my machine and entered as my user. Sudo is really beautiful. I started to get the hang of it while I was testing Ubuntu and I consider it a really neat ideea. Screen is just one of those app that you can't live without while running a headless server over ssh. Maybe I will come back with a tutorial on screen in a future post.

FreeBSD is just simple and neat. Although I never tested it as a desktop operating systems, I always found it as a very nifty OS for servers. I will come back later with some more tutorials on other things I did since install.

No comments: