• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Centminmod email

#1
I'm trying to get an email server setup after using Centminmod to install Nginx PHP and MariaDB.

I've tried Postfix but it requires mysql-libs and Maria comes without that.

So I was just wondering, for those of you who have used Centminmod to install a software set on your server, what did you do to get email working?

Thanks.
 

Floren

Well-known member
#2
Just curious, why do you need centminmod? This is a script that installs everything from source. How do you plan to track your scattered files and upgrade them later? There is no way you can do that with a source install, that's the main reason why yum was created in the first place. Use yum and decent repo, is the proper way to maintain a server clean and easily upgradable. :)

Here it is a 30 seconds install with all deps automatically loaded, on a 64bits machine:
Code:
# yum remove openssl.i686
# yum --enablerepo=axivo install php-common php-cli php-fpm php \
	php-bcmath php-gd php-mbstring php-mcrypt php-pdo \
	php-mysql php-pspell php-xml php-pecl-apc php-pecl-imagick \
	php-pecl-memcached nginx-naxsi-ui mariadb-server postfix
There you have it... PHP 5.3.14 with all the fancy PECL packages XenForo needs, Nginx 1.2.2 with Naxsi firewall, MariaDB Server 5.2.12 and Postfix. Cannot get easier than this... Not to mention that Axivo RPM's are Intel optimized for top performance and tested on huge websites running over 50,000 online users.

For example, the Axivo MariaDB RPM's are 40% faster compared to official MariaDB RPM's and nearly 29% faster than their "generic" custom RPM. They are also also 65% faster than Percona 5.5.10-20.1 and 82% faster than MySQL 5.5.11.
 
#3
Hi Floren,

I was struggling to get PHP and Nginx working under Centos6.2 andp4guru suggested Centminmod. So I did a clean install of Centos6.2 and then Centminmod and it all worked great until I tried to do test emails to move towards making the site live.

Sounds like my best bet now is to back up what I've done and do a clean install as you have suggested.

Thanks for your suggestion.
 
#5
I'm getting an error like this:

yum --enablerepo=axivo
Loaded plugins: fastestmirror, security

Error getting repository data for axivo, repository not found
 

Floren

Well-known member
#7
What do you think. :)
Don't forget to start the services, after the rpm installs:
# chkconfig nginx on
# chkconfig php-fpm on
# chkconfig mysqld on
# service nginx start
# service php-fpm start
# service mysqld start
 
#8
Thanks for your help Floren, it is much appreciated.

It certainly takes longer than 30 seconds if you don't load the rpm first. I'm very inexperienced using terminal and am finding that it is very easy to miss one vital step in a process.

I now have an Nginx server working fine and Maria DB etc all working with no problems so far. I now need to reinstall Xenforo etc and harden up the server with firewall etc.

By the way does yum install init.d scripts for each service so they start up when the server is rebooted?
 

Floren

Well-known member
#9
The init scripts are there, or else you would not be able to start nginx for example. :)
The chkconfig somename on command does exactly that, it restarts the service when you reboot the server.
$ man chkconfig
 
#10
Hi Floren,

I now have everything working fine.

Email from the site is now also working perfectly.

Many thanks!

By the way I did have a small issue with the default localhost.conf file. What I found in there originally was:
include fastcgi_params;
but that didn't find fastcgi_params and my php scripts wouldn't work.

I had to use the full path to fastcgi_params and now it works fine.

The install locations were not exactly what I was expecting from reading about Nginx elsewhere for example when I do:
whereis nginx

I get nginx: /usr/sbin/nginx /etc/nginx.d /etc/nginx /usr/share/nginx /usr/share/man/man8/nginx.8.gz /usr/share/man/man3/nginx.3pm.gz

and the web root is at:
/var/www/html

It all works fine though.

I forgot to say I install nginx without the naxsi front end.
 

Floren

Well-known member
#11
Why do you use fastcgi_params? Is deprecated, the proper file to use is fastcgi.conf:
https://www.axivo.com/community/threads/basic-nginx-configuration-file.128/

Yes, fastcgi.conf... not /etc/nginx/fastcgi.conf. Read the tutorial, please don't destroy the config files. Too much copy/paste from the Internet without reading the documentation? :giggle:
Also, the locations are conform to Linux standards, which I follow religiously when I build an RPM.
 
#12
It shouldn't be this difficult. Surely someone has good basic standard .conf files that will work in most situations. Then if you need something that is missing you read about that and add it in. We shouldn't all have to read the book on re-inventing wheels and then have to reinvent one to get a web serve3r running reasonably efficiently.

It looks like my installation was built without PCRE so I'm back to square one I guess.
 

Floren

Well-known member
#13
It shouldn't be this difficult. Surely someone has good basic standard .conf files that will work in most situations.
This is the angle I look at when I setup a server: Do I want top performance or just a stock setup? If the answer is stock, then I don't bother to apply a bunch of system tweaks to a default minimal install and I would certainly do not bother to install a product like Nginx. A default Linux server with a clean minimal install is simply terrible in every aspect, when we talk performance tuning. That is valid for any distro, not just Linux in particular... So right there you start with the wrong foot, if you assume everything is fine.

You cannot just copy/paste things you read on the Internet into Nginx, it does not work like that. You have a fair chance the published information is wrong anyways. The way Igor designed this product is to be tailored for each website, uniquely. Whatever settings you use will never fit my site because I don't have the same traffic, server settings and hardware, etc.

