八月 14, 2008
可以改成虛擬主機
http:class.sses.tp.edu.tw/~abc-----改成虛擬主機(讓網址變好看)
http:abc.sses.tp.edu.tw
八月 13, 2008
補單
備份檔案
etc\
shadow
passwd
group
gshadow
Samba Server
Samba 是使用 smb 通訊協定來與 windows 作業系統溝通,smb 其實就是 windows 網芳所用的 nbt 通訊協定,當我們啟動了 SAMBA 之後,主機系統就會啟動 137, 138, 139 三個 port 。
1.直接編修 /etc/samba/smb.conf
[root@fc3 home]# vi /etc/samba/smb.conf
2.以下列出比較重要的設定(如欲深研請自行參閱相關文件)
#======================= Global Settings =====================================
[global]
# ----------------------- Netwrok Related Options -------------------------
workgroup = class2 (類似WINDOWS的網域或工作群組名稱,不可和現存的相同)
server string = test files server (相當於 windows的電腦說明,當未設定 netbios name 時,也會拿來當成電腦名稱)
netbios name = MYSERVER(網芳電腦名稱)
# ----------------------- Standalone Server Options ------------------------
security = user(Windows端需輸入用戶名稱或通行密碼才能存取Samba的共享資源)
passdb backend = smbpasswd(認證時使用/etc/samba/smbpasswd此檔)
# ----------------------- Domain Controller Options ------------------------
domain logons = yes(當Logon Server,可以用來控制Client 端的登入批次檔)
logon script = student.bat (系統登入指令稿,把 student.bat放入Netlogon目錄中,學生登入時,windows端就會自動執行 student.bat)
# --------------------------- Filesystem Options ---------------------------
username map = /etc/samba/smbusers
encrypt passwords = yes(把純文字密碼,用 DES(MD4) 編密認證 這在win9x/ME中是需要的)
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
下方加上
[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes
writable = no
browseable = no
share modes = no
4.設定完畢存完檔重新啟動Samba Server
# service smb restart
5.請在 /home目錄下新增一個netlogon的資料夾,並將其資料夾權限設為755。
6.在windows環境下用文書編輯軟體編輯一個新檔,完畢後存成student.bat檔並將其放到 /home/netlogon資料夾中,並將student.bat權限設為755,student.bat的內容及做法如下圖:
7.以上針對學生K磁碟機部分的功能已設定完畢了,但是接著有興趣的人可參考李忠憲老師的大作-Samba 伺服器管理 ,其中對Samba Server設定有詳細解說,個人感覺其中的繳交作業專案研究 更是對我們管理學生作業有莫大的幫助.
Quota設定
在 Linux 系統中,由於是多人多工的環境,所以會有多人共同使用一個硬碟空間的情況發生, 如果其中有少數幾個使用者大量的佔掉了硬碟空間的話,那勢必壓縮其他使用者的使用空間。
-
在 /home 下先 touch 一個檔 aquota.user,aquota.group不必輸入任何資料,存檔後離開。 aquota.user與aquota.group分別用來記錄使用者及群組的 Quota 資料。
#cd /home
# touch aquota.user
# touch aquota.group
- 編修/etc/fstab 找到 LABEL=/home 此行
原來 → LABEL=/home /home ext3 defaults 1 2
改成 → LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
- 重新開機休息一下吧
- 掃瞄磁碟的使用者使用狀況
# quotacheck -avug
- 啟動Quota
# quotaon -a
- 再重新開機休息一下吧(慶祝Quota設定成功)
設定軟體更新程式(YUM)
在Fedora Core中,新增了一個叫作yum的套件管理程式,能夠幫您快速的安裝、更新套件,也會幫您處理惱人的套件相依性問題,設定檔在/etc/yum.repos.d此目錄中(參考/etc/yum.conf)。
-
備份設定檔cd /etc/yum.repos.d cp fedora.repo fedora.repo.bak cp fedora-updates.repo fedora-updates.repo.bak
-
編輯 fedora.repo
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
baseurl=http://ftp.twaren.net/Linux/Fedora/linux/releases/8/Everything/i386/os/ -
編輯 fedora-updates.repo
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
baseurl=http://ftp.twaren.net/Linux/Fedora/linux/updates/8/i386/
以下是一些yum的常用指令,要用的時候再查就好,一般常用的也就只有安裝跟更新
Linux 系管師基礎班講義
http://www.lses.tp.edu.tw/linux20080813/#設定軟體更新程式(YUM)
七月 25, 2008




