升級內(nèi)核野宜,打開BBR:
#參考https://blog.csdn.net/suhiymof/article/details/78540747
#首先典挑,讓我們添加 ELRepo GPG key:
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
#為 RHEL-6韵洋,SL-7锉矢,CentOS-7 源:
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
#當然,別忘了 fastestmirror 還是需要的
sudo yum install yum-plugin-fastestmirror
#最后扯罐,安裝 kernel 最新的4.18
sudo yum --enablerepo=elrepo-kernel install kernel-ml
#當然扛门,將 kernel-ml 選為第一啟動
ls /usr/src/kernels
sudo grub2-set-default 0
#重啟
sudo reboot
uname -a
# install devel headers
sudo yum --enablerepo=elrepo-kernel install kernel-ml-devel
sudo yum remove kernel-headers
sudo yum --enablerepo=elrepo-kernel install kernel-ml-headers
# 發(fā)現(xiàn)kernel版本太新,ib驅動不支持
# ib支持kernel 4.9的
# https://www.mellanox.com/page/mlnx_ofed_matrix?mtag=linux_sw_drivers&ssn=oj95obscjv1imii6bneju691i7
# 恢復
sudo grub2-set-default 1
sudo reboot
sudo yum remove "kernel-ml*"
sudo grub2-set-default 0
sudo yum install kernel-headers.x86_64
# http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/
wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-4.9.0-1.el7.elrepo.x86_64.rpm
sudo yum install kernel-ml-4.9.0-1.el7.elrepo.x86_64.rpm
sudo grub2-set-default 0
sudo reboot
wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-4.9.0-1.el7.elrepo.x86_64.rpm
sudo yum install kernel-ml-devel-4.9.0-1.el7.elrepo.x86_64.rpm
sudo yum install -y gcc
sudo yum install -y gcc-gfortran
sudo yum install -y gcc-c++
wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-headers-4.9.0-1.el7.elrepo.x86_64.rpm
sudo yum install kernel-ml-headers-4.9.0-1.el7.elrepo.x86_64.rpm
# 參考http://210.45.114.146/wiki/doku.php?id=dfs:config#configure_infiniband_network
# 從http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers 下載ib網(wǎng)卡驅動
sudo ./mlnxofedinstall --add-kernel-support
sudo /etc/init.d/openibd restart
sudo chkconfig openibd on #開機啟動
# generate uuid
uuidgen ib0 # 8a69c933-16f2-45dc-9fdb-cd8676a120f3
sudo vim /etc/sysconfig/network-scripts/ifcfg-ib0
# start the ib network
sudo /etc/sysconfig/network-scripts/ifup ifcfg-ib0
# start the opensm service
sudo service opensmd start # at least one machine starts the service in a cluster
sudo chkconfig opensmd on #開機啟動