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

    Installing Wordpress on CentOS 7 Minimal

    IT Discussion
    wordpress centos 7 real instructions how to guide
    10
    58
    8.5k
    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 @Obsolesce
      last edited by

      @Tim_G said in Installing Wordpress on CentOS 7 Minimal:

      I personally do not know the command line way to do that, it's always been super easy and fast doing it through phpMyAdmin. When other people take over, it's very easy for them to do it.

      Every install guide has the command, making it super fast. And once you use it once, it is in your command history so you just "up arrow" and there it is.

      mysql> CREATE DATABASE databasename;
      mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password";
      mysql> FLUSH PRIVILEGES;
      
      1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Obviously, you only create the database the first time. But that's how fast it is, just "create database name".

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

          I like doing it from the CLI, even though phpMyAdmin is slick, because I only need one interface. Having to switch back and forth between SSH and web or something else is cumbersome and more things that I have to maintain. I've had databases where I need to do regular maintenance and then, definitely, that's the tool that I use. But for just initial setup tasks, I stick to the command line.

          ObsolesceO 1 Reply Last reply Reply Quote 1
          • ObsolesceO
            Obsolesce @scottalanmiller
            last edited by

            @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

            I like doing it from the CLI, even though phpMyAdmin is slick, because I only need one interface. Having to switch back and forth between SSH and web or something else is cumbersome and more things that I have to maintain. I've had databases where I need to do regular maintenance and then, definitely, that's the tool that I use. But for just initial setup tasks, I stick to the command line.

            Yeah, that's another point I didn't think about: it's never just initial setups that occur on a webserver. At least ones I deal with. Sure it can be fast to type in the commands fast to create a new database and user for it... but then when you have to export and import tables and such from other servers, among other things, I'd need to take a class on how to do it. And I can't stand around and school everyone or expect everyone I make contact with to pick up my documentation and do it all via CLI.

            Most people just want an easy web browser bookmark, where they can visually go in an get things done without worrying about typing it all out on CLI and everything that involves.

            I'm all about automation, scripting, etc... but only when it involves doing things more than once on the same or like systems.

            There's a saying I like that goes something like... "If you have to do it twice, it should have been automated." lol

            But anyways, I agree with you... initial set up, easy CLI... more involved work/maintenance = GUI (unless you're a trained SQL CLI admin or whatever) But even still, it's not always you who are going to be maintaining it after initial setup... it may not even be a technical fellow.

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

              @Tim_G yeah, that's very different. For WordPress, normally you never touch the DB again, ever.

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

                Updated the instrucitons a bit to make the MySQL setup non interactive and fixed a missing bit of info for the httpd.conf.

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

                  Thanks to @BRRABill it looks like I missed some SELinux issues.

                  Instructions updated, but this is what I needed to resolve his issues so far. He just installed, so maybe more updates to come 😛

                  yum install -y policycoreutils-python
                  semanage fcontext -a -t httpd_sys_content_t '/opt/yourdomain(/.*)?'
                  restorecon -R /opt/yourdomain
                  semanage fcontext -a -t httpd_sys_rw_content_t '/opt/yourdomain/wp-content(/.*)?'
                  restorecon -R /opt/yourdomain/wp-content
                  
                  1 Reply Last reply Reply Quote 0
                  • BRRABillB
                    BRRABill
                    last edited by

                    One other thing @JaredBusch and I discussed was the location in /opt and opposed to /var

                    In theory, it should not matter.

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • BRRABillB
                      BRRABill
                      last edited by

                      @JaredBusch

                      BTW, thanks for the writeup. Very good job.

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

                        @BRRABill said in Installing Wordpress on CentOS 7 Minimal:

                        One other thing @JaredBusch and I discussed was the location in /opt and opposed to /var

                        In theory, it should not matter.

                        @scottalanmiller there was a discussion in a thread here a couple years ago around using /opt/ for wordpress installs. but I cannot find it. I think there was a reasoning from someone in there for that location.

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

                          @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                          @BRRABill said in Installing Wordpress on CentOS 7 Minimal:

                          One other thing @JaredBusch and I discussed was the location in /opt and opposed to /var

                          In theory, it should not matter.

                          @scottalanmiller there was a discussion in a thread here a couple years ago around using /opt/ for wordpress installs. but I cannot find it. I think there was a reasoning from someone in there for that location.

                          Only thing I know of is that YUM using that location. But have no idea why.

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

                            Looking into things I found this link. Granted this is about packaging for RPM but still.
                            https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                            Web Applications

                            Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                            • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                            • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                            • /var/www is no longer specified by the Filesystem Hierarchy Standard
                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @JaredBusch
                              last edited by

                              @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                              Looking into things I found this link. Granted this is about packaging for RPM but still.
                              https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                              Web Applications

                              Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                              • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                              • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                              • /var/www is no longer specified by the Filesystem Hierarchy Standard

                              Hmmm... point two I understand. It's already in use. But it was always in /var specifically because it is variable data, that's where upload caches and stuff go.

                              No idea about the hierarchy.

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

                                @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

                                @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                Looking into things I found this link. Granted this is about packaging for RPM but still.
                                https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                                Web Applications

                                Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                                • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                                • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                                • /var/www is no longer specified by the Filesystem Hierarchy Standard

                                Hmmm... point two I understand. It's already in use. But it was always in /var specifically because it is variable data, that's where upload caches and stuff go.

                                No idea about the hierarchy.

                                Looks like I got the /opt thing from you. Your LEMP challenge used /opt/wordpress.
                                https://mangolassi.it/topic/1082/the-wordpress-on-centos-lemp-challenge

                                Now I know there was a subsequent discussion somewhere on ML about /opt, I just cannot find it.

                                scottalanmillerS RomoR 2 Replies Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @JaredBusch
                                  last edited by

                                  @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                  @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

                                  @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                  Looking into things I found this link. Granted this is about packaging for RPM but still.
                                  https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                                  Web Applications

                                  Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                                  • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                                  • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                                  • /var/www is no longer specified by the Filesystem Hierarchy Standard

                                  Hmmm... point two I understand. It's already in use. But it was always in /var specifically because it is variable data, that's where upload caches and stuff go.

                                  No idea about the hierarchy.

                                  Looks like I got the /opt thing from you. Your LEMP challenge used /opt/wordpress.
                                  https://mangolassi.it/topic/1082/the-wordpress-on-centos-lemp-challenge

                                  Now I know there was a subsequent discussion somewhere on ML about /opt, I just cannot find it.

                                  I have a feeling that it was or is the nginx default directory.

                                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                                  • RomoR
                                    Romo @JaredBusch
                                    last edited by Romo

                                    @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                    @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

                                    @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                    Looking into things I found this link. Granted this is about packaging for RPM but still.
                                    https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                                    Web Applications

                                    Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                                    • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                                    • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                                    • /var/www is no longer specified by the Filesystem Hierarchy Standard

                                    Hmmm... point two I understand. It's already in use. But it was always in /var specifically because it is variable data, that's where upload caches and stuff go.

                                    No idea about the hierarchy.

                                    Looks like I got the /opt thing from you. Your LEMP challenge used /opt/wordpress.
                                    https://mangolassi.it/topic/1082/the-wordpress-on-centos-lemp-challenge

                                    Now I know there was a subsequent discussion somewhere on ML about /opt, I just cannot find it.

                                    I ask about it after seing your guide and you choosing /opt for the instalation

                                    https://mangolassi.it/topic/12567/is-there-a-best-practice-for-the-location-of-the-root-folder-of-a-webapp

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

                                      @Romo said in Installing Wordpress on CentOS 7 Minimal:

                                      @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                      @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

                                      @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                      Looking into things I found this link. Granted this is about packaging for RPM but still.
                                      https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                                      Web Applications

                                      Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                                      • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                                      • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                                      • /var/www is no longer specified by the Filesystem Hierarchy Standard

                                      Hmmm... point two I understand. It's already in use. But it was always in /var specifically because it is variable data, that's where upload caches and stuff go.

                                      No idea about the hierarchy.

                                      Looks like I got the /opt thing from you. Your LEMP challenge used /opt/wordpress.
                                      https://mangolassi.it/topic/1082/the-wordpress-on-centos-lemp-challenge

                                      Now I know there was a subsequent discussion somewhere on ML about /opt, I just cannot find it.

                                      I ask about it after seing your guide and you choosing /opt for the instalation

                                      https://mangolassi.it/topic/12567/is-there-a-best-practice-for-the-location-of-the-root-folder-of-a-webapp

                                      And as you can see from my link above, @scottalanmiller's answer in your thread is not helpful. He simply stated standards. But what standard is the question.

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

                                        @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

                                        @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                        @scottalanmiller said in Installing Wordpress on CentOS 7 Minimal:

                                        @JaredBusch said in Installing Wordpress on CentOS 7 Minimal:

                                        Looking into things I found this link. Granted this is about packaging for RPM but still.
                                        https://fedoraproject.org/wiki/Packaging:Guidelines#Web_Applications

                                        Web Applications

                                        Web applications packaged in Fedora should put their content into /usr/share/%{name} and NOT into /var/www/. This is done because:

                                        • /var is supposed to contain variable data files and logs. /usr/share is much more appropriate for this.
                                        • Many users already have content in /var/www, and we do not want any Fedora package to step on top of that.
                                        • /var/www is no longer specified by the Filesystem Hierarchy Standard

                                        Hmmm... point two I understand. It's already in use. But it was always in /var specifically because it is variable data, that's where upload caches and stuff go.

                                        No idea about the hierarchy.

                                        Looks like I got the /opt thing from you. Your LEMP challenge used /opt/wordpress.
                                        https://mangolassi.it/topic/1082/the-wordpress-on-centos-lemp-challenge

                                        Now I know there was a subsequent discussion somewhere on ML about /opt, I just cannot find it.

                                        I have a feeling that it was or is the nginx default directory.

                                        No, you continually reference /opt as the directory to use for 3rd party applications.

                                        It I guess the better question is whether or not web apps like this are considered third party applications or something to put in webroot. A Google site search of this site and the term /opt returns many threads with directions from you installing things to /opt.

                                        1 Reply Last reply Reply Quote 0
                                        • BRRABillB
                                          BRRABill
                                          last edited by

                                          He also has said that /var is the only place data should be stored.

                                          Hmmmmm.........

                                          Come on @scottalanmiller let's get it figured out! 🙂

                                          1 Reply Last reply Reply Quote 0
                                          • BRRABillB
                                            BRRABill
                                            last edited by

                                            @JaredBusch

                                            Perhaps this is offtopic, but what is the swappiness setting you are supposed to use? Would that be applicable to this article, or is that a more "general CentOS setup" setting?

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