分类 linux 中的文章

制作CentOS ISO

1. 复制光盘文件 1)挂载iso镜像 #创建目录用于挂载光盘 mkdir /root/centos7 #挂载iso镜像 mount -o loop CentOS-7.0-1406-x86_64-DVD.iso /root/centos7 2)复制光盘文件到编辑目录进行编辑 因为挂载上iso镜像是只读的,如果要编辑,需要将文件复制出来,再编辑。 #首先创建编辑目录: mkdir /root/centos7_iso #复制光盘文件: cp -rf /root/centos7/* /root/centos7_iso/ #diskinfo treeinfo文件需单独拷贝下: cp /root/centos7/.discinfo /root/centos7_iso/ cp /root/centos7/.treeinfo /root/centos7_iso/ 2. 编辑ks.cfg文件 系统安装的时候,按照ks.cfg文件的内容进行安装,我们把ks.cfg文件放到isolinux目录下: cd /root/centos7_iso/isolinux vim ks-init.cfg #platform=x86, AMD64, or Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard 'us' # Root password rootpw --iscrypted $1$JtB/A66X$GCT7X3FCJVAPGd3sEY0mx0 # System language lang en_US # System authorization information auth --useshadow --passalgo=sha512 # Use cdrom installation media cdrom # Use text mode install #text graphical # SELinux configuration selinux --disabled # Do not configure the X Window System skipx #firstboot --enable #ignoredisk --only-use=sda # Firewall configuration firewall --disabled # Network information network --bootproto=dhcp --device=eth0 --onboot=no network --hostname=localhost.……

阅读全文

搭建本地yum仓库

1. 安装工具 yum install -y createrepo 2. 编辑 comps.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE comps PUBLIC "-//CentOS//DTD Comps info//EN" "comps.dtd"> <comps> <group> <id>epc</id> <name>epc</name> <name xml:lang="en_GB">epc</name> <description>epc installation.</description> <default>false</default> <uservisible>false</uservisible> <packagelist> <packagereq type="mandatory">baicells-epc-base</packagereq> <packagereq type="mandatory">baicells-epc-ui</packagereq> <packagereq type="mandatory">baicells-epc-ovs-rest</packagereq> <packagereq type="mandatory">baicells-epc-ovsdb-agent</packagereq> <packagereq type="mandatory">baicells-epc-signaltrace</packagereq> <packagereq type="mandatory">baicells-epc-gwsc</packagereq> <packagereq type="mandatory">baicells-epc-openapi</packagereq> </packagelist> </group> </comps> 3. 创建仓库 createrepo -g comps.xml . #精确分组 #createrepo . #createrepo --update 4. 拷贝rpm包到仓库 mkdir rpms cp *.rpm rpms/ 5.……

阅读全文

最近文章

分类

标签

友情链接

其它