Academic Tutorials



English | French | Portugese | German | Italian
Home Advertise Payments Recommended Websites Interview Questions FAQs
News Source Codes E-Books Downloads Jobs Web Hosting
Chats

BSD
BSD Introduction
BSD Overview
BSD Installation Synopsis
Pre-installation Tasks
Starting the Installation
Introducing Sysinstall
Allocating Disk Space
Choosing What to Install
Installation Media
Committing the Installation
Post-installation
Advanced Installation Guide
Preparing Your Own Installation Media
Installation Process
Post Installation
FreeBSD OS Basic Example
The FreeBSD Kernel
FreeBSD Network interfaces
FreeBSD DNS
FreeBSD Firewall
FreeBSD Gatewya/Router
Nat and IPFW

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting
Network Sites


Post Installation


Previoushome Next






Post Installation


Now that you have FreeBSD installed, lets go over how to enable and disable services that come with the system. That will lead us nicely into the next section.

A D V E R T I S E M E N T
In order to turn on and off these services, we will need to do some configuration of the system. Let's do it!




FreeBSD Config Files

Compared to most Unices, FreeBSD has a pretty nice way of setting things up quickly. It has 1 main configuration file that starts every service up when you boot your system (This is not entirely true but will hold for this section). This file is called rc.conf and it resides in /etc. Let's take a look:

 

	> vi /etc/rc.conf

 

You should see a bunch of lines like the following:

 

	gateway_enable="YES"
	network_interfaces="xl0 lo0"
	firewall_enable="YES"
	firewall_type="OPEN"
	ifconfig_xl0="inet 10.0.0.10 netmask 255.255.255.0"

 

These are options that are set at boot time. An important concept to understand is that this file is for options that are different from the defaults. That is, you only need to put options in here if you wish to override the defaults. So how do you know what the defaults are? There is a default rc.conf located at /etc/defaults/rc.conf. This default rc.conf file not only has the default boot options for services, it also contains general descriptions for the options. I STRONGLY suggest you look through this file. The rc.conf man page is also very valueable as it gives you all the information about rc.conf, including the full options.

Turning on options is now a snap. Let's look at a couple of examples for adding and changing options for rc.conf.

Example 1 => Changing the default gateway

Your gateway address gets set when you first install FreeBSD. So if you wanted to change it, you would edit /etc/rc.conf :

	# vi /etc/rc.conf
and change:
	defaultrouter="10.0.0.1"
to:
	defaultrouter="10.0.21.2"
What you just did is change the default gateway from 10.0.0.1 to 10.0.21.2. Save and exit the file.

 

Keep in mind that these options are set at boot time. They are not changed automatically when you save the file. In order for your change to take affect you would have to reboot your FreeBSD machine.

And yes, you can change your default gateway without rebooting, but that comes later.

Example 2 => Activating a firewall

Suppose you wanted to turn a firewall on to play with or secure your network. You would add the following options to /etc/rc.conf:

	firewall_enable="YES"
	firewall_type="OPEN"
This turns on the ipfw firewall within the kernel. Like before, it does not become active until you reboot. Setting firewall_type="OPEN" just means to keep the firewall open to all packets. You want to add that until you actually configure the firewall or you will be not be able to do anything on the network as the default is to DENY all packets. Firewalling will be covered later.

 

As you can see, its pretty easy to turn basic system services on and off by working with /etc/rc.conf. We will visit /etc/rc.conf through the rest of this Tutorial.

FreeBSD Ports




I went over how to turn on and off system services (ie, Programs that come with the system) above. FreeBSD has another collection of addon programs which you can choose from and install onto your system. These 3rd-party programs are known as the Ports Collection. There are currently 6000+ programs you can install on your system. If you chose to install the "Ports Collection" when you installed FreeBSD, you should have the ports collection on your system. If you did not choose to install the ports during the install process...don't worry...you can still get them. First let's explain what the ports are.

All the ports collection is is a categorized skeleton structure of how to retrieve, compile, and install a program on your system. This skeleton is installed in /usr/ports. Within /usr/ports lies the ports Categories. Lets have a look:

	> cd /usr/ports
	> ls
	INDEX        audio         editors       mail        sysutils
	LEGAL        benchmarks    emulators     math        textproc
	Makefile     biology       ftp           mbone       vietnamese
	Mk           cad           games         misc        www
	README       chinese       german        net         x11
	README.html  comms         graphics      news        x11-clocks
	Templates    converters    irc           palm        x11-fm
	Tools        databases     japanese      print       x11-fonts
	YEAR2000     deskutils     java          russian     x11-servers
	archivers    devel         korean        security    x11-toolkits
	astro        distfiles     lang          shells      x11-wm

