Saturday, January 21, 2012

Linux: Not Able To SSH

Some very common problems we face related to ssh.
  - Not able to ssh to different machine
  - Not able to ssh in my own machine from somewhere else
  - Ping to My Machine works but not ssh

Solution I present is wrt Ubuntu-

Ensure the following. I am sure this will resolve all your problems
  • Ensure you have both client and server installed in your system to be able to ssh to other machine and ssh back to your machine from somewhere else
    • apt-get install openssh-server openssh-client
  • Ensure you have ssh running in system you wish to ssh
    • /etc/init.d/ssh start
    • service ssh start
  • Even with your ssh running you will not be able to ssh to a machine with firewall enable. Stop it or alternative is to enable your 22 port
    • uwf enable 22

Wednesday, January 18, 2012

Installing & Configuration of Bugzilla (Debian & Ubuntu)

I have jotted down the Experience of Installing & Basic Configuration of Bugzilla and published in case someone needs some assistance.


Distributor ID:    Debian
Description:    Debian GNU/Linux 6.0.3 (squeeze)
Release:    6.0.3
Codename:    squeeze

Won't be different for Ubuntu as well. Except that you will have to search and install package with right version. I tried on 10.04, where some or the version of the required package were not available. I hunted them down and installed manually.

INSTALLATION
===========
Following are the steps. Execute them on your terminal.
  • apt-get install locales
  • dpgk-reconfigure locales (Chose en_US.UTF-8 )
  • apt-get install mysql-server mysql-client
    • You also opt for postgresql or oracle
  • Make sure you set the root password (abc) & Keep note of 
  •  apt-get install apache2
  • cd /var/www
  • wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.0.3.tar.gz (or whatever you want)
  • tar xfv bugzilla-4.0.3.tar.gz
  • cd bugzilla-4.0.3
  • ./checksetup.pl --check-modules
    • There will be quite many modules which wouldn't be present. You might opt for overlooking the optional though I suggest not to.
    • You need to install one of mysql, postgresql or oracle
    • The end of script output will explain you how you must install those module. For me it did not work well.
So I had to hunt down those package for each module and install them one by one. Tedious stupid task.
  • I have listed them here as package (Modules it provides). Install them each
    Package (Modules it provides)
    libtimedate-perl (TimeDate)
    librose-datetime-perl (DateTime) (DateTime-TimeZone)
    libtemplate-multilingual-perl (Template-Toolkit)
    libemail-send-perl (Email-Send)
    libemail-mime-perl (Email-MIME)
    liburi-perl (URI)
    libchart-perl (GD) (Chart)
    libtemplate-plugin-gd-perl (Template-GD) (GDTextUtil) (GDGraph)
    libmime-tools-perl (MIME-tools)
    libwww-perl (libwww-perl) (HTML-Parser)
    libxml-twig-perl (XML-Twig)
    libauthen-simple-ldap-perl (perl-ldap)
    libauthen-sasl-cyrus-perl (Authen-SASL)
    libauthen-simple-radius-perl (RadiusPerl)
    libsoap-lite-perl (SOAP-Lite)
    libjson-rpc-perl (JSON-RPC)
    libjson-xs-perl (JSON-XS)
    libtest-taint-perl (Test-Taint)
    libhtml-scrubber-perl (HTML-Scrubber)
    libtheschwartz-perl (TheSchwartz)
    libapache-db-perl (mod_perl)
  • Now re-run ./checksetup.pl --check-modules
    • Verify those installed modules are having right version. If not, you need to hunt those packages here
      • Debian: http://www.debian.org/distrib/packages
      • Ubuntu: http://packages.ubuntu.com/
    • It might happen that for you OS version the expected package version is not available. I had installed the higher version by manually downloading the package and it's dependency
  • apt-get install bugzilla3 bugzilla3-doc
  • Fill in right data whatever is needed. Some Pointers
    • Customising status Resolution: Yes
    • Administrators Email Address: Admin_Vivek@hissite.com
    • Administrators Full Name: Vivek Has FullName
    • Bugzilla's Admin Password (twice): xyz
    • Configure database: Yes
      • Though you can do later also. I prefer this
    • Password for mysql root user: abc
      • make sure you provide mysql passwd and not any other
    • Give password for bugzilla user (twice): abc1
    • Now the installation will be done successfully
  • Now re-run ./checksetup.pl but without --check-modules option
    • it will generate localconfig file
  • Now edit localconfig
    •  $webservergroup = 'www-data';
    •  $db_name = <name of your database>;
    •  $db_user = '<user name of your database, no root>';
    •  $db_pass = '<passwd of above db_user>';
  •  Now re-run ./checksetup.pl but without --check-modules option AGAIN
    •  This should go right. If problem reconfirm your above values
  • Now edit your apache file /etc/apache2/httpd.conf
<Directory “/var/www/bugzilla”>
AddHandler cgi-script cgi
DirectoryIndex index.cgi
Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
  • service apache2 stop;
  • service apache2 start;

CONFIGURATION
============
Now Open Your browser, and this is your bugzilla IP.
http://<IP Of Your System>/bugzilla3

Do the following-
  • Click on Login and put in Admin credentials
    • Admin Username= Admin_Vivek@hissite.com
    • Admin Password= xyz
  • Click Administration Option
  • Click Parameter Option
  • Under Index --> Required Settings change
    • urlbase = http://<IP Of Your System>/bugzilla3
    • Change other option only if you know them
  • Under Index --> Email change
    • Choose mail_delivery_method from drop down (I used smtp)
    • Choose some mail_from entry like  Product-BUG@hissite.com
    • Choose other otions accordingly.
    •  Enable Mail Debug Option. It helps in email debugging
  • Save the changes
Now your Bugzilla is ready.
Logs are available with apache2 log.