In conclusion: if you want performance and accept the necessary learning curve from original documentation, then stick with Nginx, otherwise is best you look for a different web setup.
 

Claudio

Well-known member
#14
Just curious, why do you need centminmod? This is a script that installs everything from source. How do you plan to track your scattered files and upgrade them later? There is no way you can do that with a source install, that's the main reason why yum was created in the first place.
@eva2000 will be happy to clarify this :)
 

Brent W

Well-known member
#17
I am sure he will come along soon but from my experience I prefer this method as it allows me to immediately upgrade our servers to the latest releases of Nginx, PHP and Memcached without the need to wait on distros or repos to update theirs. There are no scattered files that I have had to worry about or whatever @Floren is referring to. Works absolutely perfect for our needs.
 

eva2000

Well-known member
#18
Not everything is source installed just frequently updated stuff like Nginx, PHP-FPM, memcached server etc. MariaDB is installed via official MariaDB YUM repo.

The user is complaining you depend on centminmod updates and suggests yo use yum instead of centmin. Would like to know eva thoughts regarding this.
FAQ item 18 explains it https://centminmod.com/faq.html and it's exactly as @Brent W states

When I started modifying the original Centmin script for my own needs, I had a very specific configuration in mind for Nginx, PHP-FPM, and MariaDB. They would be custom tuned settings wise from out of the box installations - ready to hit the ground running with optimised specific settings. The source install method for common software also allows using more recent versions that what CentOS YUM repositories can provide and also lessen Centmin Mod user's reliance on the developer when new versions of software are released. The end user can just run centmin.sh menu options 4 and 5 to upgrade to newer Nginx and PHP versions without any delay in waiting for YUM repo based RPMs to be released or built. So with source compiles for Nginx and PHP, there is a shorter time between when the Nginx and PHP developers announce a new version release on their web site and the time you get to install that newer version on your server. For YUM repo installs, that more lengthy delay can be days or weeks even between Nginx and PHP developer announced new version and time you get to install the new version on your server.
And you have to bring in context at the time of this thread Floren developed and created his own custom CentOS YUM repo for more updated RPM packages via Axivo but that custom repo has been out of date and not maintained in years AFAIK. For Nginx and PHP-FPM at least, Centmin Mod's source installs removes the middle man - being the YUM/RPM package maintainers (and delays) and allows Centmin Mod users to just update or downgrade their Nginx and PHP-FPM versions when they see a new version offered directly by Nginx and PHP-FPM developers via centmin.sh menu system https://centminmod.com/menu.html without waiting on me to update Centmin Mod everytime. It ain't perfect as on a rare occasion, the menu routines could break and require me to update Centmin Mod code which I do ASAP as I have 120+ servers relying on Centmin Mod :) But Centmin Mod code is open source on Github https://github.com/centminmod/centminmod so anyone can fork it if they want to or contribute fixes and modify it to their needs if they want.

Also FAQ item 18 explains the advantages of source compile in providing features that no other LEMP or LAMP stack can provide via standard YUM repository installs

Nginx and PHP source installs also allow Centmin Mod to provide features and enhancements that not many other LEMP/LAMP stacks provide including. These are some features available optionally in latest Centmin mod 123.09beta01 and newer releases:
 

Anthony Parsons

Well-known member
#19
The user is complaining you depend on centminmod updates and suggests yo use yum instead of centmin.
I don't use centminmod myself, and I build things from packages or source myself to my own specs for my servers, BUT, if comparing YUM to centminmod update frequency, the user complaining is an idiot. Sorry... but its true if they believe YUM is updated regularly. YUM is updated with tried and tested packages, the absolute most stable of stable. That is what makes Centos near bulletproof. The pitfalls is that it can be seriously lagging behind with technological advantages, and something like doing it yourself OR a system like centminmod bring you forward to use the less stable, but more technological efficient softwares.
 

eva2000

Well-known member
#20
The pitfalls is that it can be seriously lagging behind with technological advantages, and something like doing it yourself OR a system like centminmod bring you forward to use the less stable, but more technological efficient softwares.
It's just not that CentOS/RHEL YUM updates lag before. There's some updates that fall through the cracks. Like wget CVE-2016-4971 security vulnerability. Basically, RHEL will not fix it for RHEL/CentOS 5 and 6 and only fixed it for RHEL/CentOS 7 and that was already a much delayed fix https://access.redhat.com/security/cve/cve-2016-4971. While, Centmin Mod LEMP stack already had a workaround fix for wget for CentOS 6 and 7 already. All Centmin Mod forum members and Centmin Mod social media account followers get alerts and notifications for Centmin Mod related critical and security fixes.

CVE-2016-4971
Impact: Moderate
Public Date: 2016-06-09
CWE: CWE-73
Bugzilla: 1343666: CVE-2016-4971 wget: Lack of filename checking allows arbitrary file upload via FTP redirect

It was found that wget used a file name provided by the server for the downloaded file when following a HTTP redirect to a FTP server resource. This could cause wget to create a file with a different name than expected, possibly allowing the server to execute arbitrary code on the client.

Find out more about CVE-2016-4971 from the MITRE CVE dictionary dictionary and NIST NVD.
Centmin Mod wget version for CentOS 6 and 7 fixed since July 2016
Code:
wget -V
GNU Wget 1.19.1 built on linux-gnu
upload_2017-4-28_13-15-39.png

There's other examples where CentOS 7 gets YUM updates before CentOS 6 due to upstream RHEL decisions. Which has shaped my view that if you're using CentOS, use CentOS 7 at least.
 
Last edited: