首页
归档
时光轴
推荐
Cloud
图床
导航
Search
1
Deploy OpenStack offline based on Kolla
1,228 阅读
2
Typecho 1.2.0 部署
965 阅读
3
openstact 基础环境安装 (手动版)
949 阅读
4
Mariadb 主从复制&读写分离
878 阅读
5
FusionCompute8.0 体验
846 阅读
Python
Linux
随笔
mysql
openstack
Search
标签搜索
linux
Pike
python
爬虫
openstack
mysql
Essay
Ansible
docker
Zabbix
kolla
pxe
sh
自动化
Kickstart
jenkins
Hyper-V
1+X
Redis
Internet
Acha
累计撰写
77
篇文章
累计收到
1
条评论
首页
栏目
Python
Linux
随笔
mysql
openstack
页面
归档
时光轴
推荐
Cloud
图床
导航
搜索到
28
篇与
的结果
2024-06-13
ipxe autoinstall debian12.4
ipxe autoinstall debian12.4 配置文件 目录结构 使用镜像源 mount -o loop /root/debian-12.4.0-amd64-DVD-1.iso /var/www/html/debian/ initrd.gz、linux # /var/www/html [root@localhost html]# tree -L 2 . ├── debian ├── ipxe │ ├── boot.ipxe │ ├── initrd.gz │ ├── ipxe.efi │ ├── linux │ └── undionly.kpxe └── preseed.cfg initrd.gz 改动 添加 scsi-modules https://mirrors.tuna.tsinghua.edu.cn/debian/pool/main/l/linux-signed-amd64/scsi-modules-6.1.0-15-amd64-di_6.1.69-1_amd64.udeb 修改 /usr/share/debconf/confmodule # 第四行添加 忽略源gpg报错 [ -f /usr/lib/apt-setup/generators/50mirror ] && \ sed -i 's/trusted=""/trusted="[trusted=yes] "/g' /usr/lib/apt-setup/generators/50mirror boot.ipxe #!ipxe kernel http://192.168.1.11/ipxe/linux vga=788 auto=true priority=critical preseed/url=http://192.168.1.11/preseed.cfg initrd http://192.168.1.11/ipxe/initrd.gz boot preseed.cfg ### 本地化 # 语言 d-i debian-installer/locale string en_US ### 键盘 d-i keyboard-configuration/xkb-keymap select us ### 网络 d-i netcfg/choose_interface select auto d-i netcfg/enable boolean true ### Mirror d-i mirror/country string manual d-i mirror/http/hostname string 192.168.1.11 d-i mirror/http/directory string /debian d-i mirror/http/proxy string ### Account setup d-i passwd/root-login boolean false d-i passwd/user-fullname string user d-i passwd/username string user d-i passwd/user-password password 123 d-i passwd/user-password-again password 123 ### 时区 d-i clock-setup/utc boolean true d-i time/zone string Asia/Shanghai d-i clock-setup/ntp boolean true ### 分区 d-i partman-auto/disk string /dev/sda d-i partman-auto/method string regular d-i partman-lvm/device_remove_lvm boolean true d-i partman-md/device_remove_md boolean true d-i partman-auto/choose_recipe select atomic d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true ### Apt setup d-i apt-setup/non-free boolean false d-i apt-setup/contrib boolean false d-i apt-setup/services-select multiselect main d-i debian-installer/allow_unauthenticated boolean true ### Package selection tasksel tasksel/first multiselect standard cinnamon-desktop # 选择桌面环境 d-i pkgsel/upgrade select none d-i pkgsel/language-packs multiselect en, zh d-i pkgsel/update-policy select none # d-i pkgsel/include string nano ### Boot loader installation d-i grub-installer/only_debian boolean true d-i grub-installer/bootdev string default ### Finishing up the installation d-i finish-install/keep-consoles boolean true dnsmasq 安装 yum install -y dnsmasq httpd 配置 dnsmasq.conf [root@localhost html]# grep -Ev '^#|^$' /etc/dnsmasq.conf conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig bind-interfaces dhcp-range=192.168.1.200,192.168.1.250,255.255.255.0,8h dhcp-option=option:router,192.168.1.2 dhcp-option=option:dns-server,223.5.5.5,223.6.6.6 enable-tftp tftp-root=/var/www/html/ipxe dhcp-match=set:bios,option:client-arch,0 dhcp-match=set:ipxe,175 dhcp-boot=tag:!ipxe,tag:bios,undionly.kpxe dhcp-boot=tag:!ipxe,tag:!bios,ipxe.efi dhcp-boot=tag:ipxe,boot.ipxe httpd rm /etc/httpd/conf.d/welcome.conf 添加配置文件 1. 上传 ipxe-debian12.4.tar.xz 2. 解压 tar xf ipxe-debian12.4.tar.xz -C /var/www/html 3. 修改 ip [root@localhost html]# grep -r 192.168.1.11 . ./ipxe/boot.ipxe:kernel http://192.168.1.11/ipxe/linux vga=788 auto=true priority=critical preseed/url=http://192.168.1.11/preseed.cfg ./ipxe/boot.ipxe:initrd http://192.168.1.11/ipxe/initrd.gz ./preseed.cfg:d-i mirror/http/hostname string 192.168.1.11 启动 systemctl start httpd systemctl start dnsmasq
2024年06月13日
404 阅读
0 评论
0 点赞
2023-09-25
makeself 制作 run包
makeself.sh 1. 安装 [root@thinkpad-e490 ~]# wget https://github.com/megastep/makeself/archive/refs/tags/release-2.4.5.zip [root@thinkpad-e490 ~]# unzip release-2.4.5.zip [root@thinkpad-e490 ~]# ls makeself-release-2.4.5 COPYING make-release.sh makeself-2.4.5 makeself.lsm README.md run-tests.sh VERSION Makefile makeself.1 makeself-header.sh makeself.sh release test [root@thinkpad-e490 ~]# cp makeself-release-2.4.5/makeself.sh /usr/bin/ 2. 使用 示例 makeself.sh [args] archive_dir file_name label startup_script [script_args] makeself --nox11 --nowait --bzip2 --base64 update-os/ update-os.run 'update os.' ./install.sh 参数 参数 参数使用说明 --version 打印版本号 --needroot 需要root用户才可以执行 --gzip 默认使用gzip工具进行压缩 --pigz gzip的多线程解决方案 --bzip2 使用bzip2代替gzip进行更好的压缩 --pbzip2 bzip2的多线程解决方案 --xz 使用xz代替gzip进行更好的压缩(远程支持多线程压缩) --zstd 使用zstd代替gzip进行更好的压缩 --threads thds 限制支持多线程解压缩工具所使用的线程数量 --base64 用Base64格式将存档编码为ASCII格式而不进行压缩 --gpg-encrypt 使用gpg -ac -z $COMPRESS_LEVEL加密归档文件,需要输入密码 --ssl-encrypt 使用openssl aes-256-cbc -a -salt加密归档文件,需要输入密码 --ssl-passwd pass 设置openssl加密归档文件需要输入的密码 --compress 使用UNIX系统的compress`命令压缩数据(在没有 gzip 时默认) --nocomp 不对存档文件进行压缩,默认是一个tar包 --complevel lvl 指定压缩级别,默认使用9级别 --notemp 生成的归档文件不会将文件解压缩到临时目录,而解压到当前目录的创建的新目录中 --current 文件将被提取到当前目录,而不是子目录中(同--notemp一样,但会提取没有文件夹) --follow 存储指向的文件而不是链接本身 --append file 将数据追加到现有存档中,而不是创建新文件 --header file 使用指定的脚本来代替默认的makeself-header.sh文件(默认与makeself文件同级) --cleanup file 指定在执行中断或成功完成时运行的脚本 --nomd5/--nocrc 禁止检查存档文件的MD5或CRC校验和 --tar-extra opt 在tar命令行中附加更多选项 --keep-umask 保持umask设置为shell默认值,而不是在执行自解压缩存档时覆盖 --packaging-date date 使用提供的字符串作为打包日期而不是当前日期 --license 附加许可证文件 --nooverwrite 如果指定的目标目录已经存在则不要解压缩存档 --header file 指定头部信息脚本文件的位置,默认为makeself-header.sh文件 --help-header file 在存档的--help输出中添加标题 --export-conf 将配置变量导出到startup_script脚本中 --nox11 禁用 xterm 的自动生成 --nowait 执行后不要等待用户输入 --noprogress 解压期间不显示进度
2023年09月25日
582 阅读
0 评论
0 点赞
2023-09-25
修改 deb 软件包
重新编译 deb TIPS: 使用 src源 对应 os 1、添加 src 源 # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware apt-get clean all apt update 2、安装编译环境 apt-get install dpkg-dev devscripts build-essential 3、编译 # 创建 文件夹 mkdir nginx cd nginx # 下载源码包 apt-get source nginx # 修改 源码、编译参数 ... # 提交修改 dpkg-buildpackage commit # 编译 dpkg-buildpackage -us -uc # 清理 dpkg-buildpackage -rfakeroot -Tclean
2023年09月25日
365 阅读
0 评论
0 点赞
2023-07-26
安装 Arch Linux
Arch Linux 1、获取镜像 http://mirrors.163.com/archlinux/iso/latest/ 2、安装前的准备 准备安装介质 启动到 Live 环境 验证引导模式 连接到互联网 更新系统时间 硬盘分区 格式化分区 挂载分区 # 验证引导模式 root@archiso ~ # [ -d /sys/firmware/efi/efivars/ ] && echo "Uefi" || echo "Bios" Uefi 磁盘 Uefi 磁盘分区选 GPT Bios 磁盘分区选 MBR grub 引导 # 获取 IP root@archiso ~ # ip addr | awk '/inet / {print $2}' | grep -v "127.0.0.1/8" 10.52.17.32/24 root@archiso ~ # ping www.baidu.com -c 2 PING www.a.shifen.com (36.152.44.96) 56(84) bytes of data. 64 bytes from 36.152.44.96 (36.152.44.96): icmp_seq=1 ttl=57 time=6.32 ms 64 bytes from 36.152.44.96 (36.152.44.96): icmp_seq=2 ttl=57 time=6.75 ms --- www.a.shifen.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 5135ms rtt min/avg/max/mdev = 6.319/6.532/6.745/0.213 ms root@archiso ~ # timedatectl set-timezone Asia/Shanghai root@archiso ~ # timedatectl status Local time: Tue 2023-04-04 13:16:06 CST Universal time: Tue 2023-04-04 05:16:06 UTC RTC time: Tue 2023-04-04 05:16:06 Time zone: Asia/Shanghai (CST, +0800) System clock synchronized: yes NTP service: active RTC in local TZ: no {collapse} {collapse-item label="分区" close} root@archiso ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 687.9M 1 loop /run/archiso/airootfs sda 8:0 0 149.1G 0 disk ├─sda1 8:1 0 149G 0 part │ └─ventoy 254:0 0 809.3M 1 dm └─sda2 8:2 0 32M 0 part mmcblk0 179:0 0 115.3G 0 disk ├─mmcblk0p1 179:1 0 500M 0 part ├─mmcblk0p2 179:2 0 2G 0 part └─mmcblk0p3 179:3 0 112.8G 0 part mmcblk0boot0 179:8 0 4M 1 disk mmcblk0boot1 179:16 0 4M 1 disk root@archiso ~ # fdisk /dev/mmcblk0 Welcome to fdisk (util-linux 2.38.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/mmcblk0: 115.25 GiB, 123748745216 bytes, 241696768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x4746e965 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 2048 1026047 1024000 500M ef EFI (FAT-12/16/32) /dev/mmcblk0p2 1026048 5220351 4194304 2G 82 Linux swap / Solaris /dev/mmcblk0p3 5220352 241696767 236476416 112.8G 83 Linux Command (m for help): d Partition number (1-3, default 3): Partition 3 has been deleted. Command (m for help): d Partition number (1,2, default 2): Partition 2 has been deleted. Command (m for help): d Selected partition 1 Partition 1 has been deleted. Command (m for help): p Disk /dev/mmcblk0: 115.25 GiB, 123748745216 bytes, 241696768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x4746e965 Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): First sector (2048-241696767, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-241696767, default 241696767): +1G Created a new partition 1 of type 'Linux' and of size 1 GiB. Partition #1 contains a vfat signature. Do you want to remove the signature? [Y]es/[N]o: y The signature will be removed by a write command. Command (m for help): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (2-4, default 2): First sector (2099200-241696767, default 2099200): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2099200-241696767, default 241696767): +2G Created a new partition 2 of type 'Linux' and of size 2 GiB. Command (m for help): n Partition type p primary (2 primary, 0 extended, 2 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (3,4, default 3): First sector (6293504-241696767, default 6293504): Last sector, +/-sectors or +/-size{K,M,G,T,P} (6293504-241696767, default 241696767): Created a new partition 3 of type 'Linux' and of size 112.2 GiB. Command (m for help): p Disk /dev/mmcblk0: 115.25 GiB, 123748745216 bytes, 241696768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x4746e965 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 2048 2099199 2097152 1G 83 Linux /dev/mmcblk0p2 2099200 6293503 4