Posts

Showing posts from April, 2009

Redhat / CentOS / Fedora Linux Open port using ip table

Image
By default iptables firewall stores its configuration at /etc/sysconfig/iptables file. You need to edit this file and add rules to open port number. This file only avilable under Red Hat Enterprise Linux 3 / 4 / 5 and above => Old Red hat Linux version => CentOS 4 and above => Fedora Linux We will use port 80 as example. Open port 80 Open flle /etc/sysconfig/iptables: # vi /etc/sysconfig/iptables Append rule as follows: -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT Save and close the file. Restart iptables: # /etc/init.d/iptables restart Restart iptables service Type the following command: # service iptables restart Verify that port is open Run following command: netstat -tulpn | less Make sure iptables is allowing port 80 connections: iptables -L -n Refer to iptables man page for more information about iptables usage and syntax: man iptables Referenced from : http://www.cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables/

Excel VBA - Value vs Text

Image
Value vs Text Sheets(1).Cells(6, 3). Value will give the raw value in the cell. Sheets(1).Cells(6, 3). Text will give what you see in the cell .

Best PHP Framework: Yii vs CodeIgniter vs CakePHP

Yii - http://www.yiiframework.com/performance/ CodeIgniter - http://codeigniter.com/ CakePHP - http://cakephp.org/

Upgrading to tomcat 6 and JRE1.6 in Centos 5

Image
First we have to download the latest jre binary from http://java.sun.com/javase/downloads/index.jsp choose Java SE Runtime Environment (JRE) Update xx then select platform, please select linux or linux x64 depending on your centos version you ‘ve install in your machine. then select [ jre-xxx-linux-xxx.bin] please do not select the rpm one. to download: [server]# wget http://xxxxx.jre-xxx-linux-xxx.bin we have to allow the file to be execute using [server]# chmod +x jre-xxx-linux-xxx.bin then extract it using : [server]# ./ jre-xxx-linux-xxx.bin in the screen appear EULA just press spacebar ’till it ask yes or no, just type yes then move the extracted folder to /usr/lib/jre1.6.0_xx [server]# mv jre1.6.0_xx /usr/lib/ then link it to jre directory so u wont have to recreate JAVA_HOME path if u want to upgrade jre later [server]# ln -s /usr/lib/jre1.6.0_xx /usr/lib/jre define Java home to that path [server]# export JAVA_HOME=/usr/lib/jre java instalation done then we have to down