




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、SUSE LINUX Enterprise Server簡(jiǎn)易使用文檔 接收方:華為公司2005年1月版本歷史r版本日期備注J1.02005年1月第1版目錄編寫(xiě)目的.5.1使用篇5.1.1 SUSE LINUX En terprise Server 安裝后的一些常用命令 啟動(dòng)/關(guān)閉系統(tǒng) 51.1.2磁盤(pán)重新分區(qū)和創(chuàng)建文件系統(tǒng) 61.1.3查詢、設(shè)置主機(jī)的IP地址、子網(wǎng)掩碼 141.1.4查詢?cè)O(shè)置主機(jī)名稱(chēng) 161.1.5查詢、設(shè)置主機(jī)的路由和網(wǎng)關(guān) 201.1.6查詢、設(shè)置主機(jī)的日期時(shí)間 231.1.7 tel net 和 ftp261.1.8 ssh和 scp381.1.9建立NFS
2、文件共享 391.1.10查看CPU、內(nèi)存、網(wǎng)卡等硬件的配置情況 421.1.11修改顯示分辨率、刷新頻率 461.2服務(wù)器系統(tǒng)的可靠維護(hù)手段481.2.1修復(fù)文件系統(tǒng)481.2.2在SLES下的備份方法 4用tar進(jìn)行備份和恢復(fù) 4使用dd進(jìn)行備份/恢復(fù)51編寫(xiě)目的SUSE LINUX En terprise Server 8/9為安全的企業(yè)計(jì)算提供了可擴(kuò)展的高性能基礎(chǔ),使企業(yè) 能夠充分利用Linux*和開(kāi)放源代碼。該產(chǎn)品具有極強(qiáng)的可靠性,并且為當(dāng)前的網(wǎng)絡(luò)環(huán)境提 供了全面的功能,以滿足用戶的需求。SUSE LINUX En terprise Server還支持
3、廣泛的硬件平臺(tái)和領(lǐng)先的軟件應(yīng)用。憑借其獨(dú)特的開(kāi)放式管理能力,您可以在網(wǎng)絡(luò)的任何位置輕松地安裝、 部署、配置、保護(hù)和更新Linux服務(wù)器一一從而顯著節(jié)約IT成本。由于SUSE LINUX Enterprise Server由 Novell提供全面的支持,因此,在實(shí)施可行的關(guān)鍵任務(wù)平臺(tái)時(shí),可獲得 所需的可靠發(fā)布周期、法律保護(hù)、教育和認(rèn)證方案、合作伙伴資格以及全面的支持環(huán)境。編寫(xiě)本文稿的目的在于向用戶簡(jiǎn)單介紹常用的SUSE LINUX En terprise Server 8/9日常維護(hù)命令和備份恢復(fù)方案。1使用篇1.1 SUSE LINUX Enterprise Servei安 裝后的一些常用命令
4、1.1.1啟動(dòng)/關(guān)閉系統(tǒng)相信大家肯定都知道開(kāi)關(guān)機(jī)器的步驟。與任何UNIX系統(tǒng)一樣,SUSE LINUX系統(tǒng)只要上電就可以開(kāi)機(jī),關(guān)機(jī)使用shutdown命令。但是在日常維護(hù)中,開(kāi)關(guān)機(jī)仍然是必須學(xué)習(xí)的內(nèi) 容,因?yàn)樵陂_(kāi)關(guān)機(jī)的過(guò)程中可能會(huì)有一些特殊問(wèn)題。當(dāng)你給系統(tǒng)加電的時(shí)候,SUSE LINUX將自動(dòng)從啟動(dòng)管理器開(kāi)始執(zhí)行。通常我們不需要 對(duì)系統(tǒng)的啟動(dòng)作任何干預(yù),SUSE LINUX就可以自動(dòng)執(zhí)行啟動(dòng)腳本直到出現(xiàn)登錄提示(kdm 或 login )。當(dāng)系統(tǒng)啟動(dòng)腳本開(kāi)始執(zhí)行的時(shí)候,系統(tǒng)必須首先mount上文件系統(tǒng)。系統(tǒng)在此之前將會(huì)調(diào)用fsck程序來(lái)自動(dòng)檢測(cè)文件系統(tǒng)。一般情況下,fsck會(huì)正確修復(fù)文件系統(tǒng)中
5、的錯(cuò)誤。然而, 如果發(fā)生了致命錯(cuò)誤,那么fsck會(huì)退出,這時(shí)系統(tǒng)啟動(dòng)腳本會(huì)出現(xiàn)類(lèi)似于這樣的提示:fsck failed. Please repair manually and reboot. The rootfile system is currently mounted read-only. To remount itread-write do:bash# mount -n -o remoun t,rw /Attention: Only CONTROL-D will reboot the system in thisshutdow n or reboot will not work.然后啟動(dòng)
6、腳本會(huì)調(diào)用一個(gè)sulogin程序,這個(gè)程序會(huì)提示你輸入超級(jí)用戶口令:Give root password for maintenance (or type Con trol-D for no rmal startup):輸入超級(jí)用戶口令之后,你將得到一個(gè)shell,在這個(gè)shell中你可以使用fsck命令修理有問(wèn)題的文件系統(tǒng)。fsck結(jié)束之后,用exit命令退出這個(gè)shell,系統(tǒng)將會(huì)重新啟動(dòng)。如果由于硬件升級(jí)或管理原因你想關(guān)閉或重新啟動(dòng)系統(tǒng),可以使用shutdown命令:shutdow n 時(shí)間信息時(shí)間參數(shù)定義在什么時(shí)候關(guān)機(jī),基本的格式是hh:mm,比如12:30代表12點(diǎn)30分。不過(guò)更多的
7、人喜歡用+分鐘,例如shutdown +3代表3分鐘后關(guān)閉系統(tǒng)。一個(gè)特殊的字符串now表示+0,即立刻關(guān)機(jī)。信息參數(shù)用來(lái)向連接在系統(tǒng)上的所有用戶發(fā)送一條消息,例如 ,想要在兩分鐘后關(guān)閉系統(tǒng),并且向所有用戶發(fā)送一條“ system now halted.Please save your work的信息,命令是# shutdow n +2 system now halted,Please save your work如果要重新啟動(dòng)機(jī)器,可以使用shutdown的-r參數(shù),例如# shutdow n -r now也可以用reboot命令:reboot1.1.2磁盤(pán)重新分區(qū)和創(chuàng)建文件系統(tǒng)在SUSE L
8、inux操作系統(tǒng)安裝好之后,由于擴(kuò)容等原因,需要在新的磁盤(pán)上創(chuàng)建新的分區(qū) 或在原有磁盤(pán)上改變某些分區(qū)的大小以適應(yīng)應(yīng)用的需要。在SUSE Linux上可以通過(guò)工具yast2 disk管理分區(qū),也可以通過(guò)命令行工具fdisk管理分區(qū)例如:系統(tǒng)原有一塊 SCSI磁盤(pán)/dev/sda,現(xiàn)在新增了一塊 SCSI磁盤(pán)/dev/sdb圖形方式對(duì)于yast2 disk模塊管理磁盤(pán)分區(qū)方法如下:# LC_ALL=C LANG=C yast2 disk分區(qū)程序會(huì)顯示警告信息,因?yàn)榉謪^(qū)在系統(tǒng)中處于非常底層的地位,所有文件系統(tǒng)都建 立在分區(qū)之上。如果在分區(qū)中的某些錯(cuò)誤操作會(huì)導(dǎo)致整個(gè)系統(tǒng)的毀壞,所以在運(yùn)行中的系統(tǒng) 上進(jìn)
9、行分區(qū)變更需要特別注意,事先做好規(guī)劃。Warning!Only use this program if you are familiar with partitioning hard disks.單擊Yes,進(jìn)入分區(qū)程序主窗口Me 1 lentNever partition disks which may, in any way, be in use(mounted, swap, etc.) unless you are know exactly what you are doing. Otheiwise, the partitioning table will not be forwarde
10、d to the kernel, which would most likely lead to data loss.NoTo continue despite this warning, click Yes.Partition your hard disks.YaST2clientSuSEExpert FartitionerThis is intended for experts, if you are notfamfliarwith the conce卩is af hard disk partitions and how to use th已叫 you might want to go b
11、ack and se:ect automatic partitioning.DeviceSizeFTypeMountStartEndRAIDLVM Grodev/sda3.9 GBVMware Virtual S0521/dev/sda1502+0 MBLinux swapswap0S3/dev/sda23,5 GBLinux native/64521izdesdtiVO GBVMware Virtual S0511Nothing will be written to ijour hard disk until you confirm all your changes with th已Appl
12、y button. Until that point, you 匚玄門(mén) safely abort.For LVM setup, we recommend using a non-LVM root device and a non-LVM swap device. Besides the root and swap device you should set all partitions to be managed by the LVM.ResizeHard disks are designated like .hisThe table to the right shows the curren
13、t partitions on all your hard disks.LVM.| RAID. Expert.| Quit |地ortApply我們?cè)跍y(cè)試環(huán)境中對(duì)/dev/sdb進(jìn)行分區(qū)CancelStart cylinder:153End: (9 or +9M or +3.2GE)511Cance!然后創(chuàng)建邏輯分區(qū)/dev/sdb5-SizeCylinder size: 2.00 MlentWhich type of partition do you want to :eate?Primary partition汗 Extended partitionOK創(chuàng)建第四個(gè)分區(qū)/dev/sdb4為擴(kuò)
14、展分區(qū)YaST2clientGreate an extended partition on /dev/sdbEnter the starting cylinder number of the partition After th at, eithe r specify an Ending cyiinder number or an offset from the first cyiinder (e.g., +66). It is also passible to speedy the size of the partition directly (e.g., +2G,+100MJ or+200
15、00K)OKOn already-existi ng partitions, only the mount point can be changed.r FormatCreate a logical partition on /dev/sdb-SizeCylinder size: 2.00 M Do not formatFile system ID:Start cylinder:0x83 Linux153End: (9 or+9M or+3.2GB)FormatFile systemFstab OptionsOKMount PointYaST2elientPartition your hard
16、 disks.SuS EExpert FartitionerThis is intended for experts. If you are notfamfliarwith the concepts af hard disk partitions and how to use th已叫 you might want to go back and se:ect automatic partitioning.Nothing will be written to your hard disk until you confirm all your changes with th已Apply11 but
17、ton. Until that point, you 匚玄門(mén) safely abort.DeviceSize卜TypeMountStartEndRAIDLVM Grodev/sdaas GBVMware virtual S0521/dev/sda1502+0 MBLinux swapswap0S3/dev/sda23,5 GBLinux nalive/64521fdEgdb1.0 GBVMwar已 Virtual S0511 I L 昱SuSEr Enable IP forwardingBackAbortdeslinaUan, but 口口or If amjThe idea nf the de
18、fau t route isYaSTmatjches every possibleRouting configurationDefauU fialewaysystem is a router.The routing can be set up in thisdialog. The default routeother entry exists that matchesihie requlred address, it will beused Instead 口Fthm dsfault rome.simply to 已nable you to say and everything else sh
19、ould go here.Enable the iP forwarding if theNetwork address setup 窗口中 “Detailedsettings 下單擊 “Routing 按鈕,在 ” Default gateway輸入框中輸入缺省網(wǎng)關(guān)。如果要設(shè)置到特定網(wǎng)絡(luò)或主機(jī)的路由,選中“ Rout ing table中的“ Expert con figuration在 ”“Adc和 “ Edit的對(duì)話窗口中,填寫(xiě) “ Destination, “ Dummy or Gateway和 “ NetmasK”Fy YaST 2 l=j i_=j i2jDestination|l
20、9.1 66,2. 1 28Dummy or Gatewa.y|l 92.1 682.1Netmask255-2S5.255-1 28Deyice (optional)IT|jyq 曰門(mén)ui |“Device可以不用填寫(xiě)例子 1:網(wǎng)絡(luò) 192.1682128/28勺網(wǎng)關(guān)為 192.1682 129, “Destinatior填寫(xiě)目 的網(wǎng)絡(luò)地址 28, “ Dummy or Gateway填 寫(xiě)網(wǎng)關(guān)地址 29, “ Netmask” 寫(xiě) 2&例子 2:主機(jī) 0/255.255.2
21、55.255的網(wǎng)關(guān)為 0,“Destinatior填寫(xiě)目的主機(jī)地址 0,“ Dummy or Gateway填 寫(xiě)網(wǎng)關(guān)地址 0,“ Netmas填 寫(xiě)55方法2.通過(guò)修改配置文件的方式并運(yùn)行命令進(jìn)行配置修改文件/etc/sysconfig/network/routes,配置缺省網(wǎng)關(guān)和到特定網(wǎng)絡(luò)或主機(jī)的路由文件的格式:以#開(kāi)始的行是注釋?zhuān)恳恍惺且粋€(gè)路由記錄,由空格分隔的多列組成示例 /etc/sysco nfig/network/routes 文件# default gwdefault192.168.0
22、.1-# network 28/28 gateway set to 29282928# host 0/55 gateway set to 00055這個(gè)配置文件在執(zhí)行/etc/rc.d/network start時(shí)會(huì)被加載運(yùn)行命令添加上述路由# route add default gw # rou
23、te add -net 192.1682128 netmask 28 gw 192.1682129# route add -host 0 gw 0刪除上述路由# route del -n et # route del -net 28 netmask 28# route del -host 01.1.6查詢、設(shè)置主機(jī)的日期時(shí)間在SLES中可以運(yùn)行yast2 timezone修改日期和時(shí)間,也可以運(yùn)行命令修改日期和時(shí)間 注:SLES8下沒(méi)有修改時(shí)
24、間和日期的 YaST模塊SLES9方法1.通過(guò)yast2管理工具進(jìn)行配置在con sole中運(yùn)行yast2工具的時(shí)區(qū)模塊# LC_ALL=C LANG=C yast2 timezo neYaST2esles9Clock and Time zone Configurationfill If Zu!RticrnMacaoEtcHardware clock set toUTCChange Time oDate12:47:59 - 05-01-2005fiance!AsiaShanghaiAustralia Africa Pacific Global匚anadaCentral 日門(mén)d outh Ame
25、ricaJakarta 厲阿 KatmanduEuropeUSAKoreaKuaia LumpurKuwaitSelect the appropriate time zon Choose the country or region where you are located.Specify whether the hardware tlack of your machine Is set to local time or UTC.Most PCs that also have other operating systems installed (such 占*s Microsoft Windo
26、ws) use loI time.Machines that hrawe only Linux installed should! be set to Universal Time Coordinated (UTC).If you are unsure, us# the default values already selected.ManilaMideast FLlyadhB?Mideast Riyadh88Mideast Riyad h 89 QatarSaigonSaimarkandSeoul單擊 “ Clock and Time Zone Con figuration 窗口中 “ Ch
27、ange Time or Date按鈕修改日期和時(shí) 間,然后單擊“Apply按鈕,使應(yīng)用生效。在SLES8和SLES9上都可以用命令修改日期和時(shí)間。運(yùn)行命令修改日期和時(shí)間的命令的 例子如下:將日期和時(shí)間改為2004年11月27日22時(shí)20分# date -s 2004/11/27 22:20:00117 telnet和 ftp在SLES8下和SLES9下配置tel net服務(wù)(通過(guò)YaST2工具和修改配置文件)的方法略有 不同,下面分別針對(duì)兩種系統(tǒng)下的配置方法分別作出說(shuō)明。SLES8方法1.通過(guò)yast2管理工具進(jìn)行配置在con sole中運(yùn)行yast2工具激活in etd以及tel net服
28、務(wù)#LC_ALL=C LANG=C yast2 in etdYaST2clientSuSEStarting inetd will aJIow outsrde conne匚li匚iie to network services installed on your server: such as telnet, finger, or ftp Should inetd be started at boot?Network servicesH want to start the inetit you can chaose the SuSE default connguration. If you choose the cu
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 小自考公共事業(yè)管理概念理解試題及答案
- 2025至2030年中國(guó)氣動(dòng)往復(fù)銼刀市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)毛紡油劑行業(yè)投資前景及策略咨詢研究報(bào)告
- 2025至2030年中國(guó)歐式插頭內(nèi)膽支架行業(yè)發(fā)展研究報(bào)告
- 2025至2030年中國(guó)櫻桃木地柜行業(yè)發(fā)展研究報(bào)告
- 2025至2030年中國(guó)樓梯扶手立柱配件市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)棉織帆布市場(chǎng)調(diào)查研究報(bào)告
- 2025至2030年中國(guó)樹(shù)脂相框行業(yè)投資前景及策略咨詢研究報(bào)告
- 2025至2030年中國(guó)柳酸甲酯市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)條形號(hào)碼機(jī)行業(yè)投資前景及策略咨詢研究報(bào)告
- 《健康體檢重要異常結(jié)果管理專(zhuān)家共識(shí)》(2019)要點(diǎn)
- 襄陽(yáng)四中五中自主招生考試物理試題
- 防護(hù)服穿脫流程培訓(xùn)課件
- 六年級(jí)下冊(cè)美術(shù)教案-第9課 紙塑丨浙美版
- 最新云南省地圖含市縣地圖矢量分層可編輯地圖PPT模板
- 國(guó)家開(kāi)放大學(xué)《社會(huì)心理適應(yīng)》形考任務(wù)1-7參考答案
- 創(chuàng)維公司逃稅案分析
- 《淹溺急救》PPT課件(2022版)
- EPC項(xiàng)目管理之安全文明施工責(zé)任制度
- 第二節(jié)模糊綜合評(píng)價(jià)法
- 《雷鋒叔叔_你在哪里》說(shuō)課稿55481
評(píng)論
0/150
提交評(píng)論