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?

?Linode/Ubuntu???Webmin/Virtualmin

webmin???????????????????? ?ftp?mysql??????????????????????web os???????linode???webmin / Virtualmin?Virtualmin?webmin????????????????
1. ???????????
wget http://software.virtualmin.com/gpl/scripts/install.sh;chmod +x install.sh;./install.sh;apt-get clean;apt-get update;apt-get install php5-curl;

 

2. ??????????????linode?????????????????10~20?????????????
https://your domain or your ip:10000
???????SSL?????????????SSL???“??”????“??”?????????
3. ???????????root??????????????????webmin????????????????????next?????????mysql?root????????)

?Linode VPS Ubuntu???PPTP VPN

??????????VPS????Getting Started With Linode??????????????????VPN?????????????????????/etc/apt/sources.list?????”##universe repositories”??????????????????????????????sudo???root?????????????????

## main & restricted repositories 
deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted 
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted 
deb http://security.ubuntu.com/ubuntu karmic-security main restricted 
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted
## universe repositories 
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe 
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe 
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe 
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe 
deb http://security.ubuntu.com/ubuntu karmic-security universe 
deb-src http://security.ubuntu.com/ubuntu karmic-security universe

??????????????????

apt-get update

??????????VPN Server????????pptp(VPN ?????),???????????????????????

apt-get install pptpd

pptpd????????/etc/pptpd.conf?????????????????????(??????).??????ip??????

localip 192.168.7.1
remoteip 192.168.0.2-254

???/etc/ppp/chap-secrets?????VPN??????????,???????

username pptpd password *

?????????VPN???????????????????DNS. ??/etc/ppp/options???ms-dns????????DNS.???????Google ?????Public DNS,????????

ms-dns 8.8.8.8
ms-dns 209.244.0.3
ms-dns 208.67.222.222
ms-dns 8.8.4.4

??/etc/sysctl.conf?????”net.ipv4.ip_forward=1″????????????

net.ipv4.ip_forward=1

?????????????

sysctl -p

??pptpd??

/etc/init.d/pptpd restart

????iptables??

/sbin/iptables -t nat -A POSTROUTING -s 192.168.7.0/255.255.255.0 -j SNAT --to-source `ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk 'NR==1 { print $1}'`

OK,?????