June 2008

How to Select default audio device in Ubuntu 8.04

I am using plantronics USB headset connected to a laptop with Ubuntu Hardy installed. I can play audio through USB headset using totem movie player after it was changed in System > Preferences > Sound. The problem is Mozilla Firefox is not playing audio through USB headset. Firefox can play audio through the laptop speakers but the sound sucks.

To fix this problem, we need to tell alsa to set the USB headset as the default sound card.

asoundconf list

Here are the list of the sound cards present in the system.

How to Install php5 and mysql-server 5 in CentOS 4

Enable centosplus repo to install php5 and mysql 5

yum enablerepo=centosplus install php php-mysql mysql mysql-server

How to Install Gnome/KDE Desktop in Debian Sarge

There are two available X Window system in Debian Sarge.

Using XFree86

Run this command in the console to install XFree86:

apt-get update
apt-get install xserver-xfree86 xbase-clients xfonts-base xterm

or you can run this command

apt-get install x-window-system

How to Setup Transparent Proxy and Content Filtering using Squid and Dansguardian in Debian Etch

This guide will walk through the setup and installation of Debian GNU/Linux and Squid proxy. Optionally, DansGuardian may be used in addition to provide URL blacklisting and content filtering. This guide will also work in CentOS, Ubuntu Dapper and later versions of Ubuntu.

The setup process contains the following steps:

How to Configure your Debian Etch or Ubuntu 8.04 box as an Internet Gateway/Router using IP Masquerading

This is a step by step tutorial how to make an Internet Gateway using Debian Etch or Ubuntu 8.04 LTS machine.

1. Configure your NIC

Add two network cards to your pc and install Debian or Ubuntu (I will prefer Debian Etch or Ubuntu 8.04 LTS). Configure the ip address of your network cards.

vi /etc/network/interfaces

Your network card configuration should be look like this:

How to Configure your CentOS 4 box as an Internet Gateway/Router using IP Masquerading

What is IP Masquerading?

IP Masquerade is a form of Network Address Translation or NAT which NAT allows internally connected computers that do not have one or more registered Internet IP addresses to communicate to the Internet via the Linux server's Internet IP address. The software interface which enables one to configure the kernel for IP masquerading is iptables.

To configure IP Masquerading, you need to have two LAN cards, a PC with CentOS 4 Linux installed.
Install the LAN cards and configure the IP address of your public and private network.

1. Configure the IP address of your public network, it should be similar like this one.

How to Configure Apache to Password Protect your Web Directory

If you are developing a new website and you do not want the general public to view it or you have an important documents on your web directory that you want to secure, you can configure your Apache web server to password protect your web directory. If a web directory is password protected and a user attempts to open either that directory area or a file in that directory, a window will appear requesting a required username and password. With the proper username and password entered, the user will be allowed to view files in that directory.

How to Install Asterisk 1.4 and Asterisk GUI in Ubuntu 6.06 LTS Server and Debian Etch

1. Preparing your system

Update your Ubuntu 6.06 LTS or Debian Etch necessary packages to be able to install Asterisk 1.4 from source.

2. Updating your system

Before downloading the update, make sure your apt source list is updated.

Download the following packages:

Howto Install Asterisk 1.4 and Asterisk GUI in CentOS 4 and CentOS 5

1. Preparing for installation

Installation of Asterisk 1.4 is slightly different than installing Asterisk 1.2. There are some slight changes in the installation and some packages is needed. Asterisk GUI is available for Asterisk 1.4 only and the installation package is avalabe in Digium's svn repository. To install Asterisk GUI you need to download the subversion package.

Do the command:

How to Install a web-based Asterisk CDR analyzer

By default Asterisk generates CDR records in a CSV files located in /var/log/asterisk/cdr-csv directory. Asterisk can also store CDR records in a database such as MySQL or PostgreSQL database as an alternative to CSV files. If your CDR records are stored in a database, you can install a web-based CDR analyzer to easily manage and analyze your CDR records like Asterisk-stat by http://areski.net.

Here are some features of Asterisk-stat

Asterisk 1.2 auto install script for CentOS 4 and CentOS 5

I created an auto install script to install Asterisk 1.2 for CentOS 4 and CentOS 5. This script will install the following:

  • Zaptel
  • Libpri
  • Asterisk
  • Asterisk Addons
  • Open Source G729 Codec

Before running these script, you must install the some software needed to compile Asterisk.
For CentOS 4:

yum install gcc kernel kernel-devel bison openssl-devel

For CentOS 5:

yum install gcc kernel kernel-devel bison openssl-devel libtermcap-devel ncurses-devel

kernel-smp-devel (instead of kernel-devel) is necessary if you are using a dual core processor.

How to Install Asterisk 1.2 in CentOS 4 and CentOS 5

Minimum Requirements

To install Asterisk server in your computer, please consider the minimum hardware and software requirements. These are the minimum requirements.

Operating system:

Cool Asterisk Features

Asterisk

Checkout this cool video about Asterisk. This video introduce the Asterisk capabilities and the advantage of using Asterisk PBX.

Asterisk PBX

Asterisk

Having a fully functional PBX system is not a big problem anymore. Thanks to Asterisk, you can now have a working PBX installed on your PC running GNU/Linux without spending a lot of money.

What is Asterisk?

Asterisk is an open source Private Branch Exchange (PBX) that runs on Linux, BSD and Mac OSX. It was created by Mark Spencer of Digium in 1991. Like any PBX, it allows a number of attached telephones (extensions) to make calls to one another, and to connect to other telephone services including the public switched telephone network (PSTN).

The basic Asterisk software provides all of the features you would expect from a proprietary PBX including: voicemail, conference calling, interactive voice response (IVR), and automatic call distribution (queue). These are just a few of the features that it can provide, you can view a list of supported features at Asterisk's Web site.

How to Install GnuGk in CentOS 4

Preparing for Installation

I will assume that you already have the latest version of gcc and bison, and to install GnuGk 2.2.5 in your system you need to download these programs and install them prior to the installation of GnuGk.