CentOS vs Ubuntu

Honestly, it is a complicated issue.

CentOS is a real server os, while ubuntu is a desktop os made into a Frankenstein to fit the server market. Ubuntu, it has a very different policy about versions and updates, so it has more cutting edge versions of popular packages, plus all the little kids find it familiar when coming from an Ubuntu desktop system. Of course it has the tendency to require compiling things, something RPM-based distros have scrapped for decades. Personally, I don't like their file-system structure, which is not typical *nix-like, it seems like everything has been moved around randomly.

The CentOS world is all about software with 8-10 year support, a real server os, much more stable and thus uses much OLDER software versions, which is why CentOS 7.3 still uses PHP 5.4. The good news is, that people realised there was a need for a bridge between the two worlds, so now there are two ways to bring new packages to CentOS:

  • Inline with Upstream Stable

https://ius.io/

  • Software Collections ( SCL ) Repository

https://wiki.centos.org/AdditionalResou … tories/SCL">https://wiki.centos.org/AdditionalResources/Repositories/SCL

I prefer the IUS packages, which replace the existing ones, like running PHP 7. While SCL allows you to run both old and new packages at the same time, for example, running PHP 5.4 along side PHP 7 (which is useless for me).

Ultimately, I choose CentOS for its stability, support and backing from RedHat (indirectly via RHEL). Plus, if I ever need paid work, I can always switch to RHEL. That is my personal opinion of course…

6 Replies

Both are equally great OS's and are both fine for a server OS. Whichever you choose will be fine, it's all a matter of preference or what you're most familiar with.

I prefer CentOS myself as every library and package I need I can figure out myself and that's what I do with my LEMP stack installer, https://centminmod.com - runs Nginx, PHP-FPM, MariaDB 10 + CSF Firewall for CentOS 6 and 7 and has packages and more up to date Nginx modules than any distro provided Nginx solution be it Ubuntu, Debian or CentOS :)

It's not what you use, but how you use it ;) So if you are more familiar with one linux distribution, then I suggest you use it. For me that is CentOS :)

btw, what nginx package/library or module you having issues with ?

these are some example nginx configurations, my centmin mod lemp stack can do

nginx 1.13.3 built with GCC 6.2.1 + LibreSSL 2.6.0

> nginx -V

nginx version: nginx/1.13.3

built by gcc 6.2.1 20160916 (Red Hat 6.2.1-3) (GCC)

built with LibreSSL 2.6.0

TLS SNI support enabled

configure arguments: –with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -march=native -DTCPFASTOPEN=23 -g -O3 -Wno-error=strict-aliasing -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-DFORTIFYSOURCE=2 -Wno-deprecated-declarations -gsplit-dwarf' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-compat --with-httpstubstatusmodule --with-httpsecurelinkmodule --with-libatomic --with-httpgzipstaticmodule --add-dynamic-module=../ngxbrotli --with-httpsubmodule --with-httpadditionmodule --with-httpimagefiltermodule=dynamic --with-httpgeoipmodule --with-streamgeoipmodule --with-streamrealipmodule --with-streamsslprereadmodule --with-threads --with-stream=dynamic --with-streamsslmodule --with-httprealipmodule --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngxcachepurge-2.3 --add-module=../ngxdevelkit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.14 --add-module=../ngxhttpredis-0.3.7 --add-module=../memc-nginx-module-0.18 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.32 --with-pcre=../pcre-8.41 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-httpsslmodule --with-httpv2module --with-httpv2hpackenc --with-openssl=../libressl-2.6.0

nginx 1.13.3 built with Clang 5.0.0 SVN + LibreSSL 2.5.5
> nginx -V

nginx version: nginx/1.13.3

built by clang 5.0.0 (branches/release_50 308822)

built with LibreSSL 2.5.5

TLS SNI support enabled

configure arguments: –with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -march=native -DTCPFASTOPEN=23 -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-DFORTIFYSOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion -Wno-c++11-compat-deprecated-writable-strings -Wno-write-strings -gsplit-dwarf' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-compat --with-httpstubstatusmodule --with-httpsecurelinkmodule --with-libatomic --with-httpgzipstaticmodule --with-httpsubmodule --with-httpadditionmodule --with-httpimagefiltermodule=dynamic --with-httpgeoipmodule --with-streamgeoipmodule --with-streamrealipmodule --with-streamsslprereadmodule --with-threads --with-stream=dynamic --with-streamsslmodule --with-httprealipmodule --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngxcachepurge-2.3 --add-module=../ngxdevelkit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.14 --add-module=../ngxhttpredis-0.3.7 --add-module=../memc-nginx-module-0.18 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.32 --with-pcre=../pcre-8.41 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-httpsslmodule --with-httpv2module --with-openssl=../libressl-2.5.5

nginx 1.13.3 compiled with Clang 3.4.2 and OpenSSL 1.0.2l
> nginx -V

nginx version: nginx/1.13.3

built by clang 3.4.2 (tags/RELEASE_34/dot2-final)

built with OpenSSL 1.0.2l 25 May 2017

TLS SNI support enabled

configure arguments: –with-ld-opt='-ljemalloc -lpcre -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -mtune=native -DTCPFASTOPEN=23 -g -O3 -Wno-error=strict-aliasing -fstack-protector -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-DFORTIFYSOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion -Wno-c++11-compat-deprecated-writable-strings -Wno-write-strings -gsplit-dwarf' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-compat --with-httpstubstatusmodule --with-httpsecurelinkmodule --with-libatomic --with-httpgzipstaticmodule --add-dynamic-module=../ngxbrotli --with-httpsubmodule --with-httpadditionmodule --with-httpimagefiltermodule=dynamic --with-httpgeoipmodule --with-streamgeoipmodule --with-streamrealipmodule --with-streamsslprereadmodule --with-threads --with-stream=dynamic --with-streamsslmodule --with-httprealipmodule --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngxcachepurge-2.3 --add-module=../ngxdevelkit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.14 --add-module=../ngxhttpredis-0.3.7 --add-module=../lua-nginx-module-0.10.9rc7 --add-module=../memc-nginx-module-0.18 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.32 --with-pcre=../pcre-8.41 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-httpsslmodule --with-httpv2module --with-httpv2hpackenc --with-openssl=../openssl-1.0.2l --with-openssl-opt='enable-ecnistp64gcc128'

nginx 1.13.3 compiled with Clang 3.4.2 and OpenSSL 1.1.0f
> nginx -V

nginx version: nginx/1.13.3

built by clang 3.4.2 (tags/RELEASE_34/dot2-final)

built with OpenSSL 1.1.0f 25 May 2017

TLS SNI support enabled

configure arguments: –with-ld-opt='-ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -mtune=native -g -O3 -fstack-protector -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-DFORTIFYSOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion -Wno-c++11-compat-deprecated-writable-strings -Wno-write-strings' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-compat --with-httpstubstatusmodule --with-httpsecurelinkmodule --with-libatomic --with-httpgzipstaticmodule --with-httpsubmodule --with-httpadditionmodule --with-httpimagefiltermodule=dynamic --with-httpgeoipmodule --with-streamgeoipmodule --with-streamrealipmodule --with-streamsslprereadmodule --with-threads --with-stream=dynamic --with-streamsslmodule --with-httprealipmodule --add-dynamic-module=../ngx-fancyindex-0.4.0 --add-module=../ngxcachepurge-2.3 --add-module=../ngxdevelkit-0.3.0 --add-module=../set-misc-nginx-module-0.31 --add-module=../echo-nginx-module-0.60 --add-module=../redis2-nginx-module-0.14 --add-module=../ngxhttpredis-0.3.7 --add-module=../memc-nginx-module-0.18 --add-module=../srcache-nginx-module-0.31 --add-module=../headers-more-nginx-module-0.32 --with-pcre=../pcre-8.41 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-httpsslmodule --with-httpv2module --with-openssl=../openssl-1.1.0f --with-openssl-opt='enable-ecnistp64gcc_128'

Latest beta version of Centmin Mod based Nginx supports, Clang 3.4.2, Clang 4.0.1, Clang 5.0.0, GCC native OS, GCC 5.3.1, GCC 6.2.1 compilations with LibreSSL 2.4/2.5/2.6 branches or OpenSSL 1.0.2/1.1.0 branches and OpenSSL 1.1.1-dev TLS v1.3 draft 18 supported branches as well :) Working on GCC 7.1/7.2 support and BoringSSL crypto library support for Nginx too ^_^

