source:
nutchez-0.2/src/test/client_install.sh
@
128
Last change on this file since 128 was 128, checked in by rock, 15 years ago | |
---|---|
|
|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
[117] | 1 | #!/bin/bash |
[122] | 2 | # Program: |
3 | # Check root identity and change root to exectue client_install.sh | |
4 | # Author: | |
5 | # Waue, Shunfa, Rock {waue, shunfa, rock}@nchc.org.tw | |
6 | # History: | |
7 | # 2010/05/20 Rock First release | |
[117] | 8 | |
[123] | 9 | # 正式版之後,記的將不必要 read 拿掉 (trace 用的 read) |
[122] | 10 | |
11 | # 設定 functions | |
12 | . ./client_install_func.sh | |
13 | ||
[119] | 14 | # 需要master_install 設定的參數區 |
15 | Master_IP_Address="a.a.a.a"; | |
[117] | 16 | |
[119] | 17 | # 此檔自己用的參數區 |
18 | Linux_Distribution=""; | |
19 | Linux_Version=""; | |
[127] | 20 | Nutchuser_Passwd="xxxxxxxx"; |
[119] | 21 | |
22 | # 功能邏輯區 | |
23 | ||
24 | ||
25 | # 程式邏輯區 | |
26 | ||
27 | # 檢查執行這個程式的是否為root權限 | |
[117] | 28 | check_root |
[122] | 29 | read |
[117] | 30 | |
[123] | 31 | # 查出此主機的作業系統,以及版本 |
[117] | 32 | check_systemInfo |
[122] | 33 | read |
[117] | 34 | |
[119] | 35 | # 檢查之前是否有安裝NutchEz |
36 | # 目前先檢查是否有/opt/nutchez 這個資料夾即可 | |
[117] | 37 | check_nez_installed |
[122] | 38 | read |
[117] | 39 | |
[119] | 40 | # 檢查是否有安裝sun java ,並檢查是否為jdk 1.6 以上版本 |
[117] | 41 | check_sunJava |
[128] | 42 | read |
[117] | 43 | |
[119] | 44 | # 檢查是否有安裝openssh, openssh-server |
[123] | 45 | check_ssh |
46 | read | |
[117] | 47 | |
[123] | 48 | # 檢查是否有安裝dialog |
49 | check_dialog | |
50 | read | |
[117] | 51 | |
[119] | 52 | # 檢查是否安裝 php 5.5 |
[123] | 53 | check_php |
54 | read | |
[117] | 55 | |
56 | # scp nutchuser@master_ip:~ 把.ssh/目錄複製下來 | |
57 | # 當使用者輸入nutchuser 密碼時,將此密碼紀錄到Nutchuser_Passwd | |
58 | # 此步驟若無法連到 master 則跳出 | |
[128] | 59 | scp_master_nutchuser_sshkey $Master_IP_Address |
60 | read | |
[117] | 61 | |
62 | # 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼 | |
[128] | 63 | creat_nutchuser_account $Nutchuser_Passwd |
64 | read | |
[117] | 65 | |
66 | # 用scp 複製 master 的設定與安裝資料 | |
[119] | 67 | # 目前僅需做到能無礙的複製遠端的/opt/nutchez/到local的/opt/ |
[128] | 68 | scp_packages $Master_IP_Address |
69 | read | |
[117] | 70 | |
[119] | 71 | # 安裝 |
[122] | 72 | #install_packages |
[117] | 73 |
Note: See TracBrowser
for help on using the repository browser.