Thursday, April 8, 2010

Using bridged networking with Virt-manager

To do this, we install the package bridge-utils...

yum install bridge-utils

... and configure a bridge. Create the file /etc/sysconfig/network-scripts/ifcfg-br0 (please use the BOOTPROTO, BROADCAST, IPADDR, NETMASK and NETWORK values from the /etc/sysconfig/network-scripts/ifcfg-eth0 file):

vi /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

Modify /etc/sysconfig/network-scripts/ifcfg-eth0 as follows (comment out BOOTPROTO, BROADCAST, IPADDR, NETMASK, and NETWORK and add BRIDGE=br0):

vi /etc/sysconfig/network-scripts/ifcfg-eth0

# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
#BOOTPROTO=static
#BROADCAST=192.168.0.255
HWADDR=00:10:A7:05:AF:EB
#IPADDR=192.168.0.100
#NETMASK=255.255.255.0
#NETWORK=192.168.0.0
ONBOOT=yes
BRIDGE=br0

Restart the network...

/etc/init.d/network restart

... and run

ifconfig

It should now show the network bridge (br0):

[root@rajat1 ~]# ifconfig
br0 Link encap:Ethernet HWaddr 00:10:A7:05:AF:EB
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::210:a7ff:fe05:afeb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1160 (1.1 KiB) TX bytes:14875 (14.5 KiB)

eth0 Link encap:Ethernet HWaddr 00:10:A7:05:AF:EB
inet6 addr: fe80::210:a7ff:fe05:afeb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13662 errors:7 dropped:160 overruns:4 frame:0
TX packets:11646 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15144608 (14.4 MiB) TX bytes:1379942 (1.3 MiB)
Interrupt:74 Base address:0xcc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4308 (4.2 KiB) TX bytes:4308 (4.2 KiB)

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:9987 (9.7 KiB)

[root@rajat1 ~]# brctl show

bridge name bridge id STP enabled interfaces
pan0 8000.000000000000 no
virbr0 8000.000000000000 yes
br0 8000.0019b97ec863 yes eth0

Tuesday, March 23, 2010

Free OS and Software

Debian, Kubuntu, Ubuntu, Xandros, SUSE, Red Hat, Fedora, CentOS, Linspire, Mandriva, Slackware, Open BSD, Gnome, KDE, MySQL, PostgreSQL, PostGIS, Slony, Zarafa, eGroupware, Kolab Groupware, Scalix, SugarCRM, vTiger, CITADEL, Mozilla-Firefox, Mozilla-Suite, OpenOffice, LibreOffice, Thunderbird, Wine, Apache, hadoop, Nginx Drupla, Joomla, Jboss, Wordpress, WebGUI,  Tomcat, TiKi WiKi, Wikimedia, Asterisk, OpenSER, FreePBX, OpenPBX, CallWeaver, SpamAssassin, ClamAV, OpenLDAP, OTRS, RT, Samba, Cyrus, Dovecot, Exim, Postfix, sendmail, Amanda, Bacula, DRBD, Heartbeat, Keepalived, Nagios, Zabbix, Zenoss, Open Security Filter, Ferm, FAI, Moodle, Squid, XEN, KVM, OpenVZ, Xenserver, Eucalyptus, OpenQRM, Opennebula, VirtualBox, Mondorescue, Spacewalk, Convirture, OpenVPN, VLC, PiTiVi, XBMC, dimdim, Puppet, osclass, Django, Affelio, AROUNDMe, BuddyPress, Elgg, iSocial, Mahara, Xoops, Magento, Jcow, Jinzora, OpenStack.

All Above product support available free of cost :D

Monday, March 8, 2010

Fedora Talking to you

# [root@rajat Rajat]# yum install espeak
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package espeak.x86_64 0:1.40.02-3.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
espeak x86_64 1.40.02-3.fc12 fedora 605 k

Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 605 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 605 k
espeak-1.40.02-3.fc12.x86_64.rpm | 605 kB 00:14
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : espeak-1.40.02-3.fc12.x86_64 1/1

Installed:
espeak.x86_64 0:1.40.02-3.fc12

Complete!

