【转】查询CentOS查看系统内核版本,系统版本 suny

1. 查看centos内核的版本:
1)
[root@localhost ~]# cat /proc/version
Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010
2)
[root@localhost ~]# uname -a
...

CentOS 防火墙 开放80端口 suny

开放端口:
[root@WX32 ~]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT

保存配置:
[root@WX32 ~]# service iptables save
Saving firewall rules to /etc/sysconfig/iptables:          [  OK  ]

重启防火墙:
[root@WX32 ~]# service iptables restart
Flushing firewall rules:                                   [  OK  ]
...

CentOS 删除自带的OpenJDK 和 安装SunJDK suny

卸载OpenJDK:
[root@WX32 local]# java -version
java version "1.6.0"
OpenJDK  Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)

[root@WX32 local]# rpm -qa | grep java
java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
...