• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Urban Penguin

The Urban Penguin - Linux Training

  • Home
  • About
  • Live Online Courses
  • Shop
  • Programming
    • Master Editing Text Files Using VIM
    • Learn Shell Scripting with BASH
    • PERL Scripting in Linux
    • Ruby Scripting in Linux
    • Scripting with PowerShell
    • Learn C Programming using Linux and the Raspberry Pi
    • General Java Tutorials
    • Java 7 OCA Exam 1ZO-803
  • OS Tutorials
    • Red Hat and CentOS Training
      • Red Hat Enterprise Linux System Administration 1 – RH124
      • RHCSA – System Admin 2 – RH134
      • RHCE – EX294 – Automation With Ansible
    • Learning Ubuntu
    • LPI Training
      • LPI Linux Essentials
      • LPIC-1 Linux Administrator
      • LPIC-2 Certified Linux Engineer
      • LPIC-3 Senior Level Certification
        • LPIC-3 Exam 300 : Mixed Environments
        • LPIC-3 Exam 303 : Security
        • LPIC-3 Exam 304 : Virtualization and High Availability
    • Linux Technologies
      • Apache HTTPD Server
      • Learning PHP
      • Learning PUPPET
      • Learning SAMBA
      • Linux File-Systems
      • Monitoring with Nagios Core
      • MYSQL
      • openLDAP Directories on Linux
You are here: Home / Linux / RH254 / Creating WordPress Site on RHEL 7.1

Creating WordPress Site on RHEL 7.1

June 27, 2015 by The Urban Penguin

wordpress-logo-hoz-rgb

 

 

If you are working toward your RHCE and the EX300 exam you will know that you will need some MariaDB (MySQL) knowledge and this is all well and good but if you do not put the experience to good use it is all a little meaningless. In this blog we will look at installing the LAMP stack: (Linux, Apache, MariaDB, and PHP) , onto RHEL 7.1 and then adding and configuring WordPress the popular blog platform.


Install Software

# yum install -y httpd php mariadb mariad-server php-mysql
# systemctl start mariadb httpd
# systemctl enable mariadb httpd

Secure MariaDB

# mysql_secure_installation
  1. set root password
  2. remove anonymous
  3. set local only
  4. remove test db
  5. reload permissions

Configure MariaDB

We now need to to log in to the database server:

# mysql -u root -p
MariaDB [(none)]> create database wp;
MariaDB [(none)]> create user wp@localhost identified by 'Password1';
MariaDB [(none)]>grant all privileges on wp.* to wp@localhost;
MariaDB [(none)]>flush privileges;
MariaDB [(none)]> quit

Create WordPress Directory

# cd /var/www/html
# mkdir wp
# chgrp apache wp/
# chmod 3770 wp/

Copy WordPress files to /var/www/html/wp

Down load the latest version of WordPress from http://www.wordpress.org. Expand the archive and copy the contents of the expanded WordPress directory into the wp sub-folder. Add the write permission to the group owner:

# chmod -R  g+w /var/www/html/wp

Configure WordPress

Start the browser and navigate to localhost/wp : this should start the configuration where we add the database name, database user and password.

SELinux may prevent the web-server writing to the configuration file. If SELinux is enable you can copy the configuration into the file /var/www/html/wp/wp-config.php

The simplest way to allow httpd to write in an SELinux environment is to run the following command:

# setsebool -P httpd_unified 1

With the configuration file in place we can complete the configuration of WordPress by returning to the web page and click the Run Install button. We now configure the site title and admin user account.

 

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to print (Opens in new window)

Filed Under: RH254

Primary Sidebar

Newest Video

The Urban Penguin On Youtube

Categories

Pages

  • About The Urban Penguin
  • Contact Us
  • Shop
    • Basket
    • Checkout
    • My Account
  • LPI Training from The Urban Penguin
    • Live and Pluralsight hosted courses
    • Complete Linux Essentials
    • LPIC-3 Senior Level Certification
      • LPIC-3 Exam 300 : Mixed Environments
      • LPIC-3 Exam 303 : Security
      • LPIC-3 Exam 304 : Virtualization and High Availability
    • LPIC-2 Certified Linux Engineer
    • LPIC-1 Linux Administrator
    • LPI Linux Essentials for Raspberry Pi
    • LPI Linux Essentials
  • Operating System Tutorials
    • Linux Foundation Training
    • Solaris 11 OCA 1ZO-821
    • Learning Ubuntu
    • Learning SUSE
    • Red Hat and CentOS Training
      • RHCE – EX294 – Automation With Ansible
      • RHCSA – System Admin 1 – RH124
      • RHCSA – System Admin 2 – RH134
  • Scripting – the power of repetition!
    • Java 7 OCA Exam 1ZO-803
    • General Java Tutorials
    • Learn C Programming using Linux and the Raspberry Pi
    • Ruby Scripting in Linux
    • Scripting with PowerShell
    • PERL Scripting in Linux
    • Learn Shell Scripting with BASH
    • Master Editing Text Files Using VIM
  • Linux Technologies
    • Learning PUPPET
    • openLDAP Directories on Linux
    • Monitoring with Nagios Core
    • Linux File-Systems
    • Learning SAMBA
    • Apache HTTPD Server
    • Learning PHP
    • MYSQL
  • OpenStack
    • Pluralsight
    • Udemy
    • Raspberry Pi Tutorials
    • Citrix Videos
  • Online Instructor-led Courses
    • Red Hat Enterprise Linux System Administration 1 – RH124
    • SELinux Masterclass
    • Bash Scripting Masterclass
    • Nftables Masterclass

© 2021 The Urban Penguin · All Rights Reserved