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

    Installing WordPress on Fedora 25 and 26 Minimal install

    IT Discussion
    wordpress fedora fedora 26 minimal
    6
    18
    3.9k
    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.
    • DashrenderD
      Dashrender
      last edited by Dashrender

      Start with @JaredBusch guide to install Fedora 25 minimal.

      The following are based upon @JaredBusch CentOS install.

      Assuming you're using a VM somewhere other than local on your machine, you'll want to use putty or Bitvise or some other SSH client so you can copy paste into the session.

      note: those used to using php-mysql there is a change. php-mysql was deprecated, now you use php-pdo_mysql

      dnf -y install httpd mariadb mariadb-server php php-pdo_mysql php-xml php-gd wget nano 
      policycoreutils-python;
      systemctl enable httpd.service;
      systemctl enable mariadb.service;
      setenforce permissive;
      systemctl start mariadb;
      firewall-cmd --zone=public --add-port=http/tcp --permanent;
      systemctl reload firewalld;
      systemctl start httpd;
      

      Download and unpack WordPress

      cd /var/www/html;
      wget https://wordpress.org/latest.tar.gz;
      tar -xzvf latest.tar.gz;
      

      Change the settings below to things specific to your install.
      NOTE: because of exit characters in certain shells, and the fact that these passwords can only be used on the local machine, it's advisable to only use alphanumeric characters for the passwords below - it will make your life easier

      #Create a database for wordpress and a user to access it.
      mysql -e "CREATE DATABASE wp_yourdomain_db;"
      mysql -e "CREATE USER 'wp_user_yourdomain'@'localhost' IDENTIFIED BY 'somerandompassword';"
      mysql -e "GRANT ALL PRIVILEGES ON wp_yourdomain.* TO 'wp_yourdomain'@'localhost';"
      mysql -e "FLUSH PRIVILEGES;"
      
      #Secure mariadb. These commands do what mysql_secure_installation does interactively
      mysql -e "UPDATE mysql.user SET Password=PASSWORD('somesecurepassword') WHERE User='root';"
      mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
      mysql -e "DELETE FROM mysql.user WHERE User='';"
      mysql -e "DROP DATABASE test;"
      mysql -e "FLUSH PRIVILEGES;"
      

      Make a copy of the wordpress directory into the folder for this instance of WordPress
      note - yourdomain is replaced by whatever you want to reference this instance as

      cp -R /var/www/html/wordpress/ /var/www/html/yourdomain/
      chown -R apache:apache /var/www/html/yourdomain/;
      

      Create a wp-config.php from the sample file, then update it with your specific settings. You are changing wp_yourdomain_db, wp_user_yourdomain, and somerandompassword to match the ones you create above.

      cp /var/www/html/yourdomain/wp-config-sample.php /var/www/html/yourdomain/wp-config.php;
      sed -i -e 's/database_name_here/wp_yourdomain_db/' /var/www/html/yourdomain/wp-config.php;
      sed -i -e 's/username_here/wp_user_yourdomain/' /var/www/html/yourdomain/wp-config.php;
      sed -i -e 's/password_here/somerandompassword/' /var/www/html/yourdomain/wp-config.php;
      

      Go to https://api.wordpress.org/secret-key/1.1/salt/ and copy paste a unique salt into your wp-config.php file
      No idea how to use sed to find/replace this. This data goes at the end of the wp-config.php file.
      This is what is in the default file.

      define('AUTH_KEY', 'put your unique phrase here');
      define('SECURE_AUTH_KEY', 'put your unique phrase here');
      define('LOGGED_IN_KEY', 'put your unique phrase here');
      define('NONCE_KEY', 'put your unique phrase here');
      define('AUTH_SALT', 'put your unique phrase here');
      define('SECURE_AUTH_SALT', 'put your unique phrase here');
      define('LOGGED_IN_SALT', 'put your unique phrase here');
      define('NONCE_SALT', 'put your unique phrase here');
      
      • If you are only going to run the one website on this server, you can edit the apache config
      • to change the default document root to point to your wordpress folder
      • list itemby default it is located: /etc/httpd/conf/httpd.conf
      • Change the following two lines
      DocumentRoot "/var/www/html/yourdomain" # was "/var/www/html"
      <Directory "/var/www/html/yourdomain"> # was "/var/www/html"
      

      restart the webserver then browse to your site.

      systemctl reload httpd;
      
      stacksofplatesS 1 Reply Last reply Reply Quote 4
      • DashrenderD
        Dashrender
        last edited by

        This post is a work in progress.
        In fact I have to go back to my recovery point again and try this list over again.

        1 Reply Last reply Reply Quote 1
        • black3dynamiteB
          black3dynamite
          last edited by

          Why Fedora 25 instead of 26?

          DashrenderD 2 Replies Last reply Reply Quote 0
          • DashrenderD
            Dashrender @black3dynamite
            last edited by

            @black3dynamite said in Installing WordPress on Fedora 25 Minimal install:

            Why Fedora 25 instead of 26?

            No reason other than previous instructions.. I'll try 26 this afternoon.
            downloading the netinstall of 26 now.

            scottalanmillerS 1 Reply Last reply Reply Quote 0
            • DashrenderD
              Dashrender @black3dynamite
              last edited by

              @black3dynamite said in Installing WordPress on Fedora 25 Minimal install:

              Why Fedora 25 instead of 26?

              Man, you just can't please anyone, can ya 😛

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

                @dashrender said in Installing WordPress on Fedora 25 Minimal install:

                @black3dynamite said in Installing WordPress on Fedora 25 Minimal install:

                Why Fedora 25 instead of 26?

                No reason other than previous instructions.. I'll try 26 this afternoon.
                downloading the netinstall of 26 now.

                Never install old.

                DashrenderD 1 Reply Last reply Reply Quote 1
                • DashrenderD
                  Dashrender @scottalanmiller
                  last edited by

                  @scottalanmiller said in Installing WordPress on Fedora 25 Minimal install:

                  @dashrender said in Installing WordPress on Fedora 25 Minimal install:

                  @black3dynamite said in Installing WordPress on Fedora 25 Minimal install:

                  Why Fedora 25 instead of 26?

                  No reason other than previous instructions.. I'll try 26 this afternoon.
                  downloading the netinstall of 26 now.

                  Never install old.

                  Yeah Yeah - the page I ran into yesterday say Fedora 26 was in beta.. clearly I found an old page.

                  26 is currently install in a new VM.

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

                    @dashrender said in Installing WordPress on Fedora 25 Minimal install:

                    @scottalanmiller said in Installing WordPress on Fedora 25 Minimal install:

                    @dashrender said in Installing WordPress on Fedora 25 Minimal install:

                    @black3dynamite said in Installing WordPress on Fedora 25 Minimal install:

                    Why Fedora 25 instead of 26?

                    No reason other than previous instructions.. I'll try 26 this afternoon.
                    downloading the netinstall of 26 now.

                    Never install old.

                    Yeah Yeah - the page I ran into yesterday say Fedora 26 was in beta.. clearly I found an old page.

                    26 is currently install in a new VM.

                    27 is almost out of beta now.

                    1 Reply Last reply Reply Quote 0
                    • ObsolesceO
                      Obsolesce
                      last edited by Obsolesce

                      Yeah, may as well test it on 27 too so you can add something like:

                      "Tested and working on Fedora 25 - 27".

                      I don't see why it wouldn't... its' just web stuff which is pretty much universal, and some firewall crap.

                      Great post though! Helpful

                      DashrenderD 1 Reply Last reply Reply Quote 2
                      • DashrenderD
                        Dashrender @Obsolesce
                        last edited by

                        @tim_g said in Installing WordPress on Fedora 25 Minimal install:

                        Yeah, may as well test it on 27 too so you can add something like:

                        "Tested and working on Fedora 25 - 27".

                        I don't see why it wouldn't... its' just web stuff which is pretty much universal, and some firewall crap.

                        Great post though! Helpful

                        Yeah several tweaks vs the CentOS install @JaredBusch did last spring.

                        1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates @Dashrender
                          last edited by stacksofplates

                          @dashrender said in Installing WordPress on Fedora 25 Minimal install:

                          No idea how to use sed to find/replace this

                          Here's a quick one liner:

                          for i in {SECURE_AUTH_KEY,LOGGED_IN_KEY,NONCE_KEY,SECURE_AUTH_SALT,LOGGED_IN_SALT,NONCE_SALT,AUTH_KEY,AUTH_SALT}; do sed -i "s/$i/yourkeyhere/g" wp-config.php; done
                          

                          Ah never mind. I didn't realize each line was different.

                          1 Reply Last reply Reply Quote 0
                          • DashrenderD
                            Dashrender
                            last edited by

                            OK after a few hours of trouble shooting I finally have

                            https://i.imgur.com/wMkOKzT.png

                            1 Reply Last reply Reply Quote 0
                            • DashrenderD
                              Dashrender
                              last edited by

                              My issue was that I used a random password generator to create passwords, and those passwords included characters that BASH interpreted as exit characters. i.e. !

                              Removing those characters solved my issues.

                              Now both Scott and JB have asked me why I had special characters in my passwords - to which I replied why not?

                              Scott only mentioned that for his passwords he sticks to alphanumeric.

                              Jared did express that since these passwords were only usable locally on the computer, very complex passwords aren't needed.
                              OK fine, they aren't needed but so what? They still should be usable, and of course they are, as long as you pass them through the shell in a manner that the shell knows they are characters and not commands.

                              Of course, for those that know JB, the conversation wasn't nearly that polite 🙂

                              jmooreJ ObsolesceO 2 Replies Last reply Reply Quote 0
                              • jmooreJ
                                jmoore @Dashrender
                                last edited by

                                @dashrender LOL

                                DashrenderD 1 Reply Last reply Reply Quote 0
                                • DashrenderD
                                  Dashrender @jmoore
                                  last edited by

                                  @jmoore said in Installing WordPress on Fedora 25 Minimal install:

                                  @dashrender LOL

                                  Thanks, as if my pain wasn't enough 😛

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

                                    @dashrender said in Installing WordPress on Fedora 25 Minimal install:

                                    Of course, for those that know JB, the conversation wasn't nearly that polite 🙂

                                    Lol, I can only imagine!

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

                                      For ease and speed and better management, I highly recommend using WP-CLI for all of your downloading, updating, configuration, etc. One like of WP-CLI will eliminate most of this installation, while making it easier to maintain in the long run.

                                      https://mangolassi.it/topic/13062/install-a-basic-wordpress-site-with-wp-cli

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

                                        @scottalanmiller said in Installing WordPress on Fedora 25 and 26 Minimal install:

                                        For ease and speed and better management, I highly recommend using WP-CLI for all of your downloading, updating, configuration, etc. One like of WP-CLI will eliminate most of this installation, while making it easier to maintain in the long run.

                                        https://mangolassi.it/topic/13062/install-a-basic-wordpress-site-with-wp-cli

                                        Yup, that's what I use now, I won't every go back!

                                        https://mangolassi.it/topic/16084/installing-fedora-27-lamp-stack-plus-wordpress

                                        1 Reply Last reply Reply Quote 1
                                        • 1 / 1
                                        • First post
                                          Last post