Wednesday, March 28, 2012

Boot Linux Grub in single user mode

Boot Linux Grub Into Single User Mode

Procedure: Boot Linux Grub Boot Loader into single user mode

(1) At grub boot screen (after restart)
(2) Select the kernel
(3) Press the e key to edit the entry
(4) Select second line (the line starting with the word kernel)
(5) Press the e key to edit kernel entry so that you can append single user mode
(6) Append the letter S (or word Single) to the end of the (kernel) line
(7) Press ENTER key
(8) Now press the b key to boot the Linux kernel into single user mode
(9) When prompted give root password and you be allowed to login into single user mode.

Tuesday, March 27, 2012

Thunderbird email database

Where are the Thunderbird email databases stored? 


Thunderbird stores email databases in the profile folder which, in Windows, is located in the
 %USERPROFILE%\Application Data\Thunderbird\Profiles\XXXXXXXX.default\Mail\
  • Refer to the system tips for a description of %USERPROFILE% thing; you will also need to adjust Windows Explorer settings to show hidden objects - the Application Data folder is hidden from view with the default system settings.
  • XXXXXXXX.default - here X any letter or number.
Inside this profile folder you should find a subfolder for each your mail accounts and another one for "Local Folders". Each of those contains a bunch of files with the names matching your Thunderbird folder names.

Profile folders default to a standard location but are named randomly for additional security. Or you can set a custom location using Other methods of finding a profile below.
The installation directory includes a folder named "profile" (for example, C:\Program Files\Mozilla Thunderbird\defaults\profile on Windows), but this folder contains program defaults, not your user profile data. On Windows 2000/XP/Vista and on Linux, the folder containing your user profile data is hidden by default and you will need to show hidden files and folders to navigate to the profile folder. 

The easiest way to find your profile is to click on the "Open Containing Folder" button in Help -> Troubleshooting Information. That launches windows explorer (or the equivalent file manager for your operating system) with the profile folder selected. That feature was added in Thunderbird 5.0.

Windows 2000 and XP

Image:Appdata.png
  1. Choose Start → Run
  2. Type in %APPDATA%
  3. Press OK. A Windows Explorer window will appear.
  4. In the Windows Explorer window, choose Thunderbird → Profiles. Each folder in this folder is a profile on your computer.
You can also navigate directly to your profile folder at the following path:
  • C:\Documents and Settings\<Windows user name>\Application Data\Thunderbird\Profiles\<Profile name>
The Application Data folder is a hidden folder; to show hidden folders, open Windows Explorer and choose "Tools → Folder Options → View (tab) → Show hidden files and folders".

Windows Vista and 7

Image:VistaStartMenu.png
  1. Open the Windows Start menu
  2. In the the "Start Search" box, type in %APPDATA% [1]
  3. Click the "Roaming" item that appears on the menu.
  4. In the Windows Explorer window that opens, choose Thunderbird → Profiles. Each folder in this folder is a profile on your computer.
You can also navigate directly to your profile folder at the following path:
  • C:\Users\<Windows user name>\AppData\Roaming\Thunderbird\Profiles\<Profile name>\
The AppData folder is folder is a hidden folder; to show hidden folders, open a Windows Explorer window and choose "Organize → Folder and Search Options → Folder Options → View (tab) → Show hidden files and folders".

Linux and Unix

Profile folders are located here:
  • ~/.thunderbird/<Profile name>/
However, if you're using a third party build from Debian or Ubuntu, those builds store your profile folder here:
  • ~/.mozilla-thunderbird<Profile name>.
