Changes

Jump to: navigation, search

OPS705 Assignment 1

5,993 bytes added, 8 April
Initial 2211 deployment.
In this assignment, you will install a WordPress blog from scratch on a new Azure-based Linux VM. You will also create step-by-step documentation as you go.

Unlike labs, assignments have minimal instructions. You are given specifications on what the assignment needs, and you must rely on your previous work in the course. If the assignment doesn't have the command you need, you can find it in your labs. And don't be afraid to do a little research!

Assignments in OPS705 are built as an assessment of your ability to meet the course objectives. As such, I'm unable to provide detailed help.

= Step-by-Step Documentation =
A large part of this assignment is self-documentation. As you progress through the assignment, write down detailed instructions on how to complete each part. This includes commands. You may include screenshots, though it's not required. Use the OPS705 labs on this wiki as a guide to the level of detail required in your documentation.

Use the section names below in your document as a template. In each section, fill out the steps you would need to take to reinstall everything from scratch.

A cover page is required. It must contain your name, student number, e-mail address, course code, assignment name, your professor's name, and the date of submission.

= Installing WordPress On A VM =
All components necessary to run the application will be directly inside this virtual machine. In essence, you will be creating a LAMP stack: Linux, Apache, MySQL, and PHP. This is what you'll need to get Wordpress working.

Specifications are below:

== Azure Linux VM Configuration ==
Create a new, third CentOS Linux VM with the following specifications:

# '''Virtual machine name:''' assign1-username
# '''Virtual machine size:''' Standard_B2ms
# '''IP address:''' Public

All other options, set up as you did with your previous Azure Linux VM.

Fully update the system.

== Apache Configuration ==
Install apache on your new VM as you have in previous labs. Use default port 80 for the server.

== MySQL Database Configuration ==
Install the '''mariadb-server''' software and configure its systemd service. Use the default port 3306.

Once the database is up, run the command: <code>mysql_secure_installation</code> and follow the defaults (Don't forget to set a root password during this process!)

With your new password, log in to your database with the following command: <code>mysql -h localhost -u root -p</code> (Type your password in the prompt)

Now that you're logged in, you have to create a separate user and database for Wordpress.
# Create the new database: <code>CREATE DATABASE wordpress;</code>
# Create the new user: <code>CREATE USER wordpressadmin@localhost IDENTIFIED BY 'password';</code> (Change the password to something else!)
# Give your new user priviledges to that database: <code>GRANT ALL PRIVILEGES ON wordpress.* TO wordpressadmin@localhost IDENTIFIED BY 'password';</code>
# Tell MariaDB to reload priviledges: <code>FLUSH PRIVILEGES;</code>

Use the database name, user, and password created in this sections Step 1 and Step 2 for your connector information in the WordPress setup later on. Do NOT use root with WordPress.

== PHP Installation ==
# Install the latest PHP repository: <code>yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm</code>
# Enable the repository on your VM: <code>yum-config-manager --enable remi-php74</code>
# Install php: <code>yum install php php-mysql</code>

After the packages are installed, restart the apache service.

== WordPress Website Configuration ==
To install WordPress, you'll need to download the zip file from online, unzip it, and move the files into your apache web directory.
# Download the zip with the following command: <code>wget https://wordpress.org/latest.tar.gz</code>
# Unzip the file: <code>tar -zxvf latest.tar.gz</code>
# Move the ''contents'' of the new directory wordpress into /var/www/html/ (Don't move the directory itself! Remember your Lab 3 CLI work.)
# Give apache ownership of all WordPress files: <code>chown -R apache:apache /var/www/html</code>
# Give apache proper permissions of WordPress files: <code>chmod -R 755 /var/www/html</code>
# TEMPORARILY set selinux to permissive: <code>setenforce 0</code>

Paste the URL hostname of your VM into a browser on your local machine. You should see the WordPress database connector page. Use ''localhost'' as your '''Database Host'''.

During Wordpress setup, after the database connection page, use the following values:
* '''Site Title:''' <Full Name>'s Assignment 1
* '''Username:''' <senecausername>
* '''Password:''' <insertpassword>
* '''Your Email:''' <senecaemailaddress>

When you've finished the installation, go back to your CLI and run: <code>setenforce 1</code>

== WordPress Blog ==
Customize your blog by choosing a different '''theme''' from the default. Choose a ''WordPress.org'' theme from the menu.

Create two blog entries of the following topics:
# How does this WordPress setup compare to our other lab installs? Think of a scenario where this method would be preferred.
# What was the most difficult part of this assignment for you?

== Firewall Configuration ==
Once you've finished setting up your WordPress blog, you must lock down your CentOS firewall.

Requirements:
# Must use iptables, not firewalld
# Only the following INPUT traffic is allowed:
#* RELATED,ESTABLISHED
#* SSH
#* HTTP
# Default policy for INPUT and FORWARD must be set to DROP

= Lab Submission =
As with previous labs, your work will be evaluated by accessing your site directly. To formally submit, you must include the following:
# In the comment section of your submission, paste the URL of your new site.
# Take a single screenshot of your blog showing both entries. The screenshot must be of your entire browser.
# Your Assignment 1 Documentation PDF

Once submitted, please shutdown your VM.

[[Category:OPS705]]
[[Category:OPS705 Labs]]
[[Category:Digital Classroom]]
[[Category:Winter 2021]]

Navigation menu