The WordPress on CentOS LEMP Challenge
-
Here we go. i setup wordpress on jarebusch.com using the process above and i've put the latest version there.
We'll see how bad the comments spam up with no protection plugin in place. I have it set to all comments be moderated. I am curious to see how fast it gets spammy.
http://jaredbusch.com/2014/08/11/how-to-install-wordpress-on-centos-7-minimal/
-
The site loads very quickly.
-
@scottalanmiller said:
The site loads very quickly.
It is a clean CentOS 7 minimal install running in Server 2012 R2 With the Hyper-V role.
It is located in a data center in St. Louis.There are umm 5 sites all running Wordpress on the VM. Said sites setup in the process of creating that guide.
-
Xmodulo now has a nice guide for actually doing LEMP on CentOS that is meant for real people, not just people looking to do a one liner challenge
How to Install LEMP Stack on CentOS via Xmodulo -
Long time follow up: http://www.unixmen.com/vpssim-a-script-to-deploy-lemp-stack-automatically-in-centos/
-
The original post on my own blog was lost and is not only in the Internet Archive, so copying it here...
From May 14th, 2014:
We all know that installing WordPress on LAMP is super simple. A challenge was issued on Spiceworks to demonstrate how WordPress on LEMP (Nginx rather than Apache) could be easy on CentOS. So that challenge could not go unmet. So the goal here is to install, quickly and hopefully easily, WordPress on LEMP.
Assumption: Starting with CentOS 6.5 âMinimalâ accepting all defaults. To make things easy, we will just log in as root (the password is set during the initial install.)
First, we wonât even assume that networking is working. Out of the box, CentOS Minimal leaves the network off. And we will assume that you donât want to edit any files. So just run this command:
sed -i -e 's/no/yes/' /etc/sysconfig/network-scripts/ifcfg-eth0
service network restart
ifconfig eth0 | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1That second line will provide you your IP address so that you can SSH into the box. Yup, Iâm making it that simple. So, assuming weâve now been able to use SSH to connect to the box we should now be easily able to copy and paste everything from here on out.
yum -y install wget; cd /tmp; wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm; rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm; yum -y install nginx; chkconfig nginx on; rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm; yum -y install mysql mysql-server; rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm; chkconfig mysqld on; setenforce permissive; yum -y âenablerepo=remi install php-fpm php-mysql; sed -i -e s/apache/nginx/g /etc/php-fpm.d/www.conf; chkconfig php-fpm on; cd /opt; wget https://wordpress.org/latest.tar.gz; tar -xzvf latest.tar.gz; service mysqld start; echo âCREATE DATABASE wpâ | mysql; echo âCREATE USER âwpuserâ@âlocalhostâ IDENTIFIED BY âpassword';â | mysql; echo âGRANT ALL PRIVILEGES ON *.* TO âwpuserâ@âlocalhost';â | mysql; echo âFLUSH PRIVILEGES;â | chown -R nginx:nginx /opt/wordpress/; iptables -I INPUT 1 -m state âstate NEW -m tcp -p tcp âdport 80 -j ACCEPT; iptables-save > /etc/sysconfig/iptables; service iptables reload; service php-fpm start; 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; service nginx restart; echo âAll Done, You Can Log In Nowâ
And that is it. Just point your web browser to the same address that we looked up with the ifconfig command at the beginning and you should see WordPress awaiting your input to step you through the last bits of the setup. Just give it the database name, database username and password that we set in the script and you are done, my friend.
-
You should add WP-cli support.
-
@JaredBusch said in The WordPress on CentOS LEMP Challenge:
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 onThey've replaced ifconfig with ip. I'm forcing myself to use ip till I get used to it and I can always fall back on ifconfig, or in the case of CentOS, just entering settings in /etc/sysconfig/network-scripts/interface file.
-
@travisdh1 said in The WordPress on CentOS LEMP Challenge:
@JaredBusch said in The WordPress on CentOS LEMP Challenge:
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 onThey've replaced ifconfig with ip. I'm forcing myself to use ip till I get used to it and I can always fall back on ifconfig, or in the case of CentOS, just entering settings in /etc/sysconfig/network-scripts/interface file.
I've got to the point where I just type ip addr without thinking about it. That's the only one I use though. I either edit the ifcfg file or use nmtui which is included in the minimal install.
-
I have finally gotten used to ip addr as well. Took a while.
-
@scottalanmiller said in The WordPress on CentOS LEMP Challenge:
I have finally gotten used to ip addr as well. Took a while.
Yeah. I actually still prefer ifconfig... To me it is easier to parse that information with human eyes, lol.
-
@dafyre said in The WordPress on CentOS LEMP Challenge:
@scottalanmiller said in The WordPress on CentOS LEMP Challenge:
I have finally gotten used to ip addr as well. Took a while.
Yeah. I actually still prefer ifconfig... To me it is easier to parse that information with human eyes, lol.
Yep, it's still the output I expect to see as well. It's a time sink learning the new thing
-
@travisdh1 said in The WordPress on CentOS LEMP Challenge:
@dafyre said in The WordPress on CentOS LEMP Challenge:
@scottalanmiller said in The WordPress on CentOS LEMP Challenge:
I have finally gotten used to ip addr as well. Took a while.
Yeah. I actually still prefer ifconfig... To me it is easier to parse that information with human eyes, lol.
Yep, it's still the output I expect to see as well. It's a time sink learning the new thing
About the time the masses get it learned, it seems like they want to change it again.
-
Anyone know what triggered the ifconfig to ip suite change? I've never dug into the reasoning.
-
@scottalanmiller said in The WordPress on CentOS LEMP Challenge:
Anyone know what triggered the ifconfig to ip suite change? I've never dug into the reasoning.
Does it have something to do with SystemD?
-
I really have no idea.
-
I'm in shock that this silly thread, with just 57 posts on it, has over 5K views!
-
I think this thread must have picked up a few buzzwords along the way. Buzz word. Buzzword. Buzzy fuzzy word...
It seems to me like the new iproute2 tools are more powerful, at least according to some articles I've seen... and they have been around since 1999 according to Wikipedia, lol.