原文链接:华为L410上制作离线安装软件模板02
hello,大家好啊,今天给大家带来第二篇在内网搭建Apache服务器,用于安装完内网操作系统后,在第一次开机时候,为系统安装软件的文章,今天给大家介绍在客户端配置模板的内容。
1、制作镜像模板,开启rc.local
root@pdsyw-pc:~# ln -fs /lib/systemd/system/rc-local.service /etc/systemd/system/rc-local.service
root@pdsyw-pc:~#
root@pdsyw-pc:~# cat > /etc/rc.local <<EOF
#!/bin/bash
sh /wechat/install.sh
systemctl disable rc-local.service
rm -rf /etc/systemd/system/rc-local.service
rm -rf /etc/rc.local
EOF
root@pdsyw-pc:~#
root@pdsyw-pc:~# chmod +x /etc/rc.local
root@pdsyw-pc:~#
2、编辑WeChat离线安装文件
root@pdsyw-pc:~# mkdir /wechat
root@pdsyw-pc:~#
root@pdsyw-pc:~# cat > /wechat/install.sh <<EOF
#!/bin/bash
wget -P /wechat http://192.168.1.16/wechat.tar.gz
cd /wechat
tar zxvf wechat.tar.gz
dpkg -i *.deb
rm -rf /wechat
EOF
root@pdsyw-pc:~#
root@pdsyw-pc:~# chmod +x /wechat/install.sh
root@pdsyw-pc:~#
3、查看当前系统是否安装WeChat,重启系统
root@pdsyw-pc:~# apt policy kylin-kwre-wechat
kylin-kwre-wechat:
已安装:(无)
候选: 22.0.5-5.1-3.6.0
版本列表:
22.0.5-5.1-3.6.0 500
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
22.0.5-5-3.6.0 500
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
22.0.5-2-3.6.0 500
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
root@pdsyw-pc:~# reboot
4、系统启动后查看dpkg进程
pdsyw@pdsyw-pc:~/Desktop$ ps -ef | grep dpkg
dnsmasq 1408 1 0 20:02 ? 00:00:00 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service
root 3339 1213 32 20:02 ? 00:00:04 dpkg -i binfmt-support_2.2.0-2_arm64.deb gir1.2-vte-2.91_0.60.1-1kylin1_arm64.deb kylin-kwre-crossover_22.0.5-5_arm64.deb kylin-kwre-exagear_1.7-2-2870_arm64.deb kylin-kwre-wechat_22.0.5-5.1-3.6.0_arm64.deb
root 3450 3339 0 20:02 ? 00:00:00 dpkg-deb --fsys-tarfile kylin-kwre-crossover_22.0.5-5_arm64.deb
root 3451 3450 2 20:02 ? 00:00:00 dpkg-deb --fsys-tarfile kylin-kwre-crossover_22.0.5-5_arm64.deb
root 3452 3450 94 20:02 ? 00:00:12 dpkg-deb --fsys-tarfile kylin-kwre-crossover_22.0.5-5_arm64.deb
pdsyw 4147 3523 0 20:02 pts/0 00:00:00 grep --color=auto dpkg
pdsyw@pdsyw-pc:~/Desktop$
5、安装完成查看WeChat版本
pdsyw@pdsyw-pc:~/Desktop$ apt policy kylin-kwre-wechat
kylin-kwre-wechat:
已安装:22.0.5-5.1-3.6.0
候选: 22.0.5-5.1-3.6.0
版本列表:
*** 22.0.5-5.1-3.6.0 500
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
100 /var/lib/dpkg/status
22.0.5-5-3.6.0 500
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
22.0.5-2-3.6.0 500
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
500 http://archive2.kylinos.cn/deb/kylin/production/PART-10_1-kirin9a0/custom/partner/10_1-kirin9a0 default/all arm64 Packages
6、开始菜单查看WeChat
7、登录