Changeset 139 for nutchez-0.2/src/test/install_func.sh
- Timestamp:
- Jun 1, 2010, 2:04:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/install_func.sh
r137 r139 24 24 25 25 function set_install_information () { 26 set_nutchuser_passwd 27 read -p "Please enter Administrator's e-mail address: " Admin_email 28 read -p "Please enter the Master DNS: " MasterDNS 29 } 30 31 function set_nutchuser_passwd () { 26 32 read -p "Please enter nutchuser's password : " nutchuser_passwd 27 33 read -p "Please enter nutchuser's password again: " nutchuser_passwd_confirm 28 if [ $nutchuser_passwd != $nutchuser_passwd_confirm]29 set_ install_information34 if [ $nutchuser_passwd != $nutchuser_passwd_confirm ]; then 35 set_nutchuser_passwd 30 36 fi 31 read -p "Please enter Administrator's e-mail address: " Admin_email32 read -p "Please enter the Master DNS: " MasterDNS33 37 } 34 38 … … 41 45 read -p "Please confirm your install infomation: 1.Yes 2.No " confirm 42 46 } 47 48 function make_ssh_key () { 49 su nutchuser -c 'ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""' 50 su nutchuser -c "cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys" 51 } 52 43 53 44 54 function set_haoop-site () { … … 84 94 function format_HDFS () { 85 95 echo "format HDFS..." 86 $Nutch_HOME/bin/hadoop namenode -format96 su nutchuser -c "$Nutch_HOME/bin/hadoop namenode -format" 87 97 } 88 98 89 99 function start_up_NutchEZ (){ 90 100 echo "start up NutchEZ..." 91 $NutchE_HOME/bin/start-all.sh101 su nutchuser -c "$Nutch_HOME/bin/start-all.sh" 92 102 } 93 103 94 104 function Install_Nutch () { 95 set_hadoop-env96 105 set_haoop-site 97 106 set_nutch-site 98 107 } 99 108 100 function Install_Tomcat () { 101 # 設定nutch的搜尋引擎頁面到tomcat 102 cd $Nutch_HOME 103 mkdir web 104 cd web 105 jar -xvf ../nutch-1.0.war 106 mv $Tomcat_HOME/webapps/ROOT $Tomcat_HOME/webapps/ROOT-ori 107 cd $Nutch_HOME 108 mv $Nutch_HOME/web $Tomcat_HOME/webapps/ROOT 109 mkdir $Index_DB 109 110 function make_client_install () { 111 # 將Master_IP_Address給client 112 # 打包安裝目錄(不含tomcat) 113 # tar -czv /opt/nutchez/nutch NutchezFor_$Master_IP_Client.tar.gz 114 echo "undo... function make_client_install" 110 115 } 111 116 112 117 function start_up_tomcat () { 113 118 echo "start up tomcat..." 114 $Tomcat_HOME/bin/startup.sh 119 sleep 10s 120 echo "su nutchuser -c "$Tomcat_HOME/bin/startup.sh"" 121 su nutchuser -c "$Tomcat_HOME/bin/startup.sh" 115 122 }
Note: See TracChangeset
for help on using the changeset viewer.