0% found this document useful (0 votes)
15 views

ITEC464 MariaDB PHP WordPress Installationf23

The document provides instructions for installing MariaDB, PHP, and WordPress on an Ubuntu VM. It details steps to install MariaDB and create a database, install PHP, download and configure WordPress, and create a WordPress site. Screenshots are requested throughout to prove completion of steps.

Uploaded by

Zille Huma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

ITEC464 MariaDB PHP WordPress Installationf23

The document provides instructions for installing MariaDB, PHP, and WordPress on an Ubuntu VM. It details steps to install MariaDB and create a database, install PHP, download and configure WordPress, and create a WordPress site. Screenshots are requested throughout to prove completion of steps.

Uploaded by

Zille Huma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

Introduction: This lab will take you through the installation of MariaDB, and the creation of a basic
database to be used for a new WordPress installation. You’ll also install PHP as the server-side language
used by WordPress. Finally, completing the installation of WordPress.

Assumptions:

Azure Ubuntu VM has been assigned and you can log in. You may have completed some of these
steps in class, if so, start after that point.

APACHE2 has already been installed.

Be sure to take screenshots of your work (put them at the end of this document) to prove completing
each step. When in doubt take a screenshot, place it at the end of this document in the place indicated.
Answer all questions in your own words in the places provided.

Be careful to include semi-colons ( ; ) where indicated at the end of command lines.

Paste the screenshots at the end of the documenti

PUT YOUR NAME HERE:

Start and Login to your Ubuntu assign VM. My Virtual Machines


https://labs.azure.com

These steps should be done in your server VM, not


in your host computer.
`

INSTALL OF MARIADB
Once logged into your VM, open a terminal window in the VM, type:

sudo apt-get install mariadb-server mariadb-client

Answer y for yes to any prompts.

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 1 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

Check for database running after

In the terminal type:

ps -eaf |grep mysql

SCREENSHOT!

Run these commands one after the other:


These will stop and start the database, then install it
to run at startup.

sudo systemctl stop mariadb.service

sudo systemctl start mariadb.service

sudo systemctl enable


mariadb.service

Secure the database server and create a new root


password ( York7800)
Run the following command

sudo mysql_secure_installation

continue below…

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 2 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

Answer “y” to the prompts.

Use York7800 for prompts to set new password

Remove anonymous users y

Disallow root login remotely? Y

Remove test database and access to it? Y

Reload privilege tables now? Y

INSTALL PHP
Run the following command to install PHP and
supporting modules [all on one line, no carriage
returns]

sudo apt install php libapache2-mod-


php php-common php-mbstring php-
xmlrpc php-soap php-gd php-xml php-
intl php-mysql php-cli php-ldap php-
zip php-curl

answer y to the prompt about additional disk space
being used

SCREENSHOT!

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 3 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

CREATE A BLANK WordPress Database


sudo mysql -u root -p

you’ll enter York7800 for all password prompts.

At the MariaDB [(none)]>


type
CREATE DATABASE WP_464lastname;

(use your last name for the 464lastname)

SCREENSHOT!

Use your lastname and create a user in the database

CREATE USER 'wp_<yourlastname>'@'localhost' IDENTIFIED BY ‘York7800’;

(example: wp_woolinski )

Run the permissions command to give the user full access (this is a one line command, NO
carriage returns) use EXACTLY THE wp_lastname you used above! Case sensitive

GRANT ALL ON WP_464<lastname>.* TO 'wp_<lastname>'@'localhost' IDENTIFIED


BY 'York7800' WITH GRANT OPTION;

example:
GRANT ALL ON WP_464smith.* TO ‘wp_smith’@’localhost’ IDENTIFIED BY
‘York7800’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Install Wordpress
Download the latest WP release
We’ll download to the /tmp directory and extract it
there. Then move the package to the core location
that Apache will use as the published source for your
v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 4 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

installation:

Run the commands


cd /tmp

curl https://wordpress.org/latest.tar.gz
--output wordpress.tar.gz

verify the wordpress.tar.gz was created –


type ls -al you’ll see it in the directory.

SCREENSHOT!

Untar (unzip) the repository

tar -zxvf wordpress.tar.gz

the files will extract.


Type ls -al |grep wordpress

move the wordpress folder to /var/www/html/


sudo mv wordpress /var/www/html

type
ls -al /var/www/html to see the
moved directory.

Change ownership and permissions


sudo chown -R www-data:www-data /var/www/html/wordpress/
sudo chmod -R 755 /var/www/html/wordpress/

Create a VirtualHost where WordPress will run in


Apache
sudo nano /etc/apache2/sites-available/wordpress.conf

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 5 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

Add the following code into the file

<VirtualHost *:80>
ServerAdmin tiger@localhost
DocumentRoot /var/www/html/wordpress/
ServerName localhost
ServerAlias 464lastname < -- Put your last name here
<Directory /var/www/html/wordpress/>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Ctl-X to exit, answer Y to save the file.

Enable the site

sudo a2ensite wordpress.conf

sudo a2enmod rewrite


Restart apache when prompted with the systemctl
command shown.

reload apache

sudo systemctl reload apache2.service

Open the Brower and type localhost

The WordPress setup should load.

Choose English (United States)


Click Continue

Fill in the information from creating the database in


MariaDB

Database Name: WP_464<yourlastname>


Username wp_yourlastname
Password: York7800
Database Host: localhost
Table Prefix: wp_

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 6 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

Enter the follow:

Site Title: 464<your last name>


Username: tiger
Password: York7800
Confirm weak: checked
Your Email: <yourid>@towson.edu

Install WordPress

Success!

Click Log in

Enter tiger and York7800

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 7 of 9
ITEC464 LAB: Installation of MariaDB, PHP, and WordPress on Ubuntu VM

You’ll come to the administration screen for your


WordPress installation.

In the browser go to your 464lastname (example:


http://464Gilbert) or localhost

You should see a Hello world! Screen.

You’ve now successfully installed a WordPress site.

This completes the lab. Shutdown your VM and stop the VM in the Azure labs.

Save this document and submit it.

SCREENSHOTS BELOW HERE:

v. 11/2121

You can split this Microsoft Word document by using the View – Split menu options. Put the screenshot area on the bottom and the
instructions in the top of the split. Page 8 of 9
i

You might also like