CentOS 6.3 服务器安装配置

1.下载CentOS并安装
CentOS-6.3-x86_64-minimal.iso
http://centos.arcticnetwork.ca/6.3/isos/x86_64/CentOS-6.3-x86_64-minimal.iso

2.IP配置

vi /etc/sysconfig/network-scripts/ifcfg-em1 

DEVICE="em1"
BOOTPROTO="static"
HWADDR="***"
NM_CONTROLLED="yes"
IPADDR=192.168.1.80
NETMASK=255.255.255.0
linuxidc=192.168.1.1
BROADCAST=192.168.1.255
DNS1=211.98.2.4
DNS2=211.98.4.1
ONBOOT="yes"
TYPE="Ethernet"
UUid="***"

3.Development Libraries And Development Tools
shell执行以下两条命令:

yum groupinstall "Development Libraries"

yum groupinstall "Development Tools"

4.下载、安装JDK
-我选择的版本是jdk-6u37-linux-x64.bin
http://download.oracle.com/otn-pub/java/jdk/6u37-b06/jdk-6u37-linux-x64.bin?AuthParam=1354695286_79ec0310b842ca7a97de733469f45b99

-下载后拷贝到/usr/local 目录下(不是非得这个目录)

-修改权限

[root@linuxidc local]# ls -l jdk-6u37-linux-x64.bin
-rw-r--r--. 1 root root 72048548 12月  5 16:20 jdk-6u37-linux-x64.bin

-安装

[root@linuxidc local]# ./jdk-6u37-linux-x64.bin

可以看到多了jdk的目录了

[root@linuxidc local]# ls
bin  etc  games  include  jdk1.6.0_37  jdk-6u37-linux-x64.bin  lib  lib64  libexec  sbin  share  src

-配置

[root@linuxidc ~]# vi /etc/profile

在 export 命令之前添加 JDK 的配置信息

export JAVA_HOME=/usr/local/jdk1.6.0_37
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

执行以下命令使改动生效:

[root@linuxidc ~]# source /etc/profile

验证一下:

iptables -I INPUT -i em1 -p tcp --dport 10001 -j ACCEPT
iptables  -I OUTPUT -o em1 -p tcp --sport 10001 -j ACCEPT
/etc/rc.d/init.d/iptables save

相关推荐