Sunday, May 10, 2015

Install Wordpress on Oracle Linux 7

Wordpress is a popular blogging tools used for many different purposes. People use Wordpress as a blogging tool, a content management system, and even as a website management tool.
This tutorial will go over installing Wordpress on Oracle Linux 7.
Basics:
Install Oracle Linux 7.1 (follow articles describing cloning a base Linux install with Virtual Box or install the software directly)
Downloads: Wordpress
Additional Tools: Filezilla or other ftp client, SecureCrt/Putty or other ssh client
Steps:
1. Follow the steps to clone a new Linux Server.
2. Edit the hostname to a hostname you will understand
vi /etc/hostname
wordpress.simplepsider.com
3. Set the hostname the imp address to a static ip address. This will avoid problems in the future with connecting to clients after reboots.
ip addr
vi /etc/sysconfig/network/*/ifcfg-*
4. Patch your OS. Always patch your OS before installing web applications.
yum update
5. Reboot your system
reboot
6. Enable yum repo for mysql
vi /etc/yum.repos.d/public-yum-ol7.repo
find the ol7_MySQL56
change enabled to 1
YumMysqldEnable 
7. Install software for wordpress.
#Web Server
yum install mod_ssl openssl httpd -y
# Php
yum install php php-mysql -y
# Database
yum install mysql-server -y
#install ftp server
yum install vsftpd -y
# Additional Tools zip program, locate program
yum install unzip -y
yum install mlocate -y
yum install wget -y
# Additional php libraries for wordpress tools
yum install php-gd -y
yum install php-xml -y
InstallSoftware
8. Start and enable database.
systemctl start mysqld
systemctl enable mysqld
9. start and enable web server
systemctl start httpd
systemctl enable httpd
StartamndEnableServices
10. Secure mysql database
mysql_secure_installation
Current Password (enter for none):
Set Password = Y
Enter Strong Password
Renter Password
Remove Anonymous user? = Y
Disallow root login remotely? = Y
Remove Test Database? = Y
Reload Prvileges? = Y
SecureMysql
11. Create the wordpress database and account user.
-- Use a string password do not use MyPassword1 this is just an example
mysql -u root -p
CREATE DATABASE simplespider_prod;
GRANT ALL PRIVILEGES ON simplespider_prod.* TO
wordpress@localhost;
SET PASSWORD FOR
wordpress@localhost = PASSWORD('MyPassword1');
FLUSH PRIVILEGES;
exit
CreateDatabaseandUser
12. Download the latest version of wordpress.
cd ~
wget
https://wordpress.org/latest.zip
13. Unzip wordpress
ls –lrt
unzip latest.zip
cd wordpress
cd /var/www/html

rm –rf *
cp ~/wordpress/* /var/www/html -R
CopyWordpresstoWebRoot
14 Configure wordpress to connect to your database
cd /var/www/html
cp wp-config-sample.php wp-config.php
vi wp-config.php
define('DB_NAME', 'simpleprider_prod');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'MyPassword1');
define('DB_HOST', 'localhost');
ConfigureWordpressDB
15. Disable firewall Note Later we can change rules to just allow port 80 and 443 through
systemctl stop firewalld
systemctl disable firewalld
DisableFirewall
16. Finish Wordpress set up through browser.
Enter the Ip you used on the network configuration into a browser.
This will redirect you to the wordpress admin page.
WordPressInstallScreen
17. Enter your wordpress information
Title
Admin username
Password
Email
Click Install Wordpress
WordPressConfigure
18. The completion screen will show up and you will be ready to start admining your new site.
Success
19. After Login you will be taken to the Wordpress Admin screen
Dashboard

No comments:

Post a Comment