Sunday, March 27, 2011

Citycell Zoom Ultra in Linux / Ubuntu / Centos

Citycell  ZOOM ULTRA modem setup in linux ( ubuntu , rhel, centos )
1. Please ensure you have following packages install in your system
wvdial

using google you can find and install those packages easily.

2. Then plug in the Zoom Ultra modem in USB and open a terminal using root user. Then type
# lsusb

Output will be something like the following .

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 19d2:fff5 ONDA Communication S.p.A.

Look at the last line. If the modem detected by your laptop/desktop you can see a line similar to that. Note that 19d2:fff5 is not the product ID of the modem, rather it is the storage device ID integrated with the modem (Where program for WINDOWS reside)

3. Now type :
gedit /etc/usb_modeswitch.conf
This will open usb_modeswitch configuration file in editor.
Delete everything from the page and past the follwinf lines.

DefaultVendor= 0×19d2
DefaultProduct= 0xfff5
TargetVendor= 0×19d2
TargetProduct= 0xfff1
MessageContent=”5553424312345678c00000008000069f030000000000000000000000

4. Now save the page and run the following command:
# usb_modeswitch

5. Now check the device id by typing lsusb command again.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 005: ID 19d2:fff1 ONDA Communication S.p.A.

Product ID changed.

6. Now:
# gedit /etc/wvdial.conf
Delet everything from the page and past the following lines
[Dialer myzoom]
Username = waps
Stupid Mode = 1
Password = waps
Phone = #777

And save then exit.
7. Now type
# wvdialconf

8. Then type
#wvdial myzoom

 Last lines of output will be like this:
--> pppd: 5[18] @,[18]
^CCaught signal 2: Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd:
5[18] @,[18]

Now you are connected. You have to keep open the terminal as long as you want to use the zoom modem. For disconnection simply close the terminal or Press CTRL+C.

For any help please leave a comment.

Monday, February 14, 2011

How to install nagios in RHEL 5 or FEDORA



Install Nagios on RHEL5
Dependencies
* Install Apache and PHP
* GCC
* GD development lib
Create User Account

/usr/sbin/useradd -m nagios
passwd nagios
/usr/sbin/groupadd nagcmd
/usr/sbin/usermod -a -G nagcmd nagios
/usr/sbin/usermod -a -G nagcmd apache

Build and Install Nagios Core

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.0.tar.gz
tar zxf nagios-3.2.0.tar.gz
cd nagios-3.2.0
./configure --with-command-group=nagcmd

make all
make install
# Installs the init script in /etc/rc.d/init.d
make install-init
# Installs and configures permissions on the directory for holding the external command file
make install-config
# Installs sample config files in /usr/local/nagios/etc
make install-commandmode

# Set contact email
vi /usr/local/nagios/etc/objects/contacts.cfg

# Install web interface
make install-webconf
# Create web interface account
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

# Restart Apache
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start
# Or
/sbin/service httpd restart

Compile and Install Nagios Plugins

wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.14.tar.gz
tar zxf nagios-plugins-1.4.14.tar.gz
cd nagios-plugins-1.4.14
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

AutoStart/Start/Stop Nagios
 # Auto start Nagios
/sbin/chkconfig --add nagios
/sbin/chkconfig nagios on
# Check config file
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
# Start/Stop Nagios
/etc/init.d/nagios stop
/etc/init.d/nagios start

Add host/router/switches to nagios
# To add node, uncomment respective cfg_file line in
/usr/local/nagios/etc/nagios.cfg

Example: if you want to monitor a switch then uncomment following line in nagios.cfg

cfg_file=/usr/local/nagios/etc/objects/switch.cfg

# Then go to /usr/local/nagios/etc/objects/
And open switch.cfg

vi /usr/local/nagios/etc/objects/ switch.cfg

There is an example of adding node. You can use that by copy/paste.

Access Web Interface
or

References