Following is some problems faced while installing.
Note that the following things should be install as a "Base System" that can be cloned to make new VM.
- Java Environment
- Jade Environment
- Hadoop Enviornment
Note that Hadoop setup procedure is not written in this article.
1. Install Ubuntu 10.04 (lucid) on Xen
1.1 Create a VM Image on Xen
1.2 Install Ubuntu 10.04 via Internet or from an ISO. The link is like following
Note that Xen introduce the "Template" that you can easily create new VM. If you choose Ubuntu 10.04's template, it will automatically install Ubuntu 10.04 from Internet.
1.3 Install Xen-tools via the following command
sudo mount /dev/xvdd /mnt
sudo /mnt/Linux/install.sh
sudo reboot
sudo /mnt/Linux/install.sh
sudo reboot
2. Install Java Virtual Machine
Lots of Java VM is available, such as sun-java, openJDK. Different version has different effect to your machine. Choosing wrong type and/or version may cause unexpected result. For example, "HadoopJavaVersions - Hadoop Wiki" suggest that using sun-java with version 1.6+, openJDK may facing some bugs while compiling the code. Luckily we will not need to compile the code of hadoop. Besides, sun-java6 is not available from Ubuntu's archive. So I decided to use openJDK. OpenJDK can be install via following command.
sudo apt-get install openjdk-6-jre openjdk-6-jdk
3. Setup Environment
That is, Jade environment will be here. Luckily, my previous VM is still available. All I needed to do is copying them to the newly setup VM.4. Export and Copy VM
Copy VM via XenCenter. So that I can have as many VM as I want.Note: Exporting takes 11:56, while Importing takes 3:45
5. Setup newly imported VM
5.1 Setup hostname
5.2 Setup IP Address
5.3 Setup localhost in Hosts
echo -e " <your ip> \tlocalhost" >> /etc/hosts
5.4 Reboot
5.5 Setup start up service
Copy the script to the right place.
sudo cp <your script> /etc/init.d
Adding script to the start up service.
sudo update-rc.d <your script> defaults
Removing script from the start up service.
sudo update-rc.d -f remove <your script>
沒有留言:
張貼留言