I like Centmin Mod very much, it is exactly what is needed by advanced users and offers cutting edge features. For my personal use, I've found that I can stick with what is offered by the vanilla CentOS, it is enough for me (for now…).

As a comparison, I'll criticise the following tutorial, it is everything I dislike: https://www.linode.com/docs/email/email … -and-mysql">https://www.linode.com/docs/email/email-with-postfix-dovecot-and-mysql

1) Ubuntu's way for placing things all over the place. Storing mail for virtual domains under /var/mail/, which is wrong in so many ways. While I'd use real /home/ users, separated individually within their own home ownership, with SELinux on top of then.

2) MySQL for mail, the horror. Instead of using 3 simple text files (or hash maps) to hold virtual alias data, it uses an sql database, which is overkill for most uses. I prefer simple files for setting up postfix/dovecot, over the overhead of an SQL database. Not to mention that all mail would stop when the database is offline for various reasons.

Ubuntu Server is essentially Debian and is perfectly fine as a server OS. The advantage over using Debian itself is the predictable lifecycle of its LTS releases. Of course, CentOS has an even longer supported lifetime.

In my experience, Ubuntu outshines CentOS in the number of packages offered in its repositories. The base repository for CentOS contains a relatively small selection of software, so you should look to see if the packages you want are included. If not, you can look into the third-party repositories available. If you enable the Ubuntu universe and multiverse repositories, a large number of packages are included.

In terms of administration, both systems can do the same things although they have their own quirks. I would suggest trying both out to see which you find more comfortable.

@IfThenElse:

I like Centmin Mod very much, it is exactly what is needed by advanced users and offers cutting edge features. For my personal use, I've found that I can stick with what is offered by the vanilla CentOS, it is enough for me (for now…).

As a comparison, I'll criticise the following tutorial, it is everything I dislike: https://www.linode.com/docs/email/email … -and-mysql">https://www.linode.com/docs/email/email-with-postfix-dovecot-and-mysql

1) Ubuntu's way for placing things all over the place. Storing mail for virtual domains under /var/mail/, which is wrong in so many ways. While I'd use real /home/ users, separated individually within their own home ownership, with SELinux on top of then.

2) MySQL for mail, the horror. Instead of using 3 simple text files (or hash maps) to hold virtual alias data, it uses an sql database, which is overkill for most uses. I prefer simple files for setting up postfix/dovecot, over the overhead of an SQL database. Not to mention that all mail would stop when the database is offline for various reasons.

Cheers but yes every distro has their own standards as to where they place stuff. Centmin Mod ain't no different :)

And yup just go with which you're more comfortable with i.e. CentOS 7 + EPEL 7 just ran into a new libc-client update which seems broken in EPEL 7 https://community.centminmod.com/thread … post-52601">https://community.centminmod.com/threads/fix-for-error-package-uw-imap-devel-2007f-4-el7-1-x86_64-epel.12392/#post-52601. But as I am familiar with CentOS, I can workaround and fix this. Ubuntu/Debian I am not as familar with to fix APT package conflicts if they do arise.

CentOS + EPEL + REMI + IUS Community + SCL yum repos combined make most YUM packages available - whether they're most up to date, that is another story.

@IfThenElse:

CentOS is a real server os, while ubuntu is a desktop os made into a Frankenstein to fit the server market. Ubuntu, it has a very different policy about versions and updates, so it has more cutting edge versions of popular packages, plus all the little kids find it familiar when coming from an Ubuntu desktop system. Of course it has the tendency to require compiling things, something RPM-based distros have scrapped for decades.

This is crap. As Vance mentioned, Ubuntu server is basically Debian with a more predictable release cycle. It's not some Frankenstein thing at all. I've never used Ubuntu on a desktop, I came to it from Debian for the release cycle. I have never once compiled anything with Ubuntu server. There is no tendency to require compiling things. Also as Vance stated, enabling universe and multiverse gives a huge wealth of package options. You'd have to be doing something really oddball or really bleeding edge for there not to be a package.

It's all fine and good to want the even longer support that CentOS gives you over Ubuntu LTS, but you don't have to make false statements about the one you don't like.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct