The WordPress on CentOS LEMP Challenge
-
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 -
This is what I have at the moment. need to update the virtual host and then it should function I think. I can see the default apache page now, so i know that the basics are working.
yum -y install httpd; chkconfig httpd on; yum -y install mariadb mariadb-server; chkconfig mariadb on; setenforce permissive; #rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm; rpm -Uvh http://mirror.1000mbps.com/fedora-epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm; #rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm; rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm; yum -y -–enablerepo=remi install php-fpm php-mysql; chkconfig php-fpm on; cd /opt; wget https://wordpress.org/latest.tar.gz; tar -xzvf latest.tar.gz; systemctl start mariadb; echo “CREATE DATABASE wp” | mysql; echo “CREATE USER ‘wp’@’localhost’ IDENTIFIED BY ‘password’;” | mysql; echo “GRANT ALL PRIVILEGES ON *.* TO ‘wp’@’localhost’;” | mysql; echo “FLUSH PRIVILEGES;” | mysql; chown -R apache:apache /opt/wordpress/; firewall-cmd --zone=public --add-port=http/tcp; firewall-cmd --zone=public --add-port=http/tcp --permanent; systemctl reload firewalld; systemctl start httpd; systemctl start php-fpm;