1 / 25

FreeBSD 安裝設定 ( 下 )

FreeBSD 安裝設定 ( 下 ). 校園網路策進會 副會長 林偉傑. FreeBSD 的目錄構造 (1). / unix 系統的根目錄 , 根目錄下再分成一堆子目錄 分割區有時就掛在某個子目錄下 。 /bin/ 開機必備的一般使用者指令 /compt/ 其他 OS 二進位碼相容所需的函式庫 , 像是 /compt/linux/. FreeBSD 的目錄構造 (2). /dev/ 裝置節點檔 device node, /dev/MAKEDEV 是產生這些節點檔的工具程式 。 /etc/

Download Presentation

FreeBSD 安裝設定 ( 下 )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FreeBSD 安裝設定(下) 校園網路策進會 副會長 林偉傑

  2. FreeBSD的目錄構造(1) • / unix系統的根目錄,根目錄下再分成一堆子目錄 分割區有時就掛在某個子目錄下。 • /bin/ 開機必備的一般使用者指令 • /compt/ 其他OS二進位碼相容所需的函式庫,像是 /compt/linux/

  3. FreeBSD的目錄構造(2) • /dev/ 裝置節點檔device node, /dev/MAKEDEV是產生這些節點檔的工具程式。 • /etc/ 系統設定檔以及script檔案,使用者密碼檔, 群組檔等等,可說是超級重要的目錄。

  4. FreeBSD的目錄構造(3) • /sbin/ 系統程式以及管理指令 • /stand/ 安裝磁片上的指令 • /tmp/ 系統暫存檔

  5. FreeBSD的目錄構造(4) • /usr/ 包含了大部分的使用者指令及應用程式。 • /usr/bin/ 一般的使用者指令,程式編譯器,應用軟體 • /usr/local/ 非freebsd內附的應用軟體,設定檔,資料庫 都放在這裡。

  6. FreeBSD的目錄構造(5) • /usr/ports/ freebsd ports 移植軟體的原始程式目錄。 • /usr/sbin/ 使用者可直接執行的系統服務程式。 • /usr/share/ 系統軟體的資料庫。

  7. FreeBSD的目錄構造(6) • /var/ 系統紀錄檔、 系統暫存檔、 輸出緩衝區 • /var/mail/ 使用者信件暫存區 • /var/log/ 系統紀錄檔

  8. rc.conf 的設定 /etc/rc.conf 系統的主要設定檔案,包含了基本的 網路設定、網路服務設定、 NIS服務設定、 路由Routing設定、Console設定以及一些 其他的設定。

  9. 網路設定(1) hostname=“dns.his.ccu.edu.tw” 建議使用完整的 DNS hostname。 nidomainname=“NO” 如果要當 NIS/YP client 才需要設定. firewall=“NO” 設定檔(/etc/rc.firewall)

  10. 網路設定(2) ifconfig_fxp0="inet 140.123.41.133 netmask 255.255.255.0" defaultrouter="140.123.41.250" IP alias設定 ifconfig_fxp0_alias0(第一個IP alias) ifconfig_fxp0_alias1(第二個IP alias) 以下以此類推

  11. 網路服務設定(1) inetd_enable="YES" inetd 是 Internet Super Server的意思, 幾乎所有的網路服務都是在/etc/inetd.conf定義 由inetd呼叫執行,可說是必備的檔案. sendmail_enable="YES" 啟動寄信與收信的服務

  12. 網路服務設定(2) sshd_enable="YES" ssh 是一種加密的遠端介面服務,避免使用者帳號 或密碼在網路上被人截取。 named_enable="YES" 啟動DNS的服務。

  13. /etc下的檔案介紹 /etc下面的檔案包含了各種系統的設定( Mail 、 DNS 、 Firewall..etc),使用者密碼、網 路設定,最好可以定時備份以策安全。

  14. /etc下的檔案介紹(2) • aliases、aliases.db 這個檔案是利用虛擬的帳號轉寄到實際 的帳號上。 • root:root , advicer,u881x@ccu.edu.tw (用逗號分隔,修改過後要執行 /usr/bin/newaliases更新 aliases.db)

  15. /etc下的檔案介紹(3) • crontab (主要用來定期執行一些系統維護指令) • 檔案格式 #minutes hours day month wday who command */5 * * * * bbsadm rm /bbs/tmp

  16. /etc下的檔案介紹(4) • csh.cshrc、 csh.login、 csh.logout 當shell 是 csh or tcsh的時候會先讀取 /etc/csh.*的設定。

  17. /etc下的檔案介紹(5) • fstab # Device Mountpoint FStype Options Dump Pass# /dev/sd1a / ufs rw 1 1 Device大約有三種來源,最常見的就是device node,虛擬檔案系統, 其他機器的NFS。 Mountpoint 就是把來源掛到哪個目錄去。 Fstype是檔案系統的格式(有DOS, ufs…etc)。 Options是檔案系統的參數。 Dump為0或1的數字,使用dump指令做為是否備份的依據。 Pass為0或1或2的數字,為系統crash後檢查順序的依據。

  18. /etc下的檔案介紹(6) • ftpusers 在這個檔案下所列出的username都禁止直接 Ftp登入。(如 root,toor,news) • hosts #IP hostname aliases 定義許多機器的IP 和 hostname,可以把常用機 器的別名寫在這,DNS的查詢速度會比較快。

  19. /etc下的檔案介紹(7) • hosts.allow、hosts.deny 控制可連線的機器 • login.access 控制使用者登入的來源

  20. /etc下的檔案介紹(8) • master.passwd、passwd、pwd.db、 spwd.db 這是使用者密碼檔,master.passwd有使 用者真正的密碼,只有root才可以讀取。

  21. /etc下的檔案介紹(9) • namedb/ named daemon的資料庫, 這台機器是Name server才需要設定裡面的資料。 可參考 OREILLY出版的 DNS and BIND一書,或是期 待下學期CNA超級顧問jonce的DNS課程。

  22. /etc下的檔案介紹(10) • resolv.conf 設定DNS resolv的檔案 domain 設定網域名稱 ex. domain dorm.ccu.edu.tw nameserver 設定name server名稱 ex. nameserver 140.123.1.2 search 設定網域搜尋順序 ex. ccu.edu.tw dorm.ccu.edu.tw edu.tw

  23. /etc下的檔案介紹(11) • services 定義每個network port的名稱以及編號 ex. telnet 就是 port 23 ftp 通常開在 port 21 網路芳鄰就是 port 139

  24. /etc下的檔案介紹(12) • /etc/mail 此目錄存放的是sendmail的設定檔,由於設定太過複雜,請自行參考OREILLY出版的 sendmail管理一書。

  25. /etc下的檔案介紹(13) • shells 定義有哪些合法的shell,如果使用者使用不在 此檔案之中的shell,將無法ftp這台機器。

More Related