Both are hidden folders. See this article for more information. To show hidden files in Nautilus (Gnome desktop's default file browser), choose "View -> Show Hidden Files".

Mac OS X

Profile folders are in one of these locations:
  • ~/Library/Thunderbird/Profiles/<Profile name>/
  • ~/Library/Application Support/Thunderbird/Profiles/<Profile name>/
The tilde character (~) refers to the current user's Home folder, so ~/Library is the /Macintosh HD/Users/<username>/Library folder.

Monday, March 26, 2012

How to Change the SSH Port in CentOS

By Default CentOS uses SSH Port Number 22 for security reasons it is recommended to change the Port Number:

Procedure : 

1.You need to open SSHD config file using nano.
2.Thats your SSHD config file. On that there will be line called
3.Restart SSH daemon to apply changes in running configuration
nano /etc/ssh/sshd_config
You will see the port number is commented by default that shows it is 22 by default
#Port 22
So
You just need to uncomment #Port 22 and replace 22 with some other number like 2020 etc.
Port 2020 
Now your SSH port is 2020
You can change the number 22 to whatever port that you like. After you done hit Ctrl+O key on keyboard to write the chnages in to the file and then Ctrl+X to exit the text editor.
Next time when you will try to connect to your linux server via ssh client. then you must use new port number instead of default 22.

On CentOS run
service sshd restart
On debian or Ubuntu run
restart ssh
Then you will be immediately logged out from current SSH session because port changed.

Sunday, March 25, 2012

Installation & Configuration of Cisco ASDM on GNS3


Installation & Configuration of Cisco ASDM on GNS3

Step - 1

Prerequisites:

Download initrd & kernel files for ASA from this link
https://rapidshare.com/files/1456709229/ASA_IOS.rar
Download TFTP Server from this link
http://www.solarwinds.com/products/freetools/free_tftp_server.aspx
Download Cisco ASA ASDM Image file from this Link
https://rapidshare.com/files/2013423636/asdm-602.bin
Download GNS3 from GNS3 Website
http://www.gns3.net/

Step - 2

Installation:
Install GNS3 on your system
Install TFTP server on your system

Step - 3

Configuration:
Open GNS3 from shortcut on your desktop
Go to Edit => Preferences..


Go to Qemu and Click on Test.
To verify either Qemu is working successfully.



Now Go to ASA Tab showing in Preferences
Now Enter the Name for ASA in Identifier Name
Set the Memory to 512
Add the initrd and kernel files in ASA Specific Settings from the path where the files were downloaded


Click on Save button and press OK


Now come in Node Types and drag ASA Firewall 


Click on Start Button to turn the Firewall ON
You will see the following screen 

Note : Do not close this black screen. Minimize this black window and let it to run in background.


Now right click on ASA Firewall and open the Console.


Now Type this script on this screen 
cd /mnt/disk0
/mnt/disk0/lina_monitor
and press enter. your firewall will be start and enjoy.



Note :
 You must reboot the firewall manually by before copying the Cisco ASDM on this other wise you may get the error of "No Memory Space".
So after rebooting your firewall 
Start the TFTP server installed on your machine.


Go to File ==> Configure to select the path of the directory where the ASDM Image is placed. In our case this ASDM image is placed on my Desktop


So, Click on Browse button the select the path. like this.





How Configure Atlassian JIRA On Linux Centos




JIRA sits at the center of your development team, connecting the people and the work being done. Track bugs and tasks, link issues to related source code, plan agile development, monitor activity, report on project status, and more.

Before installing JIRA on centos we need to install JAVA on it.


1. Install JAVA

JIRA Is an application written entirely in JAVA, and requires Javas JDK. Make sure you install JDK Update 20 if you want to use the JIRA Labels plugin. At the time of writing this, Labels has an issue with the latest version of java’s JDK which is JDK 6 Update 21. Proof: See this bug report.
Use wget to download JAVA directly to the server. I had to host the BIN’s on my server because Sun’s website uses session’s to store unique download URL’s. I could not locate a permanent links to the RPM’s on their site. If you (don’t trust me) and want to download directly from SUN, click here, then select JDK/JRE -6 “6 Update 20″:
64bit:

 wget http://www.iainlbc.com/jdk-6u20-linux-x64-rpm.bin

or the 32bit version:
 
 wget http://www.iainlbc.com/jdk-6u20-linux-i586-rpm.bin

Make the RPM Executable:
 
chmod +x jdk-6u21-linux-i586-rpm.bin

Install it!
 
./jdk-6u21-linux-i586-rpm.bin

Set JAVA_HOME:
 
nano ~/.bash_profile

Add the following line:
 
export JAVA_HOME=/usr/java/jdk1.6.0_20

Run the following command (to set the variable for your current SSH Session):
 
export JAVA_HOME=/usr/java/jdk1.6.0_20

Test the new variable:
 
echo $JAVA_HOME

2. Install JIRA

Download the JIRA Standalone TAR (.GZ) file here.
 
cd ~
wget http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-enterprise-4.2-standalone.tar.gz

Unzip the downloaded file.
 
tar xzvf atlassian-jira-enterprise-4.1.2-standalone.tar.gz

Create JIRA Installation/Home Directory
 
mkdir /opt/jira

Copy Extracted files to JIRA’s Installation Directory (-R is for recursive)
 
cp -R atlassian-jira-enterprise-4.1.2-standalone/* /opt/jira/

Lets create a directory for JIRA to store attachments, indexes, and other stuff’s:
 
mkdir /opt/jira/home

Now, we need to set the JIRA HOME property:
 
nano /opt/jira/atlassian-jira/WEB-INF/classes/jira-application.properties

Change the existing line (or a add new)
 
jira.home =

to
 
jira.home = /opt/jira/home

Almost done, we need to open up port 8080 in your local firewall (IPTABLES), or we won’t be able to hit JIRA from our browser:
 
nano /etc/sysconfig/iptables

Change this line:
 
-A RH-Firewall-1-INPUT -j REJECT --reject with icmp-host-prohibited

To include an additional line above it for 8080 traffic, like so:
 
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject with icmp-host-prohibited

Restore your new IPTABLES Rules:
 
/sbin/iptables-restore < /etc/sysconfig/iptables

Save them!:
 
service iptables save

Launch JIRA:
 
cd /opt/jira/bin 
./startup.sh

After launching, JIRA should spit out several things in command line, one should be our previously set JAVA_HOME path, if you do not see JAVA_HOME=/usr/java/jdk1.6.0_20 JIRA will not work.
Tail the logs to look for errors:
 
tail -f ../logs/catalina.out

Access JIRA in your browser:
 
http://<server-ip-address>:8080

 

Other:

If you cannot access JIRA (and there no complaints in the catalina.out log), you may need to open port 8080 on your physical firewall or add it to your local iptables. To see if port 8080 is in your iptables run:
/sbin/iptables -L
To change the port, you can do so easily by editing the /opt/jira/conf/server.xml file – Instructions here
If you want JIRA accessible on port 80 with the ability to host more websites than just JIRA on this server, you should use Apache as a Proxy. A tutorial on this is comming soon, for now check out JIRA’s docs on integrating apache.
If you run into any startup problems please paste your /opt/jira/logs/catalina.out log on this page, I’m happy to help.
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------

Example

Installing JIRA on CENTOS Step By Step

LinuxServer#
create a directory in home directory named "jira_server"
LinuxServer#mkdir /home/jira_server