S小魚仔S 網誌搜尋

2020年2月27日 星期四

S小魚仔S Ubuntu 18.04 安裝 Unifi Ac Controller ( 無線控制器 )

使用「Ubuntu」安裝「Unifi」無線控制器確實很複雜,安裝近10次都沒成功,後來找到「自動化腳本」該作者是 glennrietveld8 編寫完成。首先 Ubuntu 必須採用「root」登入操作,必須連上「Internet」因該腳本會下載安裝「mongodb」和「Oracle-java8」和「Unifi Ac Controller」。

1. 下載「unifi-5.12.35.sh」腳本

2. 如果您人剛好在「中國大陸」麻煩修改「來源庫」否則下載非常慢,甚至好幾個鐘頭。

cd /etc/apt/
cp sources.list sources.list.bak
true > sources.list

#編輯「sources.list」加入「中國大陸」來源庫
vi /etc/apt/sources.list 

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/mongodb/apt/ubuntu trusty/mongodb-org/stable multiverse



#更新「來源」庫
apt-get install

#安裝「CA」憑證 
ca-certificates wget -y

3. 執行「Script」
bash unifi-5.12.35.sh







#如果您遇到下載更新「mongodb」非常慢,請跟著下面步驟處理






前往該連結「https://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.4/multiverse/binary-amd64/」下載 ( mongodb-org-shell_3.4.24_amd64.deb、mongodb-org-server_3.4.24_amd64.deb、mongodb-org-mongos_3.4.24_amd64.deb、mongodb-org-tools_3.4.24_amd64.deb ) 版本必須一模一樣。


#接著手動安裝「mongodb」離線檔案「.deb
dpkg -i mongodb-org-shell_3.4.24_amd64.deb
dpkg -i mongodb-org-server_3.4.24_amd64.deb 
dpkg -i mongodb-org-mongos_3.4.24_amd64.deb
dpkg -i mongodb-org-tools_3.4.24_amd64.deb

#接著再次執行Script
bash unifi-5.12.35.sh

#接著我又遇問題到下載「unifi」主程序非常慢,請自行下載「https://dl.ui.com/unifi/5.12.35/unifi_sysvinit_all.deb」離線檔案,進行離線安裝
dpkg -i unifi_sysvinit_all.deb



#接著再次執行Script
bash unifi-5.12.35.sh

#這時候就會下載「unifi-update.sh」透過該腳本可以自動進行「備份」與「升級」Unifi 控制器

#看到該「畫面」就已經完成嚕

#檢查「通訊端口

#登入「Wifly」控制器「網址」 ( https://ip:8443/ ) 設定就可以嚕


參考資料
Glenn R.」-「glennr.nl/scripts
Community.ui.com」-「UniFi Installation Scripts

沒有留言: