Centos Minimal????

?VMWare?VirtualBox???Centos Minimal??????????????????????????????????????????

????????

1. ?????
#ifconfig eth0 up;dhclient eth0

2. ?????????????
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
?????????????????????????
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=dhcp

3. ???????
#vi /etc/sysconfig/network
?????
NETWORKING=yes
HOSTNAME=namenode
?????

4. ???????????????????
#yum install vim wget zip unzip man gcc make setuptool

5. ???????????
# vi /etc/hosts
192.168.14.100 namenode
?????

6. ??SELINUX?
#vi /etc/selinux/config
??SELINUX=disabled??????

7. ??????
#/sbin/service iptables stop
???????
#chkconfig –level 35 iptables off

8. ??SSH?????
#ssh-keygen -t rsa
???????

9. ????????root?authorized_keys????????ssh??????
#cd /root/.ssh
#cat id_rsa.pub > authorized_keys
????????
#ssh namenode
??????????????????id_rsa.pub?????authorized_keys????
#scp ~/.ssh/id_rsa.pub root@192.168.0.10:~/.ssh/authorized_keys

10. ??JDK?
?????32???linux??????????????/usr/java????
???????????
#yum install java-1.6.0-openjdk
#yum install java-1.6.0-openjdk-devel
?????????/etc/profile???
#vi /etc/profile
??????? JAVA_HOME ???????????????????jdk???????
export JAVA_HOME=/usr/java/jdk1.6.0_31
export JRE_HOME=/usr/java/jdk1.6.0_31/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
??yum install???????
export JAVA_HOME=”/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64″
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
??????????
#source /etc/profile

11. ????????????????????
#reboot

??????????

1. ?????????
@for SERVICES in abrtd acpid auditd avahi-daemon cpuspeed haldaemon mdmonitor messagebus udev-post; do chkconfig ${SERVICES} off; done

2. ???????
@useradd ???
@passwd ???

3. vi???????
:wq

4. vi????????
:q!

5. ???root???
#su – root

6. ?jdk?????????
#chmod u+x jdk_*.bin

7. ???jdk??????
#java -version

???????
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-multi-node-cluster/
http://www.michael-noll.com/tutorials/writing-an-hadoop-mapreduce-program-in-python/
http://hadoop.apache.org/common/docs/current/cluster_setup.html

Ubuntu ??? OpenJDK ?????Tomcat

1. ?? OpenJDK

sudo apt-get install openjdk-6-jre

2. ????????

java -version

#????
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

3. ?? JAVA_HOME ????

? ~/.bashrc ???????

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

4. ????? Tomcat

wget http://apache.tradebit.com/pub/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz
tar xvzf apache-tomcat-6.0.32.tar.gz
sudo mv apache-tomcat-6.0.32 /usr/local/tomcat
sudo chmod -R 755 /usr/local/tomcat

5. ? Tomcat ??????????

sudo nano /etc/init.d/tomcat

?????

# Tomcat server auto-start script

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0

6. ???????

sudo chmod 755 /etc/init.d/tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat

7. ?? Tomcat

sh /usr/local/tomcat/bin/startup.sh

?????

Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar

8. ?? Tomcat

sh /usr/local/tomcat/bin/shutdown.sh

????????? sun-java-jdk ??? OpenJDK?