centos安装
1、下载安装包
wget http://162.243.29.98/MegaCli-8.07.14-1.noarch.rpm
2、安装
rpm -ivh MegaCli-8.07.14-1.noarch.rpm
3、方便使用,添加别名
vim /root/.bashrc
alias megacli=’/opt/MegaRAID/MegaCli/MegaCli64′
source /root/.bashrc
4、查看硬盘信息
megacli -PDList -aALL
`报错解决`
第4步报错:megacli: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
解决:yum install libncurses* -y
Debian&&Ubuntu安装
1、安装依赖
apt installwget unzip alien dpkg -y
2、下载安装包
wget http://162.243.29.98/MegaCli-8.07.14-1.noarch.rpm
3、安装
alien MegaCli-8.07.14-1.noarch.rpm
dpkg -i megacli_8.07.14-2_all.deb
4、方便使用,添加别名
vim /root/.bashrc
alias megacli=’/opt/MegaRAID/MegaCli/MegaCli64′
source /root/.bashrc
5、查看硬盘信息
megacli -PDList -aALL
`报错解决`
第3步报错:
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
解决:
#添加环境变量
vim /root/.bashrc
export PATH=/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
source /root/.bashrc
第5步报错:
megacli: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
解决:
apt-getinstall libncurses5