Shout Box

Latest Message: 10 months, 1 week ago
  • Shantanu Bha : --
  • Shantanu Bha : aaa
  • Shantanu Bha : -
  • Shantanu Bha : -
  • Shantanu Bha : -
  • Shantanu Bha : -
  • Shantanu Bha : -
  • Shantanu Bha : -
  • Shantanu Bha : -
  • Shantanu Bha : -

Guests are shown between [].

Only registered users are allowed to post

Tag Selector

Zaragoza Clouds

by Zaragoza Online

ubuntu

Installing Perl Modules in Ubuntu PDF Print Email
Written by   
Thursday, 07 January 2010 15:52

Suppose I want to install CGI::Application I use the following command
sudo apt-cache search perl CGI::Application

2) It will return the package name as below:

libtitanium-perl

3) Now I can install this module by following command:

sudo apt-get install libtitanium-perl


Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
 
Configuring micromax MMX 300G airtel 3g Data card in Ubuntu PDF Print Email
Written by   
Sunday, 29 November 2009 18:24

This is still a work in progress but I have achieved higher success than my peers on the internet so I am posting my results here :

First of all as you might have noticed this device has two modes one is the storage device mode where it acts like a usb CDROM and the other is the modem mode. the Storage mode is the default mode. 

To make this device work the first obvious thing to do would be to switch its usb mode.

First just for the heck of it look at the output of lsusb

one of the lines would go like  0x1c9e:0xf000

right this is the vendor:productid  for storage mode of this modem

the vendorid:productid for modem mode is 0x1c9e:0x9603

get this file
http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.2.tar.bz2

 First of all you need to extract it enter the extracted folder

copy the file usb_modeswitch to /usr/bin

$ sudo cp usb_modeswitch /usr/bin/

copy usb_modeswitch.conf to /etc folder

$ sudo cp usb_modeswitc.conf /etc/

open up usb_modeswitch.conf and add the following lines at the end

 ##########
# Settings for Micromax MMX 300G USB Modem
##########
DefaultVendor = 0x1c9e
DefaultProduct = 0xf000

TargetVendor = 0x1c9e
TargetProduct = 0x9603

MessageEndpoint=0x01

MessageContent="55534243123456788000000080000606f50402527000000000000000000000"

Thats the correct config for Micromax MMX 300G modem.

run the command 

$ sudo /usr/bin/usb_modeswitch

run lsusb again

voila: the modem mode is on. notice the new productid showing in the lsusb output

Wrap up by mounting the modem:

$ modprobe usbserial vendor=0x1c9e product=0x9603

 



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
Last Updated on Sunday, 29 November 2009 18:38
 
Setting up Secure Socket Layer / Transport Layer Security ( SSL / TLS ) on APACHE webserver PDF Print Email
Written by   
Wednesday, 15 October 2008 12:02

ssl allows relatively secure connections over http using a key ceritficate combination for the http server.to enable https connections the webserver needs to set up a ceritficate. following instructions deal with setting up ssl on a generic linux Apache server but can be geralized to most UNIX Distros.

I used the Apache webserver on my Ubuntu (Hardy Heron) laptop as my testing base to set up secure socket layer (SSL).

Installing OPENSSL :

First step before you do anything is to install openssl in to your machine. On ubuntu openssl comes installed by default. you can check by typing the following at the command line. openssl is a useful tool that lets you generate ssl keys and certificates etc and tons of other useful stuff for ssl.

$openssl

 if you get something like command not found etc. you need to install openss. Here are the commands for ubuntu.

$sudo apt-get install openssl

For fedora you might try 

$yum install openssl

After this you would have successfully installed openssl.

Getting mod_ssl :

mod_ssl is the apache package that allows you to actually set up the https connections. mod_ssl depends on a installation of openssl so before you enable it make sure that openssl is pre-installed.

 to check if mod_ssl is installed run the following command.

$ apache2 -l

This should show a list of enabled apache modules however, this might not work on some systems. If that is the case you can try the following :

$httpd -l

Please use the apropriate paths to the bin file apache2 or httpd respectively if neither of the above works.

