18 | | {{{ |
19 | | ### 安裝 sun Java ### |
20 | | $ aptitude install sun-java6-jdk |
21 | | $ update-alternatives --config java |
22 | | |
23 | | ### 安裝 ant ### |
24 | | $ aptitude install ant |
25 | | |
26 | | ### 安裝 vlan, dhcp, openssl ### |
27 | | $ aptitude install vlan dhcp3-server libcurl4-openssl-dev |
28 | | |
29 | | ### EC2 tools ### |
30 | | $ wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools-1.3-26357.zip |
31 | | $ wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-30349.zip |
32 | | $ unzip ec2-ami-tools-1.3-26357.zip |
33 | | $ unzip ec2-api-tools-1.3-30349.zip |
34 | | }}} |
35 | | {{{ |
36 | | #!sh |
37 | | ### 設定環境變數 ### |
38 | | $ vim ~/.bashrc |
39 | | export JAVA_HOME=/usr/lib/jvm/java-6-sun |
40 | | export ANT_HOME=/usr/share/ant |
41 | | export EC2_HOME=/root/ec2-api-tools-1.3-30349 |
42 | | export EC2_AMITOOL_HOME=/root/ec2-ami-tools-1.3-26357 |
43 | | export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin:$EC2_HOME/bin:$EC2_AMITOOL_HOME/bin |
44 | | |
45 | | $ source ~/.bashrc |
46 | | }}} |
52 | | |
53 | | == ''__1.3 編譯 Euc__'' == |
54 | | * [http://open.eucalyptus.com/downloads 下載 Eucalyptus] -> 下載兩個檔案 (Euceucalyptus-1.5.1-src.tar.gzalyptus source) & eucalyptus-1.5.1-src-deps.tar.gz |
55 | | {{{ |
56 | | #!sh |
57 | | ### 1.解壓縮 ### |
58 | | $ su |
59 | | $ sudo tar zvxf eucalyptus-1.5.1-src.tar.gz -C ~ |
60 | | |
61 | | ### 2.設定環境變數 ### |
62 | | $ echo "export EUCALYPTUS_SRC=/root/eucalyptus-1.5.1" >> /root/.bashrc |
63 | | $ echo "export EUCALYPTUS=/opt/eucalyptus" >> /root/.bashrc |
64 | | $ source /root/.bashrc |
65 | | |
66 | | ### 3.安裝 Euc 相依的軟體 ### |
67 | | $ tar zvxf eucalyptus-1.5.1-src-deps.tar.gz -C $EUCALYPTUS_SRC |
68 | | $ mkdir -p $EUCALYPTUS/packages/ |
69 | | |
70 | | ### 3.1 Axis2 ### |
71 | | $ cd $EUCALYPTUS_SRC/eucalyptus-src-deps/ |
72 | | $ tar zxvf axis2-1.4.tgz -C $EUCALYPTUS/packages/ |
73 | | $ vim ~/.bashrc |
74 | | $ source ~/.bashrc |
75 | | |
76 | | ### 3.2 Apache(httpd) ### |
77 | | $ tar zvxf httpd-2.2.11.tar.gz |
78 | | $ cd httpd-2.2.11 |
79 | | $ CFLAGS="-DBIG_SECURITY_HOLE" ./configure --prefix=$EUCALYPTUS/packages/httpd-2.2.11 --with-included-apr |
80 | | $ make && make install |
81 | | |
82 | | ### 3.3 Axis2/C ### |
83 | | $ cd $EUCALYPTUS_SRC/eucalyptus-src-deps/ |
84 | | $ tar zvxf axis2c-src-1.5.0.tar.gz |
85 | | $ echo "export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.5.0" >> ~/.bashrc ; . ~/.bashrc |
86 | | $ cd axis2c-src-1.5.0 |
87 | | $ ./configure --with-apache2=$EUCALYPTUS/packages/httpd-2.2.11/include --prefix=$AXIS2C_HOME |
88 | | $ make && make install |
89 | | |
90 | | ### 3.4 Rampart/C ### |
91 | | $ cd $EUCALYPTUS_SRC/eucalyptus-src-deps/ |
92 | | $ echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$AXIS2C_HOME/lib" >> ~/.bashrc ; . ~/.bashrc |
93 | | $ tar zvxf rampartc-src-1.2.0.tar.gz |
94 | | $ cd rampartc-src-1.2.0 |
95 | | $ ./configure --prefix=$AXIS2C_HOME --enable-static=no --with-axis2=$AXIS2C_HOME/include/axis2-1.5.0 |
96 | | $ make ; make install |
97 | | $ vim $AXIS2C_HOME/axis2.xml |
98 | | <phase name="Security"/> |
99 | | |
100 | | ### 3.5 Libvirt ### |
101 | | $ aptitude install libxml2-dev libgnutils-dev |
102 | | $ cd $EUCALYPTUS_SRC/eucalyptus-src-deps/ |
103 | | $ tar zvxf libvirt-0.6.3.tar.gz |
104 | | $ cd libvirt-0.6.3 |
105 | | $ ./configure --prefix=$EUCALYPTUS/packages/libvirt-0.6.3 --without-storage-disk --without-storage-iscsi --without-storage-fs --without-storage-lvm --without-libvirtd --without-remote --without-lxc --without-kvm --without-qemu --without-sasl --without-openvz |
106 | | $ make ; make install |
107 | | }}} |