1. Check my OS version:
uname
-m
cat
/etc/centos-release
2. First create a directory to store the rpm package locally, I choose to create it directly under /, you can customize it:
mkdir /yumload
cd /yumload/
pwd
3. Next, copy all the rpm packages in the Packages in the DVD to /yumload:
cp /mnt/cdrom/Packages/* ./
ll ./*.rpm | wc -l 可以查看此文件夹下多少个rpm包
4. If you install the createrepo command
First check if there is a createrepo rpm package
ls | grep createrepo
rpm -ivh createrepo-0.9.9.-17.e16.noarch.rpm
If an error is reported, see which command is dependent, and then install that command. After installing the dependent commands, install createrepo, and you're done