2018年2月25日 星期日

Ubuntu install webmin 測試機安裝

1.install Ubuntu
2.select OpenSSH Server and Samba file server
3.關閉Selinux,理論上安裝Ubuntu後Selinux是沒有開啟的,可以先看
   修改 /etc/selinux/config 設定檔 中的 SELINUX=disabled
   重開機
4.增加Root登入,理論上安裝Ubuntu root帳號是沒有開啟的,可以
   1.使用隨便一個帳號登入,然後開啟終端機
   2.輸入 sudo passwd root
   3.輸入一次你個管理帳號
   4.設定全新的root帳號
   5.再輸入一次
   6.改密完成
   7.exit跳出後更換使用者為root
5.關閉防火牆,理論上安裝Ubuntu防火牆是沒有開啟的,可以移除(建議不要)
   sudo apt-get remove iptables
6.SSH遠端安全連線,Ubuntu安裝時要安裝OpenSSH Server ,修改
   sudo vi /etc/ssh/sshd_config找PermitRootLogin 修改成Yes,重新開機,root帳號可以用遠端SSH登入,
7.安裝webmin
   1.  vi /etc/apt/sources.list在最後增加2行存檔
        deb http://download.webmin.com/download/repository sarge contrib
        deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
   2.install the GPG key
      cd /root
      wget http://www.webmin.com/jcameron-key.asc
      apt-key add jcameron-key.asc
   3.Install webmin
      apt-get update
      apt-get install webmin
   4.安裝後開啟瀏覽器打https://server_ip_address:10000
8.在執行apt-get update出現tw.archive.ubuntu.com...error,修改/etc/apt/sources.list,將其中的
   hk.archive.ubuntu.com替換成cn.archive.ubuntu.com
   
   sudo vim /etc/apt/sources.list
   :%s/hk.archive/cn.archive/g