基於官方方的1708mini版本定製自己的系統映象。
1,環境準備
1.2,建議自己的工作目錄
mkdir -p /cloud/iso/centos7.2
並把映象所有檔案拷貝到 /cloud/iso/centos7.2/
2,定製自己的系統映象。
2.1,cp repodata/*comps.xml ./comps.xml
vi comps.xml
gceph
ceph
ceph 節點
false
false
init-ceph
ceph
ceph s3 servers
ceph
cephs3 儲存服務
9core
gbasic
gceph
gimgiam
:wq!儲存退出
以上修改會在安裝系統可選軟體中列出自己的軟體。 optionlist項為可附加可選項。自定義的軟體如init-ceph。可以放在根目錄的任務資料夾下。我們統一放在 extra/mirrors/sunrunpaas/
如:ceph/ php5.6/ sunrundfs/ sunruniaas/ sunrunim/ sunrunvas/
mariadb/ sunrun-common/ sunrunhac/ sunruniam/ sunrunslb/ trans.tbl
2.2 ,定製作自己的介面
2.2.1定製作引導介面。
修改 isolinux/isolinux.cfg
label linux
menu label ^install sunrunos 1
kernel vmlinuz
2.2.2 定製圖示和文字。
系統安裝介面裡的圖示與檔案修改。對應的在liveos/squashfs.img中,需要解壓,修改,再壓縮回去。
unsquashfs squashfs.img
產生squashfs-root 目錄。
修改usr/lib64/python2.7/site-packages/pyanaconda/product.py
def distributiontext():
return _("%(productname)s %(productversion)s installation") % \
完成修改,生產新的squashfs.img
umount tmp/
cd ../../
rm squashfs.img
mksquashfs squashfs-root squashfs.img
3, 定製安裝流程
cp /root/anaconda-ks.cfg /cloud/iso/centos7.2/ks.cft
如下:#version=chenjian centos
#platform=x86, amd64, or intel em64t
# install os instead of upgrade
#repo --name="sunrun***" --baseurl="file:///opt/sunrun-***/extra/packages/"
install
# keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# root password
rootpw --iscrypted $1$password$mv5cpmxkukvimoukquvs..
# system language
lang en_us.utf-8
# firewall configuration
firewall --disabled
# system authorization information
auth --useshadow --passalgo=sha512
# use cdrom installation media
cdrom
# use text mode install
#text
# run the setup agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# selinux configuration
selinux --disabled
# do not configure the x window system
#skipx
# network information
network --bootproto=dhcp --device=ens160 --onboot=yes --ipv6=auto --activate
#network --device=ens160 --hostname=localhost.localdomain
%post --nochroot
# 寫到rootfs裡去
rm -rf /mnt/sysimage/etc/yum.repos.d/*
#mkdir -p /mnt/sysimage/mnt/iso
#\cp -rf /run/install/repo/extra/repos/* /mnt/sysimage/etc/yum.repos.d/
%end
# reboot after installation
reboot
# system timezone
timezone asia/shanghai --isutc
# system bootloader configuration
# clear the master boot record
zerombr
# partition clearing information
clearpart --all --initlabel
autopart --type=lvm
#%packages
#@^minimal
#@core
#%end
4,重新生成映象:
rm -rf repodata/*
createrepo -g comps.xml .
genisoimage -v -cache-inodes -joliet-long -r -j -t -v centos7 -o ../c75.iso -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -b images/efiboot.img -no-emul-boot ./
5完成 ../c75.iso 即是我們的作品。
基於CentOS 7配置
配置網路 centos 7安裝完成後沒有開啟網路連線,可以更改配置檔案開啟。檢視本機ip,找到ensxx 開啟配檔案 etc sysconfig network scripts ifcfg ens33,更改內容如下,退出編輯esc儲存 w退出 q 如果不想配置靜態ip。可以只更改onboot yes...
定製自己的CentOS
1 在 root 目錄下面 找到install.log 檔案並把在檔案中以 installing 開頭的行中的軟體包名剪下到另乙個檔案中,但是在該軟體中還有以數字開頭的軟體,且把該軟體包名也存到 如 建立乙個檔名為 package.txt 命令 touch package.txt 注用於存放 rpm...
基於CentOS 7 搭建 GitLab
系統要求 centos 7.2 64 位作業系統 yum update y 安裝 sshd yum install y curl policycoreutils python openssh server 啟用並啟動 sshd systemctl enable sshd systemctl star...