Tuesday, January 6, 2009

Increasing the swap space

How can you increase your swap space

For some application sometimes you will need more swap space than that what you have now. In my case I was having only 840 MB and when I tried to install Oracle 10g server i couldn't install it as it requires more swap space. So I had to increase my swap space. First you have to see how much swap space you are having now. For that go to terminal and type swapon -s which will show you the swap space and it will show you something like this

asha@asha:~$ swapon -s
Filename Type Size Used Priority
/dev/sda4 partition 979956 313344 -1

Now you can take some space from one of your partitions. And if you are having another partition other than / then better to take from that. And one warning is there.If you have some important data you better back up.

In order to create supplementary swap file you are using dd (data dump) command.You have to do it in the root.

So type in the terminal

dd if=/dev/zero of=/extra-swap bs=1M count=1024

We'll use the mkswap command to make our file swap-consumable for the Linux kernel.

mkswap /extra-swap

To turn on the swap file run

swapon /extra-swap

Now swapon -s will show the new file also.

And to make this swap on even after booting your machine you have to

cp /etc/fstab /etc/fstab.mybackup

Now its done. And you can continue with the installation.

Oracle Client installation

How can You Install Oracle client in ubuntu

First you have to get the Debian file. You will get it from the link : http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html

Here you have to download the Oracle database 10g express client. If ou are using ubuntu then you have to get the *.deb file.You may have to make an account and get a username and password in that site For installing double click on the file you have downloaded.And follow the procedure. Then it will get installed and you can access the SQL CLI from the Applications --> Oracle client 10g Express edition.

If it is showing some error when you try to connect to the server, as shown in the figure.

Image:Oracle.png

Then you have to open the file nls_lang.sh. And in that file there will be some bugs. In that file make sure that in the lines 106 & 108 there is only single brackets. This will clear the bug and you can get it running.


Make the ntfs file system writable

How Can I Make the ntfs file system writable?

The ntfs file systems were read only on Linux. On the 14th of July 2006, a developer of the linux-ntfs team, Szabolcs Szakacsits, revolution this area by releasing a new driver ntfs-3g which claimed to provide full read/write support for all NTFS partition. After months of successful testing by hundreds of thousands of users in beta status, ntfs-3g is now fully stable.

For mounting NTFS you can use one small tool called NTFS-3G this is very powerfull and simple tool.

For those who are using Ubuntu 7.04 Feisty Fawn

Open the terminal and type $ sudo apt-get install ntfs-3g ntfs-config . This will make your windows ntfs partitions writable.

For those who are using Ubuntu 6.10 Edgy Ft.

Go to CLI . Then there type $ sudo gedit /etc/apt/sources.list

Then the gedit will open and there you have to add teh following lines in the last. Then save the file and exit.

deb http://givre.cabspace.com/ubuntu/ edgy main
deb http://ntfs-3g.sitesweetsite.info/ubuntu/ edgy main
deb http://flomertens.keo.in/ubuntu/ edgy main

Now update the source list by using the command $ sudo apt-get update

If you want to install ntfs-3g run the following command from your terminal $ sudo apt-get install ntfs-3g

Setting Themes

The first thing I do, when I install a linux will be making the machine look good. One of which is selecting a good theme. The theme plays a very important role in making a system user friendly especially when you install debian. The fresh installed system will have a classic look which is not much accepted by a person who is using windows xp or vista. I had an experience once. I was installing debian and after installation one of my friend who was watching the installation said "Oh GOD linux!!!" . Then I changed the themes and the looks of task bar, my friend said "wow Linux looks so great!!! "

The wallpaper plays an important role in looks. Get an eye freshening wallpaper on to your desktop or laptop.

The theme includes how the system should look like. The color of the window borders, task bar, the icons, all can be changed while setting the theme. The Themes can be access by:

Desktop --> Preferences --> Theme

There you can try selecting different themes which will change the task bar, icons and window borders.You can save new themes by changing the parameters. The parameters can be accessed by selecting the Theme Details. For deifferent combinations you can save themes.

Also you can download debian themes from sites and you can install it from the Theme window through install .
As on the figure you can get a nice task bar at the bottom by simply customizing the task bar. For this first you better add the windows list to the upper panel by right clicking on it and selecting Add to Panel . Then you can add show desktop to your upper panel. Now delete the lower panel and create new one by right clicking on the upper pannel, by selecting the New Pannel.

Now from the bottom new pannel select Properties .
Make the Size 50 , untick Expand, Autohide and Show hide buttons. Now select Background tab and select Solid Color sliding the Style to the left will make it transparent. Then add different applications by adding to panel which will list on your panel as icons. This will give a good look which is something similar to MAC os eventhough it is not a dock.

