Installing Oracle 11 XE on Centos 7

  1. Download Oracle 11 XE from Oracle website here
  2. Install required tools
    yum install libaio bc flex unzip
  3. Unzip the downloaded Oracle archive
    unzip oracle-*
  4. Install Oracle
    cd Disk1
    rpm -ivh oracle-*
  5. Configure the newly installed Oracle database
    /etc/init.d/oracle-xe configure
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
    export PATH=$PATH:$ORACLE_HOME/bin
  9. export ORACLE_SID=XE
  10. Log in to SQLPlus
    sqlplus sys/sys as sysdba
  11. If you are Connected, add new user if you want. If not start the database first
  12. Add test user
    create user test identified by password;
    grant connect,resource,dba to test; //be careful for dba
  13. That’s all. Enjoy!

Installing PostgreSQL 5.6 on Centos 7

Step-by step walkthrough :

  1. Download repository RPM from :
  2. After choosing which RPM to download, at terminal :
    yum install
  3. Install the database
    yum install postgresql96-server postgresql96-contrib
  4. Initialize database
    /usr/pgsql-9.6/bin/postgresql96-setup initdb
  5. Create database user
    su - postgres
    createuser --interactive
  6. Create new database
    su - newuser
    createdb newdb
  7. Connect to newly created database
    psql -d newdb
    \conninfo //for connection information
  8. Change database user password
    \q to quit
  9. To start PostgreSQL service
    systemctl start postgresql-9.6.service
  10. To add to system startup
    systemctl enable postgresql-9.6.service
  11. To allow remote connections, edit :
    vi /var/lib/pgsql/9.6/data/postgresql.conf 
    # Change line containing listen_addresses to this :
  12. Edit pg_hba.conf file to allow all connections :
    vi /var/lib/pgsql/9.6/data/pg_hba.conf 
    # Add new line 
    host all all md5
  13. Restart the service
    systemctl restart postgresql-9.6.service
  14. That’s it. Enjoy.

Easy Internet Explorer compatibility testing using Modern.IE


I have always struggled in making my websites and web-based systems look good in Internet Explorer. To cover all versions of IE, i have to install multiple copies of Virtualbox with Windows XP installed, each with different version of IE.

I just came across this neat service called Modern.IE which is a free by Microsoft which will enable you to test your systems on various versions of Internet Explorer.

You will have the option to download VM with preinstalled Windows version of your choice on Vagrant, Virtualbox, HyperV, VPC, VMware or Parallels format! But the catch is, all VMs are only valid for 90 days only. Well, better than nothing 🙂

CentOS and RHEL iptables setting

Drop (block) Settings

Block incoming port connection
iptables -A INPUT -p tcp –destination-port 80 -j DROP

Block incoming port connection using network interface x
iptables -A INPUT -i eth1 -p tcp –destination-port 80 -j DROP

Block incoming port connection except for IP x (
iptables -A INPUT -p tcp -i eth1 -s ! –dport 80 -j DROP

Block incoming port connection except for these IPs
iptables -A INPUT -p tcp -i eth1 -s !,, --dport 80 -j DROP

Block null packets
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP
Block syn-flood packets
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
Block XMAS packets
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP

Flush all firewall rules
iptables -F

Accept Settings

Open port for port x (eg: HTTP & HTTPS)
iptables -A INPUT -p tcp -m tcp –dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp –dport 443 -j ACCEPT

Allow outgoing connection
iptables -I INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

Allow outgoing connection and block incoming (after setting other rules)
iptables -P INPUT DROP

Block DoS attack
iptables -A INPUT -p tcp –dport 80 -m limit –limit 25/minute –limit-burst 100 -j ACCEPT