These are the Categories. Actually they are directories. For example, the "games" directory contains all the ports that deal with games, the "databases" directory contains all the ports that deal with databases. You get the idea. How do you know which ports are what? You can find out a several of ways. The easiest way is to look inside the port directory for a file called pkg-descr or DESCR. WIthin this file will be a brief description of what the port is. Let's looks at one.

	Let's look in Math Categories:

	# cd /usr/ports/math
	# ls
	Makefile      femlab        libranlib      pspp          umfpack
	PDL           fftpack       linalg         py-gnuplot    vtk
	R-a4          fftw          linpack        py-scientific wingz
	R-letter      freefem       metis          pygist        wmcalc
	README.html   fudgit        netcdf         rcalc         xgfe
	Scilab        geg           ngraph         rng           xgraph
	abs           glove         ntl            sc            xldlas
	add           gnumeric      numpy          siag          xlispstat
	apc           gnuplot       octave         simpack       xmgr
	blas          gnuplot+      oleo           slsc          xplot
	calc          grace         p5-MatrixReal  snns          xspread
	calctool      grpn          p5-Set-IntSpan spin		     xwpl
	concorde      gsl           pari           ss
	dcdflib       hexcalc       parmetis       superlu
	eispack       lapack        pkg            topaz
	eval          libneural     plplot         umatrix

	Hmm, what is 'spin'?  Let's find out:

	# cd spin
	# cat pkg-descr
	Spin is an efficient on-the-fly verification system
	(a `model checker') for asynchronous concurrent systems,
	such as data communication protocols, distributed operating
	systems, database systems, etc.
	It can be used to prove both safety and liveness properties,
	including all correctness requirements expressible in linear
	time temporal logic.
	Spin uses a high level language to specify systems descriptions,
	called PROMELA (PROcess MEta LAnguage).
	#
Now we know what the spin program i

 

Now let's actually install spin !

	Let's make sure we're in the right place to install 'spin':
	# pwd
	/usr/ports/math/spin

	Good, Let's install it now:

	# make install
What your FreeBSD system does at this point is:
	1) Download the source tarball (The actual source code for spin) from the internet
	2) Place the tarball in /usr/ports/distfiles
	3) Extract the tarball in the 'work' directory in the current directory (ie, /usr/ports/math/spin/work)
	4) apply any source code patches that are needed for your system to run this program
	5) if you need other ports to compile or run this port (dependancies), repeat steps 1-6
	6) compile dependancies and this port
	7) Install dependancies and this port
All ports related files usually get installed in /usr/local. This includes your compiled program, config files, libraries, etc. So its usually safe to say that everything in /usr/local is anything you've added to your system that is not part of the base FreeBSD system. The 'make' process takes care of worrying about dependancies you may need to compile/run your port.

 

Uninstalling ports is just as easy. Let's uninstall the 'spin' port we just installed above.

	Let's make sure we're in the right place to uninstall 'spin':
	# pwd
	/usr/ports/math/spin

	Good, Let's uninstall it now:

	# make deinstall
This will remove spin from your system.

 

So that's the famous Ports collection. Very powerful and easy to use. There are other ways of installing 3rd party programs. You can get precompiled binaries (aka FreeBSD packages) as well. This is usually another way to get the program you want without actually compiling it. You can also manually download the source code compile and install it yourself without ever using the ports or packages.

The FreeBSD GUI

FreeBSD also comes with a GUI called sysinstall. You can use this GUI to do a lot of the main configuration of the system as well as:

	-Upgrading the System (aka Binary Upgrade)
	-Add System distribution sets (add on system software, not ports)
	-Partition and label newly added hard drives 
	-Configure a mouse
	-Configure some system startup services (like we did above in the Config section)
	-Install FreeBSD packages (packages not ports)
	- and so on and etc.
Sysinstall is a nice little GUI that can do a lot of things, but not all things. It's worth mentioning because I wanted to follow up on the question I posed earlier: What if I didn't install the ports collection during the install process. You can now use sysinstall to install the ports skeleton framework.
	# /stand/sysinstall

	A window will pop up.  Select:

		"Do post-install configuration of FreeBSD"

	then select:

		"Install additional distribution sets"

	then hit the space bar to put an "X" in the line at says:

		"The FreeBSD Ports Collection"

	hit [ENTER] button. Now choose where you want to install it from.
Once this gets done you can exit out of sysinstall and you should now have a complete ports skeleton framework in /usr/ports!

 

You might have recognized sysinstall...you used it when you installed FreeBSD for the first time! I would recommend running through the menus as I will not be going into great detail simply because it's a GUI.



Be the first one to comment on this page.




  BSD eBooks

No eBooks on BSD could be found as of now.

 
 BSD FAQs
More Links » »
 
 BSD Interview Questions
More Links » »
 
 BSD Articles

No BSD Articles could be found as of now.

 
 BSD News

No News on BSD could be found as of now.

 
 BSD Jobs

No BSD Articles could be found as of now.


Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previoushome Next

Keywords: bsd programming language, bsd language programming tutorial pdf, history of bsd programming, basic bsd programming, bsd band satellite programming, syntax use in bsd programming, bsd programming software download, turbo bsd programming, bsd programming code, learn bsd programming

HTML Quizzes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizzes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizzes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizzes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizzes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizzes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building Quizzes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizzes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizzes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizzes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizzes
Oracle Quiz
MySQL Quiz
Operating System Quizzes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizzes
Testing Quiz
Firewalls Quiz
SAP Module Quizzes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizzes
Corba Quiz
Networking Quiz
Microsoft Office Quizzes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizzes
Financial Accounting Quiz
Managerial Accounting Quiz
Testimonials | Contact Us | Link to Us | Site Map
Copyright 2008. Academic Tutorials.com. All rights reserved Privacy Policies | About Us
Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Jobs Assist | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Webhosting in India | Dedicated Server in India | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Tests World | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
Copyright 2003-2019 Vyom Technosoft Pvt. Ltd., All Rights Reserved.