The WordPress on CentOS LEMP Challenge
-
So a snarky poster on Spiceworks got all over Linux for being "too hard" and how he couldn't get WordPress on LEMP to work (LEMP is LAMP but with Nginx instead of Apache.) Of course, he was intentionally making everything has hard and convoluted as possible. No good reason to use Nginx (which isn't available on CentOS 6) just making things difficult for their own sake. And he felt even challenged by having to edit configuration files.
Here is the post: http://community.spiceworks.com/topic/493023-is-there-a-simple-way-to-set-up-wordpress-on-a-linux-server
So I took him up on the challenge and now we have a soup to nuts WordPress on LEMP for CentOS / RHEL installing one-liner. That's right, one copy/paste command and any "Minimum" install of CentOS 6.5 will instantly turn into a fully working WordPress server. Everything is handled from installation of all of the packages, setting up all of the configs, making the database, starting the services, setting them to be available on reboot... you name it, done. One line, takes two minutes to run on a slow, one core VM running on an overloaded desktop. Most of the time is spent waiting for software to download. The install itself takes seconds.
Scott Alan Miller Answers the WordPress on LEMP Challenge for CentOS
-
I've been referring to these types of whiners as "Ask-Holes" now. There has been an increase in these over the past few months. Also, now if you give technical advice that's legit, you get reported by these types and a cm comes along to tell you that you need to edit the post to be more helpful and less "Patronising". I guess turning a printer on and off to clear an error is now too technical and needs sugar coated for the accidental types.
-
Nice tutorial BTW.
-
@Bill-Kindle said:
Nice tutorial BTW.
Thanks
-
@Bill-Kindle said:
I've been referring to these types of whiners as "Ask-Holes" now. There has been an increase in these over the past few months.
I love that term.
-
Going to try this with a net CentOS 7 minimal install. I turned on networking at install and it was a good thing. The ifconfig script is not there in a minimal install. need to use "ip a sh" to see the config now. I haven't looked at the man for ip yet. I assume a is all and sh is show.
Also, reading through the script, if I use httpd instead of nginx I assume I do not need this command.
sed -i -e s/apache/nginx/g /etc/php-fpm.d/www.confand this command would be switched to httpd
chkconfig nginx on -
If you don't use nginx the whole thing gets way easier. It's only Nginx that makes it hard. Should be mostly just installing the necessary packages.
-
@Bill-Kindle coined that a little while ago for over there. I thought it was appropriate. LOL
-
Only problem I see, is it's not really a one liner. If I'm reading it right (and I may not be) then a semi-colon is a command separator? That means it's really a dozens of lines script that you've just forced into a single line.
-
Sure. It's a script then. If you save it as a script then you can run it as a one liner. Still just one copy/paste operation though.
-
Using semi colons to put together commands on one line qualifies via bashoneliners.com
I've always heard the term used to mean that. It is one line, but not one command. Multiple commands on one line I've always seen called a one liner.
-
Another difference between bash and PowerShell! In the PowerShell community you'd be disqualified We simply define a one liner as a single stream. It's really semantics as all the OS's involved can copy/paste multiple lines without trouble. Have to admit, it makes your one-liner a bitch (can I say that here?) to read!!
-
It's not meant to be readable or even useful. It was just meant to prove a point
I think PS is a lot more streamable. UNIX is all text processing. No way to make it all one stream when we need to use discrete operations like RPM.
-
@scottalanmiller said:
If you don't use nginx the whole thing gets way easier. It's only Nginx that makes it hard. Should be mostly just installing the necessary packages.
I like the idea of a one liner I can save though, so I am editing yours for Apache. I am stuck on the sed replacements for the local directory and such. It is my fault is not knowing Apache well enough.
I have a new Hyper-V VM running CentOS 7 Minimal. I am now needing to go manually dig though this and change things in the Apache conf files instead.sed -i -e sā/index index.html index.htm/index index.php index.html/ā /etc/nginx/conf.d/default.conf;
sed -i -e sā//usr/share/nginx/html//opt/wordpress/ā /etc/nginx/conf.d/default.conf;
sed -i -e 0,/#loca/{sā/#loca/loca/ā} /etc/nginx/conf.d/default.conf;
sed -i -e sā/# root html/ root /opt/wordpress/ā /etc/nginx/conf.d/default.conf;
sed -i -e sā/# fastcgi_pass/ fastcgi_pass/ā /etc/nginx/conf.d/default.conf;
sed -i -e sā/# fastcgi_index/ fastcgi_index/ā /etc/nginx/conf.d/default.conf;
sed -i -e sā/# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi/ fastcgi_param SCRIPT_FILENAME /opt/wordpress$fastcgi/ā /etc/nginx/conf.d/default.conf;
sed -i -e sā/# include fastcgi_params/ include fastcgi_params/ā /etc/nginx/conf.d/default.conf;
echo ā}ā >> /etc/nginx/conf.d/default.conf;Will probably be late before I can get back to it.
-
The Apache setup will be extremely different. Just needs an echo to append the VirtualHost to the httpd.conf file.
-
I remember that guy. They've even had problems with it on IIS 8.5 now as well. Couldn't even get something working that was hosted.
-
@Bill-Kindle said:
I remember that guy. They've even had problems with it on IIS 8.5 now as well. Couldn't even get something working that was hosted.
LOL. He never responded to the thread where I clearly got the best answer. I've never more clearly earned a BA and he just ignored that he looked like an idiot.
-
@scottalanmiller said:
@Bill-Kindle said:
I remember that guy. They've even had problems with it on IIS 8.5 now as well. Couldn't even get something working that was hosted.
LOL. He never responded to the thread where I clearly got the best answer. I've never more clearly earned a BA and he just ignored that he looked like an idiot.
Oh and he won't. He hits and runs. I think I lost count on about 5 posts where it was a similar question than the last. When you call him on his BS, he cries sleep deprivation and life as a MSP as being hard.
-
People hire that guy as an MSP? Damn. SMBs are just not discriminating at all.
-
@scottalanmiller A lot of difference for CentOS7 by the way.
yum install mysql installs mariadb automatically instead. I'm fine with that, but annoyed me at first.
service NAME start is depreciated in favor of systemctl start NAME
iptables is basically completely gone in its old form (you can manually add it with yum install iptables-services apparently). You now have to use firewall-cmd and it is systemctl reload firewalld