You’ll need to enter your serial and key but this should do the trick I believe the only thing I didn’t fix was the keyring issue I’d have to look into how to do that in the script a little further
Maybe something like:
retrieve the key and add the key :
curl -s URL | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/NAME.gpg --import
authorize the user _apt :
sudo chown _apt /etc/apt/trusted.gpg.d/NAME.gpg
dunno though for sure on that one maybe not the secure way to do things beats me.
but if you put your key there and your serial there where it says it should do those 3 things I’ve mentioned yeah not impossible.
Added in 2 or 3 more fixes I found that fix some of the errors or behavior
This is in no way or shape the legit install script for anyone reading use at your own risk Debian 12 just trying to get things running a bit better.
I put an echo and description with my nickname to easily pick out the things that are updated in the script so that the staff can pickup wherever or copy it and make it their own whatever works.
DHCP is not ISC DHCP thats why it fails. and I think it might even be migrating to something different now as well to complicate matters even further like KEA
Kea has robust support for host reservations, but it is different from ISC DHCP’s. In ISC DHCP all host reservations are global; in Kea, host reservations are by default per-subnet, although global host reservations are also supported. So those are the two avenues to take for cloudmin virtualmin so it depends what works best for the future of the software it seems like KEA is being suggested as a replacement to ISC so IDK things change fast.
Personally I’d say KEA provides more configuration so … But yeah its on the debian wiki DHCP_Server - Debian Wiki that its being framed as the replacement so could get ahead of the curve on this one.
Still Need Fix for:
Also depreciated key error fix info is here Fix apt key depreciated error but I have yet to incorporate it into the install script.
Also need to know if we are going to get ahead of the curve with KEA instead of using ISC-DHCP and having to transition later…
Update fixed perl-sha1 script no longer needed
Update fixed cgroup-bin upgraded to cgroup-tools
#!/bin/sh
# cloudmin-debian-install.sh
# Copyright 2005-2009 Virtualmin, Inc.
#
# Installs Cloudmin and all dependencies on a Debian or Ubuntu system
if [ "$SERIAL" = "" ]; then
SERIAL=DELETE THIS AND ENTER YOUR KEY HERE
fi
if [ "$KEY" = "" ]; then
KEY=DELETE THIS AND ENTER YOUR KEY HERE
fi
VER=1.1
# Define functions
yesno () {
while read line; do
case $line in
y|Y|Yes|YES|yes|yES|yEs|YeS|yeS) return 0
;;
n|N|No|NO|no|nO) return 1
;;
*)
printf "\nPlease enter y or n: "
;;
esac
done
}
# Ask the user first
cat <<EOF
***********************************************************************
* Welcome to the Cloudmin installer, version $VER *
***********************************************************************
Operating systems supported by this installer are:
Debian 4.0 or later on i386 and x86_64
Ubuntu 8.04 or later on i386 and x86_64
If your OS is not listed above, this script will fail (and attempting
to run it on an unsupported OS is not recommended, or...supported).
EOF
printf " Continue? (y/n) "
if ! yesno
then exit
fi
echo ""
# Cleanup old repo files
grep -v cloudmin.virtualmin.com /etc/apt/sources.list >/etc/apt/sources.list.clean
mv /etc/apt/sources.list.clean /etc/apt/sources.list
# Check for apt-get
echo Checking for apt-get ..
if [ ! -x /usr/bin/apt-get ]; then
echo .. not installed. The Cloudmin installer requires APT to download packages
echo ""
exit 1
fi
echo .. found OK
echo ""
# Make sure we have wget
echo "Installing wget .."
apt-get -y install wget
echo ".. done"
echo ""
# Check for wget or curl
echo "Checking for curl or wget..."
if [ -x "/usr/bin/curl" ]; then
download="/usr/bin/curl -s "
elif [ -x "/usr/bin/wget" ]; then
download="/usr/bin/wget -nv -O -"
else
echo "No web download program available: Please install curl or wget"
echo "and try again."
exit 1
fi
echo "found $download"
echo ""
# Validate licence with wget
echo Validating Cloudmin serial number and key ..
$download "http://${SERIAL}:${KEY}@cloudmin.virtualmin.com/images/images.txt" >/dev/null
if [ "$?" != 0 ]; then
echo .. license does not appear to be valid
exit 1
fi
echo .. done
echo ""
# Create Cloudmin licence file
echo Creating Cloudmin licence file ..
cat >/etc/server-manager-license <<EOF
SerialNumber=$SERIAL
LicenseKey=$KEY
EOF
chmod 600 /etc/server-manager-license
echo .. done
echo ""
# Download GPG keys
echo Downloading GPG keys for packages ..
$download "http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin" >/tmp/RPM-GPG-KEY-virtualmin
if [ "$?" != 0 ]; then
echo .. download failed
exit 1
fi
$download "http://software.virtualmin.com/lib/RPM-GPG-KEY-webmin" >/tmp/RPM-GPG-KEY-webmin
if [ "$?" != 0 ]; then
echo .. download failed
exit 1
fi
echo .. done
echo ""
# Import keys
echo Importing GPG keys ..
apt-key add /tmp/RPM-GPG-KEY-virtualmin && apt-key add /tmp/RPM-GPG-KEY-webmin
if [ "$?" != 0 ]; then
echo .. import failed
exit 1
fi
echo .. done
echo ""
# Setup the APT sources file
echo Creating APT repository for Cloudmin packages ..
cat >>/etc/apt/sources.list <<EOF
deb http://$SERIAL:$KEY@cloudmin.virtualmin.com/debian binary/
EOF
apt-get update
echo .. done
echo Disabling Suspend Mode Debian 12 .. forlotto
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
echo ""
# APT install Perl, modules and other dependencies
echo Installing required Perl modules using APT ..
apt-get -y install perl openssl libio-pty-perl libio-stty-perl libnet-ssleay-perl libwww-perl libdigest-hmac-perl libxml-simple-perl libcrypt-ssleay-perl libauthen-pam-perl cron bind9 openssh-server openssh-client lsof bzip2
if [ "$?" != 0 ]; then
echo .. install failed
exit 1
fi
apt-get install -y libjson-perl
apt-get install -y bind9utils
echo fixing dhcp3 adding newly named package forlotto
echo DHCP3 replacement dont install correctly apt-get install -y isc-dhcp-server naybe if you need it
echo removed apt-get install -y libdigest-sha1-perl no longer needed SHA1 Digest Contains forlotto
echo adding qemu for kvm forlotto
apt-get install -y qemu-system
echo adding libvert for kvm forlotto
apt-get install -y libvirt-daemon-system
echo adding bridge utilities for kvm forlotto
apt-get install -y bridge-utils
echo fixing ajaxterm root shell forlotto
apt-get install -y python-is-python3
echo fixing cgroup-bin using substitute cgroup-tools forlotto
apt-get install -y cgroup-tools
echo .. done
echo ""
# APT install webmin, theme and Cloudmin
echo Installing Cloudmin packages using APT ..
apt-get -y install webmin
apt-get -y install webmin-server-manager webmin-virtual-server-theme
if [ "$?" != 0 ]; then
echo .. install failed
exit 1
fi
apt-get -y install webmin-cloudmin-services
echo .. done
echo ""
# Configure Webmin to use theme
echo Configuring Webmin ..
grep -v "^preroot=" /etc/webmin/miniserv.conf >/tmp/miniserv.conf.$$
echo preroot=authentic-theme >>/tmp/miniserv.conf.$$
cat /tmp/miniserv.conf.$$ >/etc/webmin/miniserv.conf
rm -f /tmp/miniserv.conf.$$
grep -v "^theme=" /etc/webmin/config >/tmp/config.$$
echo theme=authentic-theme >>/tmp/config.$$
cat /tmp/config.$$ >/etc/webmin/config
rm -f /tmp/config.$$
/etc/webmin/restart
echo .. done
echo ""
# Setup BIND zone for virtual systems
basezone=`hostname -d`
if [ "$basezone" = "" ]; then
basezone=example.com
fi
zone="cloudmin.$basezone"
echo Creating DNS zone $zone ..
/usr/share/webmin/server-manager/setup-bind-zone.pl --zone $zone --auto-view
if [ "$?" != 0 ]; then
echo .. failed
else
echo xen_zone=$zone >>/etc/webmin/server-manager/config
echo kvm_zone=$zone >>/etc/webmin/server-manager/config
echo citrix_zone=$zone >>/etc/webmin/server-manager/config
echo openvz_zone=$zone >>/etc/webmin/server-manager/config
echo lxc_zone=$zone >>/etc/webmin/server-manager/config
echo vserver_zone=$zone >>/etc/webmin/server-manager/config
echo zone_zone=$zone >>/etc/webmin/server-manager/config
echo .. done
fi
echo ""
# Open Webmin firewall port
echo Opening port 10000 on host firewall ..
/usr/share/webmin/firewall/open-ports.pl 10000 10001 10002 10003 10004 10005 843
if [ "$?" != 0 ]; then
echo .. failed
else
echo .. done
fi
echo ""
# Tell user
hostname=`hostname`
echo Cloudmin has been successfully installed. You can login to it at :
echo https://$hostname:10000/
# All done!
@Jamie
@llia
@Joe