Skip to content

Instantly share code, notes, and snippets.

@fabiomontefuscolo
Created January 13, 2020 04:12
Show Gist options
  • Save fabiomontefuscolo/82ffd5ebe3e423d365d0d0846f7fe03b to your computer and use it in GitHub Desktop.
Save fabiomontefuscolo/82ffd5ebe3e423d365d0d0846f7fe03b to your computer and use it in GitHub Desktop.
From CentOS 7 to ClearOS 7
#!/bin/bash
#
# It is based on a StackScript found in Linode.
#
#!/bin/bash
rpm -Uvh "https://mirror2-singapore.clearos.com/clearos/7/updates/x86_64/RPMS/clearos-release-7-7.3.v7.x86_64.rpm"
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ClearOS-7
yum --enablerepo=* clean all
yum --enablerepo=clearos-centos,clearos-centos-updates -y --nogpgcheck install \
app-accounts \
app-base \
app-configuration-backup \
app-date \
app-dns \
app-edition \
app-events \
app-groups \
app-incoming-firewall \
app-language \
app-log-viewer \
app-mail \
app-marketplace \
app-process-viewer \
app-software-updates \
app-ssh-server \
app-support \
app-user-profile \
app-users
/bin/systemctl stop webconfig
yum -y remove NetworkManager
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<'EOF'
DEVICE=eth0
TYPE="Ethernet"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="dhcp"
PEERDNS="no"
EOF
cat > /etc/resolv-peerdns.conf <<'EOF'
nameserver 8.8.8.8
nameserver 8.8.4.4
EOF
sed -i -e 's/^GATEWAYDEV=.*/GATEWAYDEV="eth0"/' /etc/sysconfig/network
sed -i -e 's/^EXTIF=.*/EXTIF="eth0"/' /etc/clearos/network.conf
/bin/systemctl restart syswatch
yum --enablerepo=clearos-centos,clearos-centos-updates -y upgrade
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment