OpenSUSE small server basics 2019
Hardware and partitionning
I own a hosted server on the kimsufi.com site, part of the ovh.com hosting service (one of the biggest french one).
Now, the server disk is 2Tb, so there is no reason to save disk space. Use 100Gb root partition or even more, that way you can use unlimited mailbox space (usually in /var/spool) or database, without moving them to /home partition.
On march 02, 2020, my server have 2Gb swap, 100Gb root (/) partition, including /home and 1.7Tb data partition.
Get a Domain Name
I know you can use a dynamic system, but having your own domain name is very handy and very cheap. I use http://gandi.net and pay only €15 a year for my dodin.org domain name (I own also the dodin.net one, but this is an other story). I always had fixed IP, including at home, so I don't know much about a server on a variable IP system.
I buy recently yet an other domain name (dodin.info) to makes it easier to make migrations. I can build the new server on a real domain name and only switch when it's ok. ovh.com is cheap, around €5 only for a domain name (a year!).
My main web hosting service (not for this server) that I use to be free of hassle (o2switch.net) gives me a free domain name (dodin.xyz).
And if this is not enough, you can have free domain names from http://azote.org, I have two (dodin.fr.cr for this server and dodin.fr.nf if ever I want to use my home server on fiber line).
o2switch management makjes it easy for me to have a subdomain (for example nextcloud.dodin.org) pointing to this kimsufi server.
Know what you want
The first task is to take a paper and a pencil and write down exactly what you want. Of course, when working, you will understand better your needs and change accordingly, but any change can give painfull results.
As an example, gandi.net allows you to have a full mail server with no administration and unlimited e-mails for as low as €1 (one!) a month and if you want only the myname@mydomain e-mail, better use it. I wanted to learn mail administration, so I decided to go the hard way and install my own one.
What I wanted was:
- an http server for me and my family (I have two daughters working as singer and actress, so they need also web site);
- a mail server. I want to be able to manage all my mails from this server, to be able to read them (and the archives) from any computer on the world, without having to bring one with me;
- a ftp server to store files as needed and allow customers to do also;
- of course ssh access;
It's mandatory to make an immediate update. Using "zypper up" is probably the best way, at this step if there is a failure it's easy to install again.
The langage should be utf8, this is not universally adopted. Verify it with
env | grep LANG
For system, better use english.
Setup repositories in YaST
I use to remove "source" or "test" repositories and to add packman one, that is necessary is the server have at anytime to manage multimedia (likely).
Install basic stuff
Depending of your initial install you will probably have to install a lot of things. My provider installed a very minimal system. I had to install nearly all by hand. Begin to install all the meaningfull YaST modules (search for yast in software install). I had yast (mandatory!), but not yast2 (no gui) when using "ssh -X -C" to connect then yast2 is much friendlier.
I didn't write down all what I installed. A short list is probably: mc, w3m, yast2-qt, vsftpd (ftp), dovecot (mail imap/pop3), mailman (list server), apache2.
Don't forget to activate the necessary services in YaST, system, services manager. You may want to use "systemctl enable", read the systemctl man page, it's pretty important by the time.
Using patterns is friendly, but for example I ended with libreoffice and Gimp, not really necessary on a web server :-) (don't forget to remove them :-).
You should have a YaST module to manage automatic security updates? If you don't have, you didn't install the relevant module. Do and configure the update. The module name (13.1) is "yast2-online-update-configuration". It's available from software management/config, but only in qt version (not ncurse) with install on the go. With ncurse (xterm) version, install it yourself. after that it's available in the control centrer menu as Online Update Config.
Default openSUSE firewall is firewalld - I couldn't make it work at first, but a firewall is not that important on an online server I'm the only one to access.
The main error to avoid is to launch the firewall before having setup the sshd opening - doing so you will lose the connection to the server...
- smtp (postfix)
- http (apache)
Do verify all your daemons are running and launched at start.
- inn if you want a newsgroup server (not yet for me)
- mailman for mailing lists (not yet for me, but I will need it soon)
- rsyncd (do not seems to be mandatory)
- spamd (not yet)
In YaST was "running levels", is now "service manager" (13.1). You may also want to use "systemctl enable".
To allow X11 forwarding to work on modern distributions, you have to add
X11Forwarding yes #X11UseLocalhost no AddressFamily inet
then log in with "ssh -X -C [-p <port>] url
This config was activated as default in my 2014 install.