第一部分
系统下载,启动盘制作,系统安装
- 系统下载
FT-2000 V2 CPU 麒麟推荐的操作系统链接: https://pan.baidu.com/s/1ZHuHoZ5llr7rtnOs1O60oQ 提取码: 9uw6 - 启动盘制作
下载制作启动盘工具,复制该系统镜像至启动盘。 - 系统安装
开机选启动盘,选择该系统镜像进行安装。
常用设置介绍
- 安全设置
- 网络设置
系统备份还原功能介绍
- Ghost系统备份
disk> to image > 选择备份磁盘 > 选择备份路径
- Ghost系统还原
disk > from image > 选择还原磁盘 > 选择还原镜像
第二部分
如何打开已有的自启服务
- 创建rc.local文件 //新系统中有rc-local.service,但不存在rc.local文件需创建。
touch /etc/rc.local echo "#!/bin/bash" > /etc/rc.local
- 写入自启动命令
- 打开自启动服务
systemtcl enable rc-local.service
如何在关机前执行某脚本
- 创建关机前执行脚本
cat > /lib/systemd/system-shutdown/xxx.sh << EOF #!/bin/bash case "$temp" in 'start') ;; 'stop') xxx ;; *) ;; esac EOF
- 创建关机前启动服务
cat > /lib/systemd/system/shutdownbefore.service << EOF [Unit] Description=Run command at shutdown # 假设要执行的命令依赖网络 Requires=network.target DefaultDependencies=no Conflicts=reboot.target Before=shutdown.target [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/true ExecStop=/bin/bash /lib/systemd/system-shutdown/xxx.sh stop [Install] //新系统的.service没有[Install]这一部分。新系统会在文件/etc/rc.local存在的前提下,自动进入多用户模式。如下图。 WantedBy=multi-user.target EOF
- 打开关机前启动服务
systemctl daemon-reload //重新加载systemd配置 systemctl enable shutdownbefore.service
如何添加自动重启脚本
重启脚本写入/etc/rc.local