Showing posts with label freebsd. Show all posts
Showing posts with label freebsd. Show all posts

Saturday, 29 March 2008

FreeBSD and Linux commands at your finger tips

Would you like to have all the important Linux and FreeBSD commands with suitable examples fit in a couple of pages ? If you do, then you have got your wish.

Colin Barschel has put together what he calls the Unix Toolbox. This is a fabulous piece of compilation which contain all the frequently useful commands in Linux and their equivalents in FreeBSD. This document covers a wide range of topics divided into 22 sections such as system, processes, file systems, network related, VPN, cryptography, installing and managing software and so on.

What I really like about Unix toolbox is that it is well structured, each section has a Linux subsection immediately followed by a FreeBSD subsection which explains equivalent commands in FreeBSD. Secondly, the document is made available in multiple formats namely PDF, HTML page, booklet version fit to be printed and made into a small booklet and so on.

A very good resource for any Linux/FreeBSD enthusiast. There is also an additional bonus. Visit the homepage of this site and you get a FreeBSD console right within your web browser. As of now there are 30 commands which can be used. Colin has used the termlib library to create the virtual terminal.

Monday, 29 October 2007

Take part in a book auction to benefit FreeBSD foundation

Are you an avid user of FreeBSD ? Perhaps you use FreeBSD more than even good ol Linux. Well, here is a golden chance to support your favorite operating system.

Book publisher No Starch Press of San Francisco, California will auction the first copy of the second edition of "Absolute FreeBSD" to the highest bidder with all the proceeds being donated to The FreeBSD Foundation which is a 501(c)(3) non-profit organization dedicated to supporting the FreeBSD Project.

If you are the highest bidder, then you will receive a signed copy of "Absolute FreeBSD" hot off the press and a Certificate of Authenticity. The ongoing auction at eBay runs through November 2, 2007. The latest bid as of this writing is $525. Now the big question is are you willing to up the ante and in the process contribute more to the FreeBSD foundation ? If you are interested, hurry because the auction closes on November 2 2007.

Thursday, 13 September 2007

OpenBSD now features better Flash support

Viewing Flash content has always been a bone of contention for the BSDs (OpenBSD, NetBSD, FreeBSD et al). Mainly because Adobe has yet to release a native version of Flash player for the BSDs. And at present people using BSD are using a Linux compatiblity module to run a Linux version of Flash player - that too version 7.0.

But things are changing for the better - albeit at a glacial pace. Now there are a number of ways of viewing Flash files in OpenBSD (Which should also be applicable to other BSD's too).
  1. Opera Flash player plugin - You can install Opera web browser via the OpenBSD ports. And using Opera web browser is one of the easiest way to view Flash content in OpenBSD.
  2. net/yt - This is a script written by Pedro Martelletto which allows downloading and saving of flash videos from a variety of websites such as Youtube and the likes. The script not only downloads the Flash movies but also converts them to a more open format to be viewed on video players like Mplayer and Xine. You can download this script from the OpenBSD ports.
  3. Gnash - Gnash is a GNU implementation of a Flash Player which is being actively developed in answer to a demand for a purely Free (as in Freedom) GPLed Flash player. This player has been said to show positive results such as for instance, now being able to play Youtube videos. A native version of Gnash can be installed in OpenBSD (Oh the joys of Free software).
  4. There are a number of online services which allow you to convert Flash based videos to other formats, which can then be downloaded to your computer.
[Courtesy: OpenBSD Journal]

So as you can see, there are different ways of viewing Flash content on the BSD's more specifically on OpenBSD. I believe one of the biggest handicaps of the BSD's has been the lack of native support for viewing popular file formats such as Flash on them. But that is fast changing for the better.

Saturday, 14 April 2007

A collection of tips for people new to BSD

The first time I was introduced to FreeBSD - a BSD variant, I came away really impressed. In my opinion, from an end user's perspective, the only difference between a BSD and Linux is the difference in licencing. If you setup two machines - one running FreeBSD and the other running a Linux distribution with both having a KDE or Gnome desktop and ask a neophyte to point out which is which, there is a good chance that he will consider them both as running one and the same operating system. So whether you choose Linux or BSD depends largely on your tastes.

On the down side, the BSD variants fall far behind when you compare the size of their community with respect to that of Linux which commands a community which is many times that of the BSDs. But if you consider the ratio of knowledgable people to newbies, the BSD's fare better.

If you are a potential BSD aspirant and wish to try out any of the BSDs which include FreeBSD, PC-BSD, OpenBSD, NetBSD and DesktopBSD, then you might find the resource page put up by Daemon News quite helpful. It contains lots of tips to carry out tasks which a neophyte in BSD might initially find insurmountable.

Saturday, 5 August 2006

Building a Personal Firewall in FreeBSD using FirewallBuilder

Whether it be a production grade server or a home computer, as long as it is connected to the outside world, running a firewall is unavoidable. GNU/Linux comes with its own firewall called iptables (netfilter). And there are a number of front-ends available such as Firestarter which make maintaining a firewall childs play especially on the desktop. In the past, I have published articles explaining how to setup a firewall in GNU/Linux.

Dru Lavigne, an instructor and FreeBSD advocate has written an excellent tutorial explaining how to setup and use Firewall Builder - an object oriented GUI and a collection of policy compilers for various firewalls including pf (packet filter) the firewall used in FreeBSD. The tutorial takes the readers through setting up (installing) firewall builder software in FreeBSD to creating a firewall ruleset to controlling the firewall and lastly fine tuning the rules.

Friday, 12 May 2006

A step-by-step guide to running your own Unix Web Server

What does it take to convert ones computer to work as a web server ? You need a stable and secure network operating system, a web server software, a database which scales well and your choice of scripting language.

The interesting thing is that it is quite easy to convert a computer to work as a web server using only free technologies. We have a plethora of free OSes like Linux, FreeBSD and Open Solaris which are a robust and secure alternative to the proprietary ones, a very popular web server software in Apache and a robust free database in MySQL. I need not tell that PHP is one of the most used dynamic scripting language on the web and is the preferred choice for building most websites. So is that all that is needed to set up a web server? Not quite... You also need to have the expertise in configuring the various parameters of the above mentioned software.

In a previous article, I had explained how to serve webpages from ones machine using Apache web server.

Dave Tufts has written a three part series on setting up ones machine as a web server. He has used FreeBSD as his choice of OS and Apache, MySQL and PHP as the web server, database and scripting language respectively. In the first part of the article, he lists the steps needed to install FreeBSD on ones machine which includes the ideal partitioning scheme for this purpose. In the next part, he takes the readers through installing Apache, MySQL and PHP and interestingly he does it by compiling from source. And in the last part, he plows into configuring apache webserver.

Monday, 21 November 2005

Installing FreeBSD 6.0 - A Linux User's perspective

I have been a Linux user way back from the first time I was introduced to an alternate OS than windows. Even though I was aware of other Unices like FreeBSD and Solaris, I hadn't come around to installing them on my machine. Two days back, things changed when I downloaded the latest FreeBSD version 6.0 from their official website. It consists of 2 ISO images of 565 MB and 666 MB.
I burned the images on to two CDs using K3B CD burning software and then started the installation.
FreeBSD comes with a text based installer which is quite intuitive. But a person installing a non-windows OS for the first time will initially find it a bit confusing.
  • Unlike the previous versions of FreeBSD, this installer does not give you an option to configure the kernel but straight away loads the main menu (called sysinstall menu), see figure below. Here I chose the standard installation menu which is the recommended option for first time users of FreeBSD. There is also a Custom and Express installation choice for more advanced users.
  • Now I was presented with the FDisk main screen which prompted me to create partitions. I created one partition from the available free space and FreeBSD gave it the filesystem number 165 because FreeBSD uses the Unix FileSystem (UFS) where as in Linux it is ext3 (83).
    Note: For those who are uncomfortable using fdisk, there is a wizard mode which is enabled by pressing '' while in FDisk main screen, where you get some hand holding.
    One thing I found really interesting was the naming of the hard disks. I have a Seagate 40 GB IDE hard disk. It was recognized as /dev/ad0s where as in Linux it is recognized as /dev/hda .
  • Next screen gave the option to install the FreeBSD boot manager. I chose to install a boot manager because I wanted to boot between multiple OSes.
  • Next the installer prompts you to create the mount points. Here I chose the auto option by pressing 'A' and FreeBSD created mount points automatically. This was how FreeBSD created the mount points on my machine.
    Part       Mount    Size     Newfs    Part
    ad0s3a / 512MB UFS2 Y
    ad0s3b swap 166MB SWAP
    ad0s3d /var 1107MB UFS2+S Y
    ad0s3e /tmp 512MB UFS2+S Y
    ad0s3f /usr 3292MB UFS2+S Y
    I found this unique because in linux, it is up to the user to decide to allocate space for swap and other partitions. Where as here, I created one single partition from the available space for the OS and FreeBSD further divided this space optimally for swap and other mount points.
  • After the successful creation of mount points, I was prompted to choose the type of installation. Like in Linux, here too you can select from a Developer, X-Developer, Kern-Developer, X-Kern-Developer, Minimal, User, X-User or Custom choices. I selected the 'User' choice which installs all the tools except X server and GUI tools. I felt this was desirable choice because it is easy to install more packages via the FreeBSD ports later.
  • Next the installer asked which installer medium I wanted to use. As FreeBSD is a network operating system, it gave me multiple choices like installing from a CD/DVD, NFS, Floppy, via FTP and so on.
    After it accepted my choice, it started copying all the files which included documentation and man pages to the FreeBSD partition which took about 10-15 minutes.

Fig: sysinstall Main Menu

Finally, It asked me a series of questions and made some changes to the configuration files according to my preferences. The questions asked were as follows:
  1. Would you like to configure any ethernet or SLIP/PPP network devices ?
  2. Do you want this machine to function as a network gateway?
  3. Do you want to configure inetd and the network services that it provides ?
  4. Would you like to enable the SSH login ?
  5. Do you want to have anonymous FTP access to this machine ?
  6. Do you want to configure this machine as a NFS server ?
  7. Do you want to configure this machine as a NFS client ?
  8. Would you like to customize your system console setting ?
  9. Would you like to set this machine's time zone now ?
  10. Would you like to enable Linux binary compatibility ?
  11. Does this system have a PS/2, serial or Bus mouse ?
For all the above questions all I had to do was give a Yes or No answer. And accordingly suitable action was taken by the FreeBSD installer.
  • In the next step, I was given the choice of fine tuning which packages I want installed on my machine. Here I chose the default selection.
  • Lastly I was prompted to create an ordinary user account and also set the password for the root account.
That is it. Now I was free to reboot into the newly installed FreeBSD.

Characteristics of FreeBSD
1) A robust OS with its own set of command line tools similar to (but not same as) those found in Linux. This I realized when I executed the command :
# fdisk -l
In FreeBSD, it gave me a short help on the options to be used with fdisk command. Where as in Linux, it lists the partition table. In fact all the command line tools in FreeBSD have been inherited from the BSD port and only their names are similar to their counterparts in Linux.
2) FreeBSD boots into C Shell by default. Though you can also switch to the bash shell.
3) Has a wide collection of applications (Over 8000 packages) in its ports system which is equivalent to the Yum/Apt-Get in Linux and installation of new applications is a snap with automatic resolution of dependencies.
4) Installs a very secure OS by default.
5) The file system used is the Unix File System (UFS2) which supports additional features not supported in Ext2(3) filesystems.
6) Will run applications compiled on Linux platform if the Linux compatibility package is installed.

Initial drawbacks for FreeBSD converts
1) Even though I found the FreeBSD installer rather intuitive, a first time user might find it a bit unfriendly when compared to the installers of RedHat or SuSe.
2) Users migrating from Linux will encounter a slight learning curve as they will have to learn some new commands and unlearn a few others. Also the file hierarchy is different than in Linux.
3) If your system has ISA cards, then there is a fair chance that you might encounter some trouble in installing FreeBSD 6.0 basically because you do not have the option of configuring the kernel during install time when you can enable ISA support - which I think is disabled by default. I was able to install FreeBSD 6.0 on one of my PCs which had an Aztec2320 chipset based ISA sound card. But each time I booted into FreeBSD, the system hung for close to 30 minutes during booting, after which it booted up normally. I didn't encounter this problem when I installed on a newer Pentium 4.0 machine which didn't have any ISA slots.