ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    The WordPress on CentOS LEMP Challenge

    IT Discussion
    wordpress lemp linux rhel nginx centos
    14
    60
    18.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by scottalanmiller

      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

      1 Reply Last reply Reply Quote 7
      • Bill KindleB
        Bill Kindle
        last edited by

        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.

        StrongBadS 1 Reply Last reply Reply Quote 4
        • Bill KindleB
          Bill Kindle
          last edited by

          Nice tutorial BTW.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @Bill Kindle
            last edited by

            @Bill-Kindle said:

            Nice tutorial BTW.

            Thanks šŸ™‚

            1 Reply Last reply Reply Quote 0
            • StrongBadS
              StrongBad @Bill Kindle
              last edited by

              @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.

              1 Reply Last reply Reply Quote 1
              • JaredBuschJ
                JaredBusch
                last edited by

                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.conf

                and this command would be switched to httpd
                chkconfig nginx on

                travisdh1T 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  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.

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • thanksajdotcomT
                    thanksajdotcom
                    last edited by

                    @Bill-Kindle coined that a little while ago for over there. I thought it was appropriate. LOL

                    1 Reply Last reply Reply Quote 0
                    • M
                      Martin9700
                      last edited by

                      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.

                      1 Reply Last reply Reply Quote 1
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller
                          last edited by

                          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.

                          1 Reply Last reply Reply Quote 0
                          • M
                            Martin9700
                            last edited by

                            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!!

                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller
                              last edited by

                              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.

                              1 Reply Last reply Reply Quote 1
                              • JaredBuschJ
                                JaredBusch @scottalanmiller
                                last edited by

                                @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.

                                1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller
                                  last edited by

                                  The Apache setup will be extremely different. Just needs an echo to append the VirtualHost to the httpd.conf file.

                                  1 Reply Last reply Reply Quote 0
                                  • Bill KindleB
                                    Bill Kindle
                                    last edited by

                                    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.

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @Bill Kindle
                                      last edited by

                                      @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.

                                      Bill KindleB 1 Reply Last reply Reply Quote 0
                                      • Bill KindleB
                                        Bill Kindle @scottalanmiller
                                        last edited by

                                        @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.

                                        1 Reply Last reply Reply Quote 1
                                        • scottalanmillerS
                                          scottalanmiller
                                          last edited by

                                          People hire that guy as an MSP? Damn. SMBs are just not discriminating at all.

                                          Bill KindleB 1 Reply Last reply Reply Quote 2
                                          • JaredBuschJ
                                            JaredBusch
                                            last edited by

                                            @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

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post