myPLC 安装攻略

PlanetLab是什麼?

PlanetLab(互联网计划)是:一个开放的、针对下一代互联网及其"雏形"应用和服务进行开发和测试的全球性平台,是一种计算服务"覆盖网络"(Overlay),也是开发全新互联网技术的开放式全球性测试平台 。要想用这个平台则必须要搭建这个平台所需要的环境。今天我试了一下,发现整个过程还算顺利,就是有一些问题还没有解决。

为了安装和使用myPLC,首先需要安装“Fedora core 8”或者“CentOS 5”,而我选择了CentOS 5.5来做实验。

OK,let me tell you how to build and install the myplc!

When you boot the machine, you should be running the VServerKernel:
[root@lorne]# cat /proc/version Linux version2.6.22.19-vs2.3.0.34.1 (mockbuild@x86.builders.hozac.com) (gccversion 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP Mon Mar 17 05:32:04EDT 2010


Install the packages you need:
[root@lorne]# yum installsubversion httpd createrepo qemu bridge-utils emacs ntp
[root@lorne]# chkconfig ntpd on


Checkout Planetlab build:
[root@lorne]# cd
[root@lorne]#svn co http://svn.planet-lab.org/svn/build/trunk svn-build


Mirror Fedora (this will take a while to run):
[root@lorne]#cd ~/svn-build
[root@lorne]# ./vbuild-fedora-mirror.sh -f f8 -ursync://archive.kernel.org/fedora-archive


Install apache:
[root@lorne]# sudo yum install httpdmod_ssl
[root@lorne]# /etc/init.d/httpd start
[root@lorne ~]#cd /var/www/html/
[root@lorne html]# ln -s /mirror ./mirror


Tweak yum
[root@lorne]# cd ~/svn-build/mirroring
[root@lorne]# ./mirror.sh -a
[root@lorne]# ./mirror.sh -a -ff8 init


[root@lorne]# cd /etc/vservers/.distributions/f8
[root@lorne]# find . -name '*.repo' | xargs sed -i-e s,gpgcheck=1,gpgcheck=0,g
[root@lorne]# find . -name '*.repo'| xargs grep gpgcheck


Create the vserver:
[root@lorne]# cd ~/svn-build
[root@lorne]# ./vtest-init-vserver.sh -v -f f8 -p linux32vplc-4.3 http://build.onelab.eu/onelab/2009.06.02--1l-f8-32/RPMS/ ----netdev eth0 --interface 128.122.140.178 --hostname oz.cs.nyu.edu


Enter the vserver:
[root@lorne]# vserver vplc-4.3 enter
[vplc-4.3] # yum -y install myplc
[vplc-4.3] # exit
[root@lorne]# /etc/init.d/httpd stop
[root@lorne]# vservervplc-4.3 enter
[vplc-4.3] # service plc start
[vplc-4.3] #service plc stop
[vplc-4.3] # chkconfig plc on
[vplc-4.3] #plc-config-tty
# Seehttps://svn.planet-lab.org/wiki/MyPLCUserGuide
[vplc-4.3] # service plc start
exit

Persist the vserver:
[root@lorne]# chkconfig vservers-defaulton
[root@lorne]# echo default >/etc/vservers/vplc-4.3/apps/init/mark
[root@lorne]# servicevservers-default start


Goto a terminal.


#df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/disk0s2 149Gi 73Gi 75Gi 50% /
devfs 107Ki 107Ki 0Bi 100%/dev
fdesc 1.0Ki 1.0Ki 0Bi 100% /dev
map -hosts 0Bi 0Bi 0Bi100% /net
map auto_home 0Bi 0Bi 0Bi 100% /home
/dev/disk1s17.5Gi 464Ki 7.5Gi 1% /Volumes/UNTITLED 1


# diskutilumount /dev/disk1s1
# ddif=nakika2.cs.nyu.edu-i386-4.2-partition.usb of=/dev/disk1

Note here that when I run "dd", I target the USB drivedirectly, using "/dev/disk1", not "/dev/disk1s1".

see plnotes section 3.

NOTE: Possible problem - If the machine boots, but says that theboot is incomplete, it might be the time of the BIOS. The planet labsoftware requires that the BIOS time be set to the current UTC time.

I was able to change the time by pressing F9 when the machinestarts, then selecting "Date and Time" in the menu.  

---------------------------

In all. thats the process of how to install and fix the myPlc. But to me I stop at the "Create the vserver"step.

在不能Create the vserver时,我结合自己的经验和网上查找的资料,我发现应该是我用的是内网IP地址而不是公网IP地址导致。还好,再过几天,我的服务器就

到了,到时就有公网IP和服务器让我去测试了。

 

 

posted @ 2010-10-29 15:09  梁智强  阅读(925)  评论(0编辑  收藏  举报