Example 1: Speak the words specified in command line

This is the default usage.

# espeak --stdout 'words to speak' | aplay

Note: The above may also display the following message: “Playing WAVE ’stdin’ : Signed 16 bit Little Endian, Rate 22050 Hz, Mono”
Example 2: Speak the words specified in stdin

This will take the words interactively from the standard input and convert it to speech.

# espeak --stdout | aplay

Example 3: Speak your document

This will convert the text from the mydocument.txt to speech.

# espeak --stdout -t mydocument.txt | aplay

Example 4: Generate voice file from text document

Convert your text file to an audio file as shown below.

# espeak -t mydocument.txt -w myaudio.wav

Customizing espeak

If you find the default speech synthesizing is not good, you can try to customize it as explained below.
Example 5: List all available voice languages

# espeak --voices
Pty Language Age/Gender VoiceName File Other Langs
5 af M afrikaans af
5 bs M bosnian bs
5 ca M catalan ca
5 cs M czech cs
5 cy M welsh-test cy
5 de M german de
5 el M greek el
5 en M default default
5 en-sc M en-scottish en/en-sc (en 4)
.......

Example 6: Choose a different voice language

The following will use “en-uk” – British english to translate the text to speech.

# espeak -v en-uk --stdout 'reading tips & tricks in TGS' | aplay

Example 7: Increase or Decrease the number of spoken words per minute.

The default is 160 words per minute. You can reduce it using option -s as shown below.

# espeak -s 140 -f mydocument.txt | aplay

Example 8: List the available espeak voices in specific language

The following example will display all possible english language variation that you can use for your text to speech conversion.

# espeak --voice=en
Pty Language Age/Gender VoiceName File Other Langs
2 en-uk M english en/en (en 2)
3 en-uk M english-mb-en1 mb/mb-en1 (en 2)
2 en-us M english-us en/en-us (en-r 5)(en 3)
5 en-sc M en-scottish en/en-sc (en 4)
5 en M default default
.....

Monday, February 15, 2010

Setting DNS Server with Bind

/etc/named.conf.

zone "chida.in" {
type master;
notify no;
allow-query { any; };
file "chida.zone";
};

zone "yeswedeal.com" {
type master;
notify no;
allow-query { any; };
file "yeswedeal.zone";
};

zone "0.168.192.in-addr.arpa" {
type master;
notify no;
file "192-168-0.zone";
};

chida.zone
# vi /var/named/chroot/var/named/chida.zone

$TTL 3D
@ IN SOA ns1.chida.in. hostmaster.chida.in. (
200211152 ; serial#
3600 ; refresh, seconds
3600 ; retry, seconds
3600 ; expire, seconds
3600 ) ; minimum, seconds

NS www ; Inet Address of nameserver
chida.in. MX 10 mail ; Primary Mail Exchanger

localhost A 127.0.0.1
server A 192.168.0.1
mail A 192.168.0.2
ns1 CNAME server
www CNAME server

yeswedeal.zone
# vi /var/named/chroot/var/named/yeswedeal.zone

$TTL 3D
@ IN SOA ns1.yeswedeal.com. hostmaster.yeswedeal.com. (
200211152 ; serial#
3600 ; refresh, seconds
3600 ; retry, seconds
3600 ; expire, seconds
3600 ) ; minimum, seconds

NS www ; Inet Address of nameserver
yeswedeal.com. MX 10 mail ; Primary Mail Exchanger

localhost A 127.0.0.1
server A 192.168.0.1
mail A 192.168.0.3
ns1 CNAME server
www CNAME server

192-168-0.zone
# vi /var/named/chroot/var/named/192-168-0.zone

$TTL 3D
@ IN SOA www.chida.in. hostmaster.chida.in. (
200303301 ; serial number
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds

NS www ; Nameserver Address

$TTL 3D
@ IN SOA www.yeswedeal.com. hostmaster.yeswedeal.com. (
200303301 ; serial number
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds

NS www ; Nameserver Address



# chkconfig named on


# /etc/init.d/named { start | stop | status | restart }


# dig www.chida.in


# nslookup www.yeswedeal.com