2021年12月28日 星期二

自訂 Proxmox 7.x LXC template Oracle 8.x

#!/bin/bash

dst=/d1;
file0=/root/xx.tar.gz;
rpm="NetworkManager NetworkManager-libnm acl audit-libs basesystem bash bind-export-libs brotli bzip2-libs ca-certificates  chkconfig coreutils coreutils-common cracklib cracklib-dicts cronie cronie-noanacron crontabs crypto-policies cryptsetup-libs curl cyrus-sasl-lib dbus dbus-common dbus-daemon dbus-libs dbus-tools device-mapper device-mapper-libs dhcp-client dhcp-common dhcp-libs diffutils dnf dnf-data elfutils-debuginfod-client elfutils-default-yama-scope elfutils-libelf elfutils-libs expat file-libs filesystem findutils gawk gdbm gdbm-libs geolite2-city geolite2-country glib2 glibc glibc-all-langpacks glibc-common gmp gnupg2 gnupg2-smime gnutls gpg-pubkey gpgme grep gzip ima-evm-utils info initscripts ipcalc iproute iptables-libs iputils json-c keyutils-libs kmod-libs krb5-libs libacl libarchive libassuan libattr libblkid libcap libcap-ng libcom_err libcomps libcurl libdb libdb-utils libdnf libedit libestr libfastjson libfdisk libffi libgcc libgcrypt libgpg-error libidn2 libksba libmaxminddb libmetalink libmnl libmodulemd libmount libndp libnghttp2 libnsl2 libpcap libpsl libpwquality librepo libreport-filesystem libseccomp libselinux libselinux-utils libsemanage libsepol libsigsegv libsmartcols libsolv libssh libssh-config libstdc++ libtasn1 libtirpc libunistring libusbx libuser libutempter libuuid libverto libxcrypt libxml2 libyaml libzstd logrotate lua-libs lz4-libs mpfr ncurses ncurses-base ncurses-libs nettle npth openldap openssh openssh-clients openssh-server openssl openssl-libs openssl-pkcs11 p11-kit p11-kit-trust pam passwd pcre pcre2 platform-python platform-python-pip platform-python-setuptools policycoreutils popt procps-ng publicsuffix-list-dafsa python3-dnf python3-gpg python3-hawkey python3-libcomps python3-libdnf python3-libs python3-pip-wheel python3-rpm python3-setuptools-wheel readline rootfiles rpm rpm-build-libs rpm-libs rpm-plugin-systemd-inhibit rsyslog sed setup shadow-utils shared-mime-info sqlite-libs systemd systemd-libs systemd-pam trousers trousers-lib tzdata util-linux vim-minimal xz-libs yum zlib "

yum install -y --installroot ${dst} --releasever=8 oraclelinux-release;
cd $dst;
/usr/bin/cp -rpf /etc/yum.repos.d /etc/yum /etc/dnf/ ./etc/;
for i in $rpm;do 
yum install -y --installroot ${dst} --releasever=8 $i;
done;
:>${dst}/etc/sysconfig/network;
tar czvf ${file0} ./;
cd -;

沒有留言: