Question: 1 ) Run dnf - y update on your VM if you have not yet done so ( this may take a while )

1) Run "dnf -y update" on your VM if you have not yet done so (this may take a while)
2) verify the firewalld service is stopped and disabled; set SELinux to permissive:
a) systemctl stop firewalld
b) systemctl disable firewalld
c) setenforce 0
3) activate the httpd server (pre-installed on Fedora): systemctl start httpd and systemctl enable httpd
a) use the browser to check that the 'localhost' site is working
4) install php into the web server: dnf -y install php php-mysqlnd php-mysqli
5) restart the httpd service and check that php is running (both must be active and running):
systemctl status httpd
systemctl status php-fpm
6) create a file called info.php in /var/www/html containing just :
a) chmod 777 both the /var/www/html directory and the info.php file inside the directory
b) test via localhost in browser: localhost/info.php (you should see the PHP information page, which should include mysqli module)
7) Disable the 'default' installed mysql module (as root user):
dnf -y module disable mysql
8) install MySQL server: dnf -y install community-mysql-server
-- start the mysql service: systemctl start mysqld and then enable the service: systemctl enable mysqld
9) run the mysql config process: mysql_secure_installation:
a) Answer 'No' to the first question about validating password component. In other words, do NOT activate secure password rules
b) use the password sesame for the root user (you will be asked to enter it twice)
c) Answer 'N'(no) to removing the anonymous user
d) Answer 'N'(no) to disallowing remote logon
e) Answer 'N'(no) to removing the test database
f) Answer 'Y' to reloading the privilege tables
Note: the next steps require you to download the files at the bottom of this lab posting to your Fedora virtual machine. Some virtual machines (depending on network configuration) may have a problem connecting to the Internet. If this happens an alternative is to download the files to a flash drive, and then from the VirtualBox top menu (with fedora virtual machine running) choose the USB option under the 'Devices' menu item. This should let you select your flash drive and directly connect it to the virtual machine (it will disappear from the Windows drive list on the host while you are using it on the virtual machine). You can then use the Fedora 'Files' feature (on the dash at the bottom of the Fedora screen) to copy the files from the flash drive.
10) Download the SALESDB.sql database build script (below). You will need to know the exact, full path to the location where you download the script. Then open the mysql command window with (at the $ terminal prompt):
mysql -u root -p
(when challenged you will give sesame as the password)
11) Load the SALESDB database by running the script inside MySQL (note that /path is the full path to the location of the SALESDB.sql file):
\./path/SALESDB.sql
For example, if SALESDB.sql is in JohnDoe's Downloads folder one would type: "\./home/johndoe/Downloads/SALESDB.sql"(without the double-quotes). The first character is the backslash.
12) create CustSales as a new folder under /var/www/html and set its permissions to 777
13) copy the index.php and dblink.php files to the /var/www/html/CustSales folder. Set their permissions to 777
14) run the app as localhost in browser to verify results; in other words, at browser URL type: localhost/CustSales

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!