On Ubuntu (hardy) Apache2 you can simply check if the you can see ssl.conf in the list when you type the following.

$ ls /etc/apache2/mods-enabled/

Enabling mod_ssl :

in ubuntu to enable a installed apache module you can use the command utility a2enmod which simply creates a symlink to a installed module in /etc/apache2/mods-enabled/ from the relevant file in /etc/apache2/mods-available/

Run the following anywhere on the command line:

$a2enmod ssl

Generate a ssl key :

$openssl genrsa -des3 -rand file1:file2:file3 -out www.shantanubhadoria.com.key 1024

 here file1, file2 and file3 are just paths to some random large files on the system

You will be asked to provide a pass phrase, choose a strong one.

 

If you choose to not secure a key use :

$openssl rsa -in www.shantanubhadoria.com.key -out www.shantanubhadoria.com.key.unsecure

Check contents of the key by typing :

$openssl rsa -noout -text -in www.shantanubhadoria.com.key

 

Create a ceritificate signing request :

$openssl req -new -key www.shantanubhadoria.com.key -out www.shantanubhadoria.com.csr

 You will be prompted for cert informarion. you can see the cret info by typing this :

$openssl req -noout -text -in www.example.com.csr

alternatively you can create a self signed cert for testing purposes : 

$openssl x509 -req -days 30 in www.example.com.csr -signkey www.example.com.key -out www.example.com.cert

 chmod the.key file to 400 and store the .key and .cert files in /etc/apache/ssl/

Setting up the Server

Please refer the tutorial on how to install a virtual host on LAMP server for detailed explanation on Virtual Hosts

add a new virtual host or modify an existing virtual host in  the .conf file(or default) for the virtual host stored in /etc/apache2/sites-available/

add the following lines in appropriate places (443 is  thedefault ssl port)

Listen 80

Listen 443

<VirtualHost _default_:443>

ServerName http://www.shantanubhadoria.com

SSLEngine on

SSLCertificateFile /etc/apache2/ssl/www.shantanubhadoria.com.cert

SSLCertificateKeyFile /etc/apache2/ssl/www.shantanubhadoria.com.key

</VirtualHost>

 

restart apache and use https:// instead of http:// to go to your ssl host instead. congrats !! you are all set up with ssl/tls now



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
Last Updated on Wednesday, 15 October 2008 14:55
 
Setup Wi-Fi on Compaq Presario c700 c770TU Atheros AR242x with Ubuntu PDF Print Email
Written by   
Thursday, 25 September 2008 20:04

I recently got a spanking new Compaq Presario c700 ( Model :  c770TU ) with Atheros ar242x PCI Express wlan card from the new company I just moved to. This laptop is not without issues. It was designed for windows Vista and most supporting drivers are for Vista however it ships with XP. This was anyway irrelevant for me as I went ahead and installed Ubuntu 8.04 Hardy Heron on it. Most of the devices got auto configured but there are still a few which need to be setup. One of these is the WIFI. This Laptop has a Atheros Communications Inc.  AR242x 802.11abg Wireless PCI Express Adapter. While it is detected in the initial installation of ubuntu it does not work by default AFAIK.

sudo apt-get update

The following instructions deal with installing setting  AR242x 802.11abg Wireless PCI Express Adapter on Ubuntu, Hardy Heron, but this should also work on all the previous releases of Ubuntu. These instructions presume that you already have internet connection setup to work on ubuntu and that you have already installed Ubuntu. Enter the following command on the Terminal window(opened by going to (Applications->Accessories->Terminal)  to install subversion version control system used to get drivers from the online repository.

sudo apt-get install subversion
Next we will need to install the essentials needed to compile the madwifi packages
sudo apt-get install build-essential
Lets Install Wireless tools while we are at it. Google for info on wireless tools.
sudo apt-get install wireless-tools
cd to your home directory or any other directory where you want to extract the packages.
cd /home/

 

Diable current ath_ modules

sudo modprobe -r ath_pci

sudo modprobe -r ath_hal

At this point you have most of it setup. Now we need to check-out(retrieve) the madwifi drivers from the repository.

sudo svn co https://svn.madwifi.org/madwifi/branches/madwifi-hal-0.10.5.6
Last step should have a directory by name of 'madwifi-hal-0.10.5.6' in your home directory.

Go to System–>Administration–>Hardware Drivers” and disable by un-ticking the following option

Atheros Hardware Access Layer (Hal)

Then Reboot your system.

Open a new terminal window once the system reboots. change directory to the location where you checked out madwifi drivers.

cd /home/madwifi-hal-0.10.5.6/
Run the following commands one by one.

sudo make 

sudo make install  

sudo modprobe ath_pci

sudo reboot

make sure there were no errors reported after running 'make' or 'make install'.

Now Reboot the system once more. your WiFi should work now. :)



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
Last Updated on Tuesday, 18 November 2008 17:25
 
