Steps to speed up Eclipse

November 8, 2011 · Posted in java, linux · Comment 

I found an interesting link which helped me to speed up the eclipse loading time. Let me know if that helped you.

Access AWS with Putty

July 22, 2011 · Posted in linux · Comment 

When accessing EC2 amazon cloud, you would receive a .pem file to login to the shell. Putty does not use .pem file and you would need to convert that file to .ppk file which putty uses. In order to convert it, you would need to download puttygen.exe from the website. Run the program and follow the following steps:

  1. Click “Conversions” on the menu and select “Import key”
  2. Browse to the .pem file
  3. Click “Save private key” button
  4. You would get a warning that you are saving the key without a passphrase. Please ignore it and click “Yes”
  5. Save the .ppk file

On putty:

  1. Select the session you created and click “Load”
  2. Open “SSH->Auth” from the tree on the left
  3. Under “Private key file for authentication” browse to the recently created .ppk file
  4. Save the session and you are ready

Create self signing SSL Certificate

July 10, 2009 · Posted in apache · Comment 
  1. Generate server key
    openssl genrsa -des3 -out server.key 4096
  2. Create certificate signing request
    openssl req -new -key server.key -out server.csr
  3. Sign the certificate signing request with the server key
    openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
  4. Make the server key that does not need the password
    openssl rsa -in server.key -out server.key.insecure
  5. Do some house cleaning
    mv server.key server.key.secure
    mv server.key.insecure server.key
  6. Use the following files in apache configuration
    server.key
    server.crt

Force SSL on apache

July 10, 2009 · Posted in apache, linux · Comment 

mod rewrite should be enabled on apache. Add the following to your apache config file.

#########################################
#### XXX: BEGIN EDIT FOR MOD_REWRITE ####
#### This is intended to force HTTPS ####
#### for all inbound HTTP requests ####

####
# This module (mod_rewrite) simply tells Apache2 that all connections to
# port 80 need to go to port 443 – SSL – No exceptions
####


LoadModule rewrite_module modules/mod_rewrite.so


RewriteEngine on

####
# The line below sets the rewrite condition for mod_rewrite.so.
# That is, if the server port does not equal 443, then this condition is true
####

ReWriteCond %{SERVER_PORT} !^443$

####
# The line below is the rule, it states that if above condition is true,
# and the request can be any url, then redirect everything to https:// plus
# the original url that was requested.
####

RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

#### XXX: END EDIT FOR MOD_REWRITE ####

Linux Disable Hardware Beep Sound For Terminal

July 8, 2009 · Posted in linux · Comment 
  • If you are using xterm, open ~/.xsession file
    $ cd
    $ vi .xession
    Append the following line:
    xset b off
    Save and close the file.
  • If you are using bash shell, open ~/.inputrc file
    $ cd
    $ vi .inputrc
    Append following line:
    set bell-style none
    Save and close the file.
  • If you want to turn off beep for VIM text editor, open vim config file ~/.vimrc
    $ cd
    $ vi .vimrc
    Append following line
    set vb
    Save and close the file.

Remove .svn folders

July 8, 2009 · Posted in linux · Comment 

In order to clean up the SVN checkout, you can do

#deletes all .svn files/folders
find . -name ".svn" -exec rm -rf {} \;

OR

#deletes all .svn folders
find . -name ".svn" -type d -exec rm -rf {} \;

Delete all iptables rules

February 5, 2008 · Posted in linux · Comment 

Enter the following to delete iptables completely

# iptables -F
# iptables -t nat -F
# iptables -t mangle -F
# iptables -X

java.net.SocketException: Too many open files

January 18, 2008 · Posted in java, linux · 1 Comment 

For System Wide settings
To see the settings for maximum open files for the OS level, use following command.
cat /proc/sys/fs/file-max
This should be a value from 36000 to 50000 or more. To increase the system wide maximum open files, as root edit the /etc/sysctl.conf and add the following to the end of the file.

Note: The following example will increase the maximum number of files to 49,500 on your currently running system and will persist after rebooting.

fs.file-max = 49500

Then issue the following command to activate this change to your live system.
sysctl -p

For user level setting

Also, you should update /etc/security/limits.conf for the user.

myuser hard nofile 2048
myuser soft nofile 2048

Type this to see what it’s set at:

ulimit -a

Header files for linux (Fedora)

November 12, 2006 · Posted in linux · Comment 

Header files are provided with *-devel packages.

Installing Fedora Using a Network

September 30, 2006 · Posted in linux · Comment 

Fedora can be installed using a local network (or even over the Internet if you have broadband access). You will need access to a Web, FTP, or NFS server hosting the installation packages. To boot to a network install, use a network boot floppy, a bootable CD-ROM created using the boot.iso boot image, or the first Fedora Core CD-ROM included with this book. Boot your PC with the boot floppy or, if you use CD-ROM, type

linux askmethod

at the boot prompt. Follow the prompts, and you’ll then be asked to choose the type of network installation.

Next Page »

  • Calendar

    February 2012
    M T W T F S S
    « Jan    
     12345
    6789101112
    13141516171819
    20212223242526
    272829