* Thu Sep 25 2025 Jean-Philippe Pialasse <jpp@koozali.org> 8.11.1-1.sme

- first release for Rocky 8 SME 11
This commit is contained in:
2025-09-25 14:30:17 -04:00
parent 188e454f80
commit 1548998d1c
40 changed files with 1297 additions and 403 deletions

View File

@@ -1,17 +1,17 @@
#!/bin/bash
echo "Welcome to the CentOS to SME Server script. Are you sure you have at least one ethernet interface before proceeding ? Hit Ctrl+C if unsure, press 'enter' if you are OK to proceed."
echo "Welcome to the Rocky Linux to Koozali SME Server script. Are you sure you have at least one ethernet interface before proceeding ? Hit Ctrl+C if unsure, press 'enter' if you are OK to proceed."
read testme
echo "disabling and removing SELinux"
sed -i -e 's/rhgb quiet/selinux=0/g' /boot/grub2/grub.cfg
sed -i -e 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
yum remove selinux-policy-targeted -y 1>/dev/null
dnf remove selinux-policy-targeted -y 1>/dev/null
echo "##########################################################################"
echo "setting yum repo for SME Server"
echo "setting dnf repo for SME Server"
mkdir -p /tmp/repo.bak
mv /etc/yum.repos.d/*.repo /tmp/repo.bak/
cp /etc/yum.prosmerepos.d/* /etc/yum.repos.d/
@@ -19,68 +19,55 @@ cp /etc/yum.prosmerepos.d/* /etc/yum.repos.d/
echo "##########################################################################"
echo "importing rpm gpg keys"
#yum install wget -y 1>/dev/null
for i in $( ls /usr/share/doc/smeserver-centos2sme/keys ); do
rpm --import /usr/share/doc/smeserver-centos2sme/keys/$i
for i in $( ls /usr/share/doc/smeserver-rocky2sme/keys ); do
rpm --import /usr/share/doc/smeserver-rocky2sme/keys/$i
done
echo "##########################################################################"
echo "cleaning yum cache"
yum --enablerepo=* clean all 1>/dev/null
#echo "##########################################################################"
#echo "Removing dhcp-common"
# from https://forums.contribs.org/index.php/topic,53304.msg276453/topicseen.html#msg276453
# Stefano found deps issues
#rpm -e --nodeps dhcp-common
echo "cleaning dnf cache"
dnf --enablerepo=* clean all 1>/dev/null
echo "##########################################################################"
echo "yum upgrade to install last updates, this may take a while, output is hidden unless there is an error, be patient:"
#echo "****log noise is expected about modified RPMDB outside of yum. and missing dhcp-common. That is expected.****"
echo "dnf upgrade to install last updates, this may take a while, output is hidden unless there is an error, be patient:"
yum upgrade -y 1>/dev/null
# they might have come back with upgrade...
rm /etc/yum.repos.d/CentOS*.repo -rf
rm /etc/yum.repos.d/Rocky*.repo -rf
echo "##########################################################################"
echo "cleaning rpm not necessary or possibly conflicting: postfix, sendmail"
yum remove sendmail postfix -y 1>/dev/null
# would make a test here to check if initscript was updated or not ...
echo "##########################################################################"
echo "yum groupinstall, installing SME Server ... this may take a while:"
yum --disablerepo=* --enablerepo=smeos,smeupdates groupinstall base -y
echo "dnf set modules:"
dnf module switch-to php:remi-8.4 -y
dnf module switch-to mariadb:10.5 -y
dnf module switch-to python36:3.6 -y
dnf module enable redis:remi-7.2 -y
dnf module enable httpd:2.4 -y
echo "##########################################################################"
echo "add missing rpms, in case "
yum install net-tools bind-utils vim-common vim-enhanced vim-filesystem wget yum-plugin-changelog wodim yum-cron zip traceroute tokyocabinet tmpwatch time telnet tdb-tools tcpdump sysfsutils syslinux strace setserial rsync rp-pppoe redhat-rpm-config unzip urlview usbutils usermode at bc boost-iostreams boost-random bzip2 cyrus-sasl cyrus-sasl-md5 device-mapper-multipath device-mapper-multipath-libs dwz ed elfutils fetchmail ftp gdb glib hdparm hesiod iptraf-ng iptstate iscsi-initiator-utils iscsi-initiator-utils-iscsiuio isdn4k-util librados2 lm_sensors lockdev logwatch lrzsz lsof mhash minicom mkbootdisk mlocate mtools mt-st mutt OpenIPMI OpenIPMI-libs OpenIPMI-modalias patch perl-srpm-macros perl-Sys-CPU perl-Sys-MemInfo perl-Thread-Queue psmisc python-dateutil python-srpm-macros redhat-rpm-config rpm-build isdn4k-utils qmail -y 1>/dev/null
echo "##########################################################################"
echo "removing unwanted rpm, in case "
yum remove snappy selinux-policy wpa_supplicant virt-what tuned centos-logos chrony dracut-config-rescue dracut-network ebtables ethtool expect firewalld firewalld-filesystem fxload gobject-introspection iprutils ipset ipset-libs polkit-pkla-compat -y 1>/dev/null
echo "dnf install, installing SME Server ... this may take a while:"
dnf install @smeserver -y
# check
if [[ -f /sbin/e-smith/console ]]; then
echo "... all seems good untill now"
else
echo "... exiting something is missing, try again yum --disablerepo=* --enablerepo=smeos,smeupdates groupinstall base -y"
echo "... exiting something is missing, try again dnf --disablerepo=* --enablerepo=smeos install @smeserver -y"
exit 1
fi
echo "##########################################################################"
echo "yum upgrade"
yum upgrade -y 1>/dev/null
echo "dnf upgrade"
dnf upgrade -y 1>/dev/null
echo "##########################################################################"
echo "starting runit, so we can run a few services"
/etc/runit/2 &
/usr/bin/systemctl restart runit.service
echo "##########################################################################"
echo "cleaning /var/service/"
find /var/service/ -type f -iname control -exec rm {} \;
echo "##########################################################################"
echo "start syslog"
#/etc/init.d/rsyslog start
echo "starting syslog"
/usr/bin/systemctl restart rsyslog
echo "##########################################################################"
@@ -90,7 +77,7 @@ unlink /etc/e-smith/events/post-install/S10init-passwords
/sbin/e-smith/signal-event post-install
echo "##########################################################################"
echo "set admin password as set"
echo "set admin password as set, to avoid locking you on reboot"
#need syslog to work. so just in case
#/etc/init.d/rsyslog restart
/usr/bin/systemctl restart rsyslog
@@ -103,6 +90,8 @@ echo "... as we copy your current root password as admin password"
grep $USER /etc/shadow | cut -f 2 -d ':'>/tmp/encrypted
usermod -p $(cat /tmp/encrypted) admin
rm /tmp/encrypted -f
echo "... if access to server manager fails with admin, log to cli as root and do :"
echo "passwd admin"
# to test, there is chances it is salted, alternatively
# echo "Please give now the password for the created admin user :"
# passwd admin
@@ -115,14 +104,13 @@ echo "##########################################################################
echo "force quota check"
touch /forcequotacheck
#start rsyslogd service in case , as console needs it to run...
#/etc/init.d/rsyslog restart
#restart rsyslogd service in case , as console needs it to run...
echo "##########################################################################"
echo "retarting syslog"
/usr/bin/systemctl restart rsyslog.service
echo "##########################################################################"
echo "now time to configure your server using the SME Server console"
# maybe improve here to launch the configure this server directly
#/sbin/e-smith/console
/usr/bin/perl -Mesmith::console -Mesmith::console::configure -e "esmith::console::configure->new->doit(esmith::console->new,esmith::ConfigDB->open)"
echo "##########################################################################"
@@ -151,8 +139,6 @@ echo "##########################################################################
echo "Last cleaning:"
# last tidying
find /var/service/ -type f -iname control -exec rm {} \;
yum remove NetworkManager-libnm libteam teamd python-configobj parted python-decorator python-linux-procf python-perf python-pyude python-schedutils python-slip python-slip-dbu mozjs17 microcode_ctl -y
# just in case before reboot
/sbin/e-smith/db configuration set PasswordSet yes