Centos2sme
centos2sme logo | |
Maintainer | Unnilennium |
---|---|
Url | https://wiki.contribs.org |
Licence | GPL |
Category | |
Tags | cli, centos, SME, install |
Maintainer
Version
Description
This allow you to install SME on a minimal CentOS. All you need is network enabled to install the rpm.
Everything is automated, all you will need is to answer to :
- good old console configuration to set your server working as you want
- allowed IP and subnet to access the manager
Also, if you have setup and enabled,before rebooting, you will need to import your public RSA key to ~/.ssh/authorized_keys in order to be able to login after installation, otherwise default behaviour will apply.
The root password configured on the initial CentOS installation is copied to the admin user.
SSH access is open, with root login allowed, but only RSA SSH key allowed.
Be aware the first reboot might take awhile because of quota check...
Installation
You may have to install wget
yum install wget
Download the file and install (you might check the last available version in https://mirror.koozali.org/releases/10/smecontribs/x86_64/RPMS/ to adapte the following line)
wget https://mirror.koozali.org/releases/testing/10/smecontribs/x86_64/RPMS/smeserver-centos2sme-6.9.1-11.el7.sme.noarch.rpm
yum install smeserver-centos2sme-6.9.1-11.el7.sme.noarch.rpm
SME Server Conversion
We assume you were able to connect to your remote CentOS 7 server using SSH and you already have added your own public key to /root/.ssh/authorized_key. Alternatively you have a virtual or IP KVM access to your server.
Preparation
Get the current network information of your server
# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet NY.IP.IS.HE.RE netmask MY.MASK.IS.HE.RE broadcast Z.Z.Z.Z
Get the default gateway :
# route -n Destination Gateway Genmask Indic Metric Ref Use Iface 0.0.0.0 MY.GATE.WAY.IP 0.0.0.0 UG 0 0 0 eth0 MY.NET.WORK.0 0.0.0.0 MY.MASK.IS.HE.RE U 0 0 0 eth0
You might also want to get the IP /network you are connecting from, to add latter to ValidFrom to access to the server-manager.
Script Usage
Launch the script
centos2sme
Run this, if dependency errors occur it will have setup Koozali repos so updates can be actioned.
You may get dependency errors due to updates that have recently been pushed to Koozali mirrors. Most recently following are three that required further action due to recent changes:
# yum downgrade initscripts # yum install yum-plugin-post-transaction-actions # yum install dhcp-common
Rerun install script
# centos2sme
Final Steps
At the end of the script, you will get to the bootstrap console to configure your server. This is where you need the information about your network.
Then you will be offered to enter a valid Network you want to authorize access to your server-manager.
At the end you will either need to reboot to get all your services running, or use console to restore a backup.
Uninstall
yum remove smeserver-centos2sme
Other Information
using restore on reboot
Usual System restoration on boot using usb disk is disable to avoid locking you out on reboot, as it is considered you might not have a KVM access, and only ssh access.
IF you HAVE KVM access, then the following can be performed once install/reboot is complete to initiate restore of a backup as per default behaviour on first reboot.
config delete PasswordSet config setprop bootstrap-console Run Yes signal-event reboot
DO this only if you have kvm access, Remember you still can use the option 9 to restore from disk without rebooting.
Issue with Screen
Some installation of Centos do have declared devpts in fstab and are missing the gid=5. This will prevent non root user to use screen
change this
devpts /dev/pts devpts defaults 0 0
to this
devpts /dev/pts devpts defaults,gid=5 0 0
to avoid a reboot, do
mount -o remount,gid=5,rw,relatime,mode=600,ptmxmode=000 /dev/pts
Alternatively, simply remove or comment the line from fstab and it should work on reboot.
Bugs
Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-centos2sme component or use this link
Below is an overview of the current issues for this contrib:
ID | Product | Version | Status | Summary (3 tasks) ⇒ |
---|---|---|---|---|
12166 | SME Contribs | 10.0 | CONFIRMED | init-accounts |
11954 | SME Contribs | 10.0 | CONFIRMED | noise with /etc/e-smith/events/actions/systemd-default |
11705 | SME Contribs | Futur | UNCONFIRMED | No '/sbin/sendmail' available |
Changelog
Only released version in smecontrib are listed here.
- fix failure to install due to missing remi-safe repo [SME: 12075]
- remove sendmail and postfix prior SME install [SME: 11599]
- fix typo [SME: 10850]
2021/03/20 Jean-Philippe Pialasse 6.9.1-10.sme
- create empty smeserver-centos2sme [SME: 10850]