标签:chmod 创建 install shel dep cal rpm工具 -- figure
参考:两个下载rpm包及其依赖的工具、使用rpm工具并离线安装的方法
sudo yum install yum-utils
sudo yumdownloader --resolve --destdir=./rpmCentOS/ nfs-utils rpcbind ncurses-devel gcc-c++
ls rpmCentOS/
installCentOS.sh
#?/bin/bash
#离线安装必要依赖库
sudo rpm -ivh --force --nodeps rpmCentOS/*.rpm
sudo rpm -ivh --force --nodeps rpmCentOS/*.rpm
#配置NFS
sudo echo ‘/mnt/cephfs *(rw,sync,no_root_squash,no_subtree_check,fsid=0)‘ >> /etc/exports
#将项目中的启动脚本nfs-kernel-server覆盖原有的启动脚本
sudo cp nfs-kernel-server /etc/nfs-kernel-server
#将配置文件cm_config.conf复制到/etc目录下
sudo cp cm_config.conf /etc
#安装start-stop-daemon,使得在centos下能正常运行nfs-kernel-server
cd dpkg-1.16.18
./configure --prefix=/home/bc/nfs/dpkg-1.16.18/utils
sudo make clean
sudo make
sudo make install
sudo cp utils/start-stop-daemon /usr/local/sbin
sudo cp utils/start-stop-daemon /usr/sbin
sudo mkdir /mnt/cephfs
检查installCentOS.sh脚本中的编译路径位当前路径并修改正确
sudo chmod +x installCentOS.sh
sudo ./installCentOS.sh
sudo /etc/nfs-kernel-server start
sudo /etc/ nfs-kernel-server stop
sudo /etc/nfs-kernel-server restart
标签:chmod 创建 install shel dep cal rpm工具 -- figure
原文地址:https://www.cnblogs.com/annbaek/p/11732140.html