If you are interested in playing more with display effects you can get compiz-fusion installed on your machine.

Tuesday, May 29, 2007

Asterisk The VoIP

Asterisk Basics

Asterisk is the open source/free software implementation of PBX, created by Mark Spencer of Digium. Asterisk allows a number of attached telephones to make calls to one another.And this runs on Linux, BSD, Windows and OS X. Asterisk software is written inC. As it is released under dual licensing scheme users can create new functionality by modifying the source code.This can run on both soft phones and hard phones. As of March 6, 2007, the current release version of Asterisk is 1.4.1.

License Scheme

It is released under dual licensing scheme of which the free software license is GNU general public license and the other is properitory license.

Many built-in features are included in this. Like voicemail, Interactive voice response, Conference calling, Automatic call distribution, etc. Also the users can have their own new features by editing the code.

Protocol IAX2

Asterisk also supports a wide range of Voice over IP protocols, like SIP, H.323, Inter-Asterisk eXchange (IAX).But Asterisk uses IAX2 more than the other two protocols as it is more friendlier when NAT issues come. Also IAX2 uses single UDP stream for transmission whereas SIP uses two line and H.323 uses three lines. In IAX2 data from multiple calls can be merged into a single set of packets which in turn reduces the effective IP overhead without creating additional delay. This helps in conference calling also effect bandwidth efficiency in a good way.

Installation on Debian

There are two ways to install the asterisk. One is downloading the source code and compiling it and run.For further information read http://www.asteriskguru.com/tutorials. You can also get it by using

# sudo aptitude install asterisk

which will install all the related packages. After installation you have to configure it.

Configuration

The configuration files appear in the /etc/asterisk file. Mainly three configuration files are there.

iax.conf

extensions.conf

voicemail.conf

In the iax.conf you can set up the incoming and outbound calls.

eg: [marko]

type = friend
host = dynamic
context=friends
secret=
callerid=
permit=192.168.0.0/255.255.255.0
mail=007@voicemail

In this type can be friend, user or peer.

Friend => incoming and outgoing calls

peer => outgoing calls

user => incoming calls

Host can be dynamic or a particular IP address. You can set static IP which will be associated with this account or to use dynamic one. Usually in laptops host is set as dynamic. Then you have to mention under which context this user is coming.then set a password which has to be given to the user. Also by giving the permission like this the users can make calls each other only within this network.

Now in the extensions.conf you will configure the dial plans.

eg: [voicemail]
exten => 333,1,VoicemailMain
[friends]
static=yes
exten => 333,1,Dial(IAX2/marko,10)
exten =>333,2,VoiceMail(333@voicemail)

exten => 8502,1,VoicemailMain(333@voicemail)
exten => 8502,n,Goto(s,6)

Here when some one tries to call to the number 333 then the first priority is set to dial marko for 10 seconds and if the call is not attended by him then the caller will enter the voicemail box. Then for getting the voicemail messages marko should dial 8502 and it will reach the IVR and according to the instruction you have to follow. Now suppose that there is one more context and then if you want to call to other extend users then you have to include one context inside this context.

In the voicemail.conf the voicemail optoins has been set up.

eg: [voicemail]
333 => 3333,marko,

In this, the first field is the password which should be the numerical password.

Thus the configuration is set up.

Asterisk Server


The asterisk server can be managed by using the console. To enter the console from root :



#asterisk -r

And,


#help

will display all the commands. Also after any modification you have to restart the asterisk every time. Then only the changes will get into effect. For restarting the asterisk the command is

#restart now


Soft Phones


Lots of softphones can be installed.One of them is kiax which uses the IAX2 protocol. This can be installed using

#sudo aptitude install kiax


This will install the soft phone kiax.Now for making the phone work you have to install it the asterisk server. Then you can make calls between phones through the server.

Hard Phone

You can connect hard phones to the asterisk. For that you need an external hardware like PCI card to connect to the system.

The main advantage of asterisk is that you can be free from the toll charges. If you are having internet that is only sufficient to make calls. Also it is very easy to set up.

So try this new technology in enterprise and make your colleagues call each other free.

References


Book : VoIP Telephony with Asterisk, By Paul Mahler.

http://www.asteriskguru.com/

http://en.wikipedia.org/wiki/Asterisk_%28PBX%29

http://www.voip-info.org/wiki-asterisk

http://www.kiax.org/about/

Also you can listen to the video of presentation given by Mark Spencer from here,

http://graphics.cs.uni-sb.de/VCORE/recordings.html

And join the forums to clear your doubts in installation and configuration

http://www.asteriskguru.com/board/index.php ---- forum