一、從 HighPoint 下載「命令列」工具程式
這次安裝當然也是用「命令列」工具程式,但是過程就沒像以前那麼順利。從 HighPoint 官網的支援網頁下載「命令列(CLI)」的工具程式,這組程式適用好幾個型號的 RocketRAID 卡,筆者是下載『CLI-Linux-3.5-100701.tgz』這個檔案,看編號就可判斷出大概是 2010 年的程式。依說明文件下載、解壓縮、安裝,但是卻出現如下的錯誤訊息,
[root@Core-i7 ~]# cd Temp/英文版的錯誤訊息為,
[root@Core-i7 ~]# ls
. . . . .
CLI-Linux-3.5-100701.tgz
. . . . .
[root@Core-i7 ~]# tar zxf CLI-Linux-3.5-100701.tgz
[root@Core-i7 ~]# cd CLI-Linux-3.5-100701/rpm
[root@Core-i7 ~]# dnf install hptsvr-3.13-7.x86_64.rpm
. . . . .
Running transaction test
Error: Transaction check error:
從 hptsvr-3.13-7.x86_64 安裝的檔案 /usr/bin 與來自套件 filesystem-3.2-32.fc22.x86_64 的檔案產生衝突
. . . . .
[root@Core-i7 ~]# dnf install hptraidconf-3.5-1.x86_64.rpm
. . . . .
Running transaction test
Error: Transaction check error:
從 hptraidconf-3.5-1.x86_64 安裝的檔案 /usr/bin 與來自套件 filesystem-3.2-32.fc22.x86_64 的檔案產生衝突
. . . . .
[root@Core-i7 ~]# dnf install hptsvr-3.13-7.x86_64.rpm這是 RPM 安裝腳本有部分步驟與系統不合所致,用 RPMREBUILD 可以解決這個問題。
. . . . .
Error: Transaction check error:
file /usr/bin from install of hptraidconf-3.5-1.x86_64 conflicts with file from package filesystem-3.2-32.fc22.x86_64
‧ ‧ ‧ ‧ ‧
二、安裝 RPMREBUILD
解決上述問題,需要借助 RPMREBUILD 這個重建包裝 RPM 套件的工具,[root@Core-i7 ~]# dnf install rpmrebuild由於 Fedora 的套件資料庫有收錄 RPMREBUILD,安裝過程很簡單。
三、修改 hptsvr 及 hptraidconf 套件
用 RPMREBUILD 修改、再重新包裝 RPM 套件不需要在 root 權限下,可以在使用者帳號下先重新包裝 RPM 套件,再到 root 帳路下安裝即可。接下來的操作步驟中,命令提示中的帳號名稱可以看出是在什麼帳號下。[SiB@Core-i7 Temp]$ tar zxf CLI-Linux-3.5-100701.tgz上例中,三個命令分別為:「解壓縮」、「切換工作目錄」及「修改、重建 RPM 套件」。下第三個命令後,會進入一個類似 vi 或 vim 的文字編輯介面,未用過的人可能有些困難,記住這幾個需要的操作鍵就夠了,
[SiB@Core-i7 Temp]$ cd CLI-Linux-3.5-100701/rpm
[SiB@Core-i7 rpm]$ rpmrebuild -pe hptsvr-3.13-7.x86_64.rpm
- 【↑】【↓】【←】【→】四個鍵,用以移動游標。
- 按【i】鍵,切換到輸入模式,左下角會出現『-- INSERT --』。
- 在輸出模式可以文字、符號等
- 按【Esc】鍵,切回命令模式,左下角的『-- INSERT --』消失。
- 依序按【:】【w】【q】三個鍵,將修改存入並離開編輯畫面。
. . . . .套件 hptraidconf-3.5-1.x86_64.rpm 的修改如下,
%description
HighPoint RAID Management Service provides functionality for monitoring the storage system, for event logging and notification, and for the console user interface to work. It must be installed on a system that has
HighPoint ATA RAID Controllers installed.
%files
#%dir %attr(0755, root, root) "/etc"
#%dir %attr(0755, root, root) "/usr/bin"
%attr(0755, root, root) "/usr/bin/hptsvr"
%attr(0755, root, root) "/usr/bin/smart.def"
%dir %attr(0755, root, root) "/usr/share/hpt/hptsvr-3.13.7"
. . . . .
%changelog
#* 2009 Jul 20 Mon wsw^M
#- reimplement the routine of finding devices.
. . . . .將修改存入後,會出現『Do you want to continue ? (y/N)』這個詢問,讓使用者再確認是否重新包裝 RPM 套件。按【y】繼續,
%description
The HighPoint CLI (Command Line Interface) is a non-graphical utility
that configures and manages HighPoint RAID controllers via a command
line. It is ideal for systems where an X Window system is not
configured, and the RAID Management GUI cannot be used.
%files
#%dir %attr(0755, root, root) "/usr/bin"
%attr(0755, root, root) "/usr/bin/hptraidconf"
%dir %attr(0755, root, root) "/usr/share/doc/hpt"
%dir %attr(0755, root, root) "/usr/share/doc/hpt/hptraidconf-3.5"
. . . . .
%changelog
#* 2010 Jul 01 Thu xcq
#- 3.5-1 Fix query arrays
#* 2009 Dec 24 Thu wsw
#- 3.4-1 Fix S.M.A.R.T
#* 2009 Aug 06 Thu wsw
#- 3.3-2 for fixing help docs.
[SiB@Core-i7 ~]$ rpmrebuild -pe CLI-Linux-3.5-100701/rpm/hptsvr-3.13-7.x86_64.rpm注意:重新安裝的 RPM 套件,是位於 /home/SiB/rpmbuild/RPMS/x86_64/ 這個目錄,若 SiB 是帳號名稱,x86_64 是重新包裝的套件為 x86_64 架構。
Do you want to continue ? (y/N) y
result: /home/SiB/rpmbuild/RPMS/x86_64/hptsvr-3.13-7.x86_64.rpm
[SiB@Core-i7 ~]$ rpmrebuild -pe CLI-Linux-3.5-100701/rpm/hptraidconf-3.5-1.x86_64.rpm
Do you want to continue ? (y/N) y
result: /home/SiB/rpmbuild/RPMS/x86_64/hptraidconf-3.5-1.x86_64.rpm
四、安裝修改後的 RPM 套件
重建好 RPM 套件後,要重新安裝新套件,先安裝 hptsvr 這個套件,[root@Core-i7 ~]# cd /home/SiB/rpmbuild/RPMS/x86_64/有個錯誤,是 hptdaemon.service 不能建立,所以不能自動啟動它。不過不影響『手動』操作,先不理會它,以後再去研究、解決這個問題。接著,安裝 hptraidconf 這個套件,
[root@Core-i7 ~]# dnf install hptsvr-3.13-7.x86_64.rpm
Last metadata expiration check performed . . . . .
Dependencies resolved.
=======================================================================
Package Arch Version Repository Size
=======================================================================
Installing:
hptsvr x86_64 3.13-7 @commandline 127 k
Transaction Summary
=======================================================================
Install 1 Package
Total size: 127 k
Installed size: 316 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : hptsvr-3.13-7.x86_64 1/1
Starting hptdaemon (via systemctl): Failed to start hptdaemon.service: Unit hptdaemon.service failed to load: No such file or directory.
[失敗]
警告:%post(hptsvr-3.13-7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package hptsvr
Non-fatal POSTIN scriptlet failure in rpm package hptsvr
Verifying : hptsvr-3.13-7.x86_64 1/1
Installed:
hptsvr.x86_64 3.13-7
Complete!
[root@Opteron x86_64]# dnf install hptraidconf-3.5-1.x86_64.rpm在這篇發文先解決安裝的問題,操作的問題請先看原廠的操作說明書,過些時候再整理一些常用命令。
Last metadata expiration check performed . . . . .
Dependencies resolved.
=======================================================================
Package Arch Version Repository Size
=======================================================================
Installing:
hptraidconf x86_64 3.5-1 @commandline 328 k
Transaction Summary
=======================================================================
Install 1 Package
Total size: 328 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : hptraidconf-3.5-1.x86_64 1/1
Verifying : hptraidconf-3.5-1.x86_64 1/1
Installed:
hptraidconf.x86_64 3.5-1
Complete!
已測試版本:
- Fedora 22 Server
- HighPoint Rocket 1740, 2220, 2320
沒有留言:
張貼留言
感謝你耐心看完本文,歡迎留下任何指正、建議,筆者會儘快回應。(English is also welcome.)