How to install and setup LAMP on Ubuntu PDF Print Email
Written by   
Friday, 19 September 2008 09:45

 

Ubuntu was the new flavour of LINUX based on DEBIAN first released on oct 2004. Since then Ubuntu has been making two releases every year with each release number based on the year and month of release. The latest release was Hardy Heron v 8.04, (affectionately called Hairy Hard-on). Compared to most other popular distros, Ubuntu is not bloated into multiple DVDs of installations. It rather follows the debian's path in packaging only the essentials into a single small installable CD. This CD contains only the bare essentials needed to effectively run a desktop or a notebook with the requisite drivers and a GUI. Because of this the package does not contain the LAMP environment pre-installed.

The following instructions deal with installing LAMP on Ubuntu, Hardy Heron, but this should also work on all the previous releases of Ubuntu.These instructions presume that you already have internet connection setup to work on ubuntu and that you have already installed Ubuntu. Enter the following command on the Terminal window(opened by going to (Applications->Accessories->Terminal)  to get the list of latest packages.

sudo apt-get update
To get started on any web application the first thing required is a web server so since we are talking of LAMP here lets install apache 2.2 :
 sudo apt-get install apache2
Once this is done we need to install mysql server 5.0 and PHP5 mysql-gui tools:
 sudo apt-get install php5 mysql-server-5.0 mysql-gui-tools-common

Install php5-mysql and the gd extension for PHP. This is used by allmost every imaging script in php for generating captchas and graphs etc.

sudo apt-get install php5-mysql php5-gd

Install phpmyadmin for administering mysql. (alternately u may choose to install the GUI based mysql query browser from the (applications->add/remove)

 sudo apt-get install phpmyadmin
Now most seasoned professionals use vi editor to work with PHP, HTML, CSS etc. however the version of VI that comes pre-installed with ubuntu is Vim-tiny and which doesn't support the full level of features like text highlighting, highlighted search, custom themes etc. which makes it kindof less useful. To install the full version of Vi including the GUI version. run the following command.
 sudo apt-get install vim-gtk vim-full vim-scripts

You can install additional plugins for vi like vim-perl, vim-tcl, vim-python for other scripts functionality etc. In general installing vim-full will get you most of the plugins you will ever need.

 sudo apt-get install vim-perl vim-tcl vim-python
Now we need to enable phpmyadmin to be available via the browser. Use the following command to open apache.conf in vi. or substitute vi below with gedit or any editor of your choice.
 sudo vi /etc/apache2/apache2.conf
add the following lines right at the end of apache.conf
  # Enable PHPMyAdmin
Include /etc/phpmyadmin/apache.conf

Save the file and close. Restart apache for all these configurations and extensions to take effect

 sudo /etc/init.d/apache2 restart

After this step you will be able to see the webserver at http://localhost/ or http://127.0.0.1/ and phpmyadmin at http://localhost/phpmyadmin/ or at http://127.0.0.1/phpmyadmin. The webroot for apache is located at /var/www/ as usual, Access error.log and access.log at /var/log/apache2/

 

You can also enable mod_rewrite that lets you rewrite uris etc. for SEO in your .htaccess file by typing the following

$sudo a2enmod rewrite



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
Last Updated on Wednesday, 15 October 2008 13:00
 


Taxonomy by Zaragoza Online