版本 代号
V10 Azalea
V10SP1 Tercel
V10SP2 Sword
V10SP3 Lance
Q: ****V10 在 virtualbox 7.0 上安装 guest agent 失败。
A:由于内核 5.0.0 access_ok 的参数由三个改为了2个,再加上 4.18、4.19 的内核都已经backport了这个功能,所以 guest agent 判断内核的标准就有问题。vboxguest/r0drv/linux/memuserkernel-r0drv-linux.c vboxsf/regops.c 的 5,0,0 需要修改为 4,18,0 再次编译后,就可以正常编译安装。
./VBoxLinuxAdditions.run --target /tmp/VBoxGuestAdditions-7.0.6
cd /tmp/VBoxGuestAdditions-7.0.6
tar jxfv VBoxGuestAdditions-amd64.tar.bz2
cd src/vboxguest-7.0.6/
for i in $(grep -Rl "KERNEL_VERSION(5," | grep -v vfsmod.c|grep -v vbox_ttm.c|grep -v vbox_drv.h ); do sed -i "s/KERNEL_VERSION(5, 0, 0)/KERNEL_VERSION(4, 18, 0)/g" $i; done
或者
sed -i "s/KERNEL_VERSION(5, 0, 0)/KERNEL_VERSION(4, 18, 0)/g vboxguest/r0drv/linux/memuserkernel-r0drv-linux.c
sed -i "s/KERNEL_VERSION(5, 0, 0)/KERNEL_VERSION(4, 18, 0)/g vboxsf/regops.c
make
make install
Q: ****V10 如何安装 docker 20.10 等最新版
由于****V10 自带的 yum 不支持 module 功能,而 docker-ce 依赖的 libslirp 、slirp4netns、fuse-overlayfs 这3个包是属于module 里面的,所以直接安装会报错。可以先通过下载以上三个包的rpm包,再进行安装。
# 1. 从 AlmaLinux 8 的仓库下载 libslirp slirp4netns fuse-overlayfs 的最新RPM包(以ARM架构为例)
/almalinux/8/AppStream/aarch64/os/Packages/fuse-overlayfs-1.9-1.module_el8.6.0+3070+1510fbd1.aarch64.rpm
/almalinux/8/AppStream/aarch64/os/Packages/slirp4netns-1.2.0-2.module_el8.6.0+3070+1510fbd1.aarch64.rpm
/almalinux/8/AppStream/aarch64/os/Packages/libslirp-4.4.0-1.module_el8.6.0+2878+e681bc44.aarch64.rpm
/almalinux/8/AppStream/x86_64/os/Packages/fuse-overlayfs-1.9-1.module_el8.7.0+3407+95aa0ca9.x86_64.rpm \
/almalinux/8/AppStream/x86_64/os/Packages/slirp4netns-1.2.0-2.module_el8.7.0+3407+95aa0ca9.x86_64.rpm \
/almalinux/8/AppStream/x86_64/os/Packages/libslirp-4.4.0-1.module_el8.7.0+3407+95aa0ca9.x86_64.rpm
# 2. 安装 rpm 包,并安装****仓库里面的依赖 fuse3
yum remove docker-runc podman
yum install libslirp-*.rpm slirp4netns-*.rpm fuse-overlayfs-*.rpm fuse3 fuse3-help container-selinux
# 3. 安装 docker-ce,并安装****仓库里面的依赖 container-selinux libcgroup tar 。
yum install docker-ce
# 解决报错 nothing provides module(platform:el8) needed by module container-tools:rhel8:8060020220516071747:20125149-0.x86_64
dnf -y module disable container-tools
# 回滚
yum remove fuse-overlayfs libslirp slirp4netns
rpm -ql fuse-overlayfs
/usr/bin/fuse-overlayfs
/usr/lib/.build-id
/usr/lib/.build-id/63
/usr/lib/.build-id/63/276cf5f47c2c9612410aa0a97b9fb95d90d13f
/usr/lib/modules-load.d/fuse-overlayfs.conf
/usr/share/doc/fuse-overlayfs
/usr/share/doc/fuse-overlayfs/README.md
/usr/share/licenses/fuse-overlayfs
/usr/share/licenses/fuse-overlayfs/COPYING
/usr/share/man/man1/fuse-overlayfs.1.gz
安装 static 版本的 docker-ce ,fuse-overlayfs 等依赖文件可以从 nerdctl-full 包获取。
yum install fuse3
/docker-ce/linux/static/stable/x86_64/docker-24.0.1.tgz https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-rootless-extras-24.0.1.tgz
wget -c https://github.com/containers/crun/releases/download/1.8.4/crun-1.8.4-linux-amd64
cp /usr/local/lib/systemd/system/* /lib/systemd/system/
tar zxfv docker-24.0.1.tgz -C /usr/local/bin/ --strip-components=1
tar zxfv docker-rootless-extras-24.0.1.tgz -C /usr/local/bin/ --strip-components=1
tar zxfv nerdctl-full-1.4.0-linux-amd64.tar.gz -C /usr/local/
cp /usr/local/lib/systemd/system/* /etc/systemd/system
cat > /etc/systemd/system/docker.service <<-EOF
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target docker.socket firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket containerd.service
[Service]
Type=notify
ExecStart=/usr/local/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --live-restore --exec-opt native.cgroupdriver=systemd --log-opt max-size=100m
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
OOMScoreAdjust=-500
[Install]
WantedBy=multi-user.target
EOF
cat > /lib/systemd/system/docker.socket <<-EOF
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target
EOF
getent group docker || groupadd docker
systemctl daemon-reload
systemctl start containerd.service buildkit.service stargz-snapshotter.service docker
Q: 安装 docker-ce 20.10 版本后,无法启动.
docker run -ti almalinux:8 bash
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: container_linux.go:318: starting container process caused "permission denied": unknown.
ERRO[0001] error waiting for container: context canceled
A: 卸载默认的 podman 就好了
[root@localhost ~]# yum remove podman
Detection of Platform Module failed: No valid Platform ID detected
Modular dependency problem:
Problem: conflicting requests
- nothing provides module(platform:el8) needed by module container-tools:rhel8:8060020220516071747:20125149-0.x86_64
Dependencies resolved.
============================================================================================================================================================================================================
Package Architecture Version Repository Size
============================================================================================================================================================================================================
Removing:
podman x86_64 1:0.10.1-8.ky10 @ks10-adv-updates 28 M
Removing unused dependencies:
conmon x86_64 2:2.0.2-2.ky10 @anaconda 155 k
containernetworking-plugins x86_64 0.8.6-4.git40b4237.ky10 @anaconda 71 M
containers-common x86_64 1:1.1.0-3.dev.git63085f5.ky10 @anaconda 1.1 k
docker-runc x86_64 1.0.0.rc3-201.p01.ky10 @ks10-adv-updates 8.4 M
Transaction Summary
============================================================================================================================================================================================================
Remove 5 Packages
Freed space: 107 M
Is this ok [y/N]: y
docker run -ti almalinux:8 bash
可以正常运行
Q: docker run -ti almalinux:9 bash
Fatal glibc error: CPU does not support x86-64-v2
A: RHEL 9 需要 x86-64-v2,virtualbox 6 不支持。 virtualbox 7 支持。
Q:****高级服务器操作系统V10如何进入单用户模式?
A:
1)启动到选择操作系统的界面,在此界面按“e”进入编辑模式。担心手慢的,可以多按几次向下的按键。
2)找到“linux” 或 ”linuxefi“ 行,在末尾输入rw init=/bin/bash
,按Ctrl+x进入单用户模式
quite rw init=/bin/bash
3)有的系统版本在第一步按”e“后,需要输入指定的用户名和密码才可以进入编辑模式,其他步骤与1,2步一样. 用户名:root 密码:Kylin123123
Enter Username:
root
Enter password:
Kylin123123
4)运行 passwd root
修改 root 密码,也可以根据需要执行关闭防火墙等操作。
5)修改完成后,从单用户模式重启服务器须执行【/usr/sbin/reboot -f】
kylin local repo sync
# cat /data/repo/ky10-repo.sh
mkdir -p /data/repo/ky10 /data/repo/ky10.aarch64 /data/repo/ky10.x86_64
reposync -n --repoid=ky10-adv-base-x86_64 --norepopath -p /data/repo/ky10.x86_64
reposync -n --repoid=ky10-adv-updates-x86_64 --norepopath -p /data/repo/ky10.x86_64
reposync -n --repoid=ky10-adv-base-aarch64 --norepopath -p /data/repo/ky10.aarch64
reposync -n --repoid=ky10-adv-updates-aarch64 --norepopath -p /data/repo/ky10.aarch64
# --newest-only
cat > /etc/yum.repos.d/kylin10.repo <<-"EOF"
[ky10-adv-updates-aarch64]
name = Kylin Linux Advanced Server 10 - Updates
baseurl = https://update.cs2c.com.cn/NS/V10/V10SP3-2403/os/adv/lic/updates/aarch64/
gpgcheck = 0
enabled = 0
exclude=texlive* golang* dotnet* eclipse* java* libreoffice*
[ky10-adv-updates-x86_64]
name = Kylin Linux Advanced Server 10 - Updates
baseurl = https://update.cs2c.com.cn/NS/V10/V10SP3-2403/os/adv/lic/updates/x86_64/
gpgcheck = 0
enabled = 0
exclude=texlive* golang* dotnet* eclipse* java* libreoffice*
[ky10-adv-base-aarch64]
name = Kylin Linux Advanced Server 10 - Base
baseurl = https://update.cs2c.com.cn/NS/V10/V10SP3-2403/os/adv/lic/base/aarch64/
gpgcheck = 0
enabled = 0
exclude=texlive* golang* dotnet* eclipse* java* libreoffice*
[ky10-adv-base-x86_64]
name = Kylin Linux Advanced Server 10 - Base
baseurl = https://update.cs2c.com.cn/NS/V10/V10SP3-2403/os/adv/lic/base/x86_64/
gpgcheck = 0
enabled = 0
exclude=texlive* golang* dotnet* eclipse* java* libreoffice*
EOF
cd /data/repo/ky10.x86_64/
createrepo .
chmod 755 -Rv repodata/
xorriso -as mkisofs -V 'KY10-SP3-amd64' -J -o ../KY10-SP3-20240606-amd64.iso .
cd /data/repo/ky10.aarch64
createrepo .
chmod 755 -Rv repodata/
xorriso -as mkisofs -V 'KY10-SP3-arm64' -J -o ../KY10-SP3-20240606-arm64.iso .
xorriso -as mkisofs -V 'KY10-SP3-amd64' -J -o ../KY10-SP3-20240606.iso .
xorriso -as mkisofs -V 'KY10-SP1' -J -o ../KY10-SP1-20230606.iso .
xorriso -as mkisofs -V 'KY10-SP2' -J -o ../KY10-SP2-20230606.iso .
xorriso -as mkisofs -V 'KY10-SP3' -J -o ../KY10-SP3-20230606.iso .
# 安装 microdnf 3.4.0 ~ 3.8.0 来替代 dnf,减少****的系统大小。