Skip to main content

Posts

Running HTTPS - Tomcat - Ubuntu 11.04

Today my friend wanted to setup HTTPS implementation on his tomcat server. So here how we did it. Installing Tomcat on Ubuntu 11.04 ahmed@ubuntu:~$ sudo apt-get install tomcat6 ahmed@ubuntu:~$ sudo apt-get install tomcat6-admin Here is complete information on howto install tomcat on Ubuntu 11.04. https://help.ubuntu.com/11.04/serverguide/C/tomcat.html Next once we have tomcat installed here is what we need to do. Creating KeyStore File ahmed@ubuntu:~$  keytool -genkeypair -alias tomcat -keyalg RSA -keysize 1024 -dname "CN=localhost, OU=Organization, O=Company Name, L=City, S=State, C=US" -validity 365 -keystore keystore Enter keystore password: <enter a new password here> Enter key password for <tomcat>         (RETURN if same as keystore password): <just hit enter here> The password you enter in the first password prompt will be the password for the " keystore " file where your server certificate i...

Code Jam @ Saggezza, Bangalore

Passionate about Java Coding? Join the day long fun on 25th Feb 2012 at Saggezza, Bangalore Office. For details: http://www.saggezza.com/codejam .

SVN Migration - one Server to Another

Today we were migrating our Repos from One server to Another.So though to share the information. If some might need it. Attached is the document which will help you migrate SVN. Taking SVN Dump etc. Creating_and_Migrating_SVN_Repository.pdf Download this file

Proxy Transaction - Proxy Server Handshake

A Picture say a thousand words. Here is the information about, Proxy Server Handshake.

MAC for specific Adapter on Linux

Today was working on getting a unique information for a system. And MAC would be enough for my requirement. (Need not go for a UID). Below is the code to find MAC for a specific Adapter. "eth0" for my case. Only different thing here is the structure ifreq which I used for the first time. Here is the struct information. struct ifreq {     char    ifr_name[IFNAMSIZ];/* Interface name */     union {             struct sockaddr ifr_addr;             struct sockaddr ifr_dstaddr;             struct sockaddr ifr_broadaddr;             struct sockaddr ifr_netmask;             struct sockaddr ifr_hwaddr;             short   ifr_flags;             int     ifr_ifindex;             int...

PostgreSQL Setup - Configuration

My friend wanted to setup PostGreSQL with Replication. (Master / Slave Setup). So I agreed to help him out. Since I have not done anything on PostgreSQL before, so though to document it as I go. First in this blog post, I will just cover. Setting up two virtual machines (MASTER / SLAVE). Getting both the VMs to have postgreSQL 9.1 installed and configured. Information about the VM Machines Master : 172.16.167.130 Slave : 172.16.167.129 Now Lets Start. First, Lets setup VMWare setup to. Installing VMware Player on Ubuntu 11.10. Install required packages build-essential and linux-headers sudo apt-get install build-essential linux-headers-$(uname -r) Download the latest VMware player and execute below command. $ gksudo bash ~/Downloads/VMware-Player-3.1.4-385536.i386.bundle This will bring up the installer interface and you can continue after that. Note: this assumes the location of your Downloads folder is ~/Downloads. Now lets install Postg...

Open ports on UFW (uncomplicated Firewall - Ubuntu)

Open ports on UFW (uncomplicated Firewall - Ubuntu). I wanted to unblock 5432 port for a PostGre SQL setup. Here is how you do it. To check status for firewall ahmed@ahmed-work-horse:~$ sudo service ufw status ufw start/running you can also use this command to check status ahmed@ahmed-work-horse:~$ sudo ufw status Status: inactive ahmed@ahmed-work-horse:~$ sudo ufw status Status: inactive ahmed@ahmed-work-horse:~$ sudo ufw enable  Firewall is active and enabled on system startup If the status is not  stopped/waiting , you can enable it using the below command ahmed@ahmed-work-horse:~$ sudo ufw enable To open a port say 5432: ahmed@ahmed-work-horse:~$ sudo ufw allow 5432 To block/close an opened port: ahmed@ahmed-work-horse:~$ sudo ufw deny 5432 To remove a rule, use delete followed by the rule: ahmed@ahmed-work-horse:~$ sudo ufw delete deny 5432 It is also possible to allow access from specific hosts or ...