Changes

Jump to: navigation, search

OPS235 Assignment 2 OLD

642 bytes removed, 17:02, 22 July 2012
no edit summary
* '''php''' - this is the PHP server software, which allows Apache to run more complex websites.
* '''mysql-server''' - this is the MySQL database server.
* '''php-mysql''' - this is a PHP extension that allows PHP to use a MySQL server.
== Configuring Apache ==
# Confirm that you can view the index page. If not, check for errors in <code>/var/log/httpd</code>
== Configuring MySQL ==
# Start the MySQL service (mysqld) using the '''systemctl''' command.
# Ensure that the mysqld service starts automatically during boot.
# When started for the first time, this service will print a message telling you how to set a password and take other basic steps to secure the the MySQL server. Follow those instructions to set a password, recording the detail of what you do for later use. Look for these messages in '''<code>/var/log/messages</code>'''
#* Read those messages carefully, you are setting up a production MySQL server and there shouldn't be any "test" databases or anonymous users or users without a password.
# Set your MySQL root password to your learn ID (without the @senecac.on.ca part).
# This following part is challenging so take your time and read the instructions to make sure you do it properly, we have to set up a dedicated user and database for wordpress:
#* Start by looking at http://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client where you will find instructions for the setup.
 
== Installing and Configuring Wordpress ==
Wordpress (like most web applications) is not available in the Fedora repositories, it must be downloaded and installed manually.
* # Download the latest .tar.gz version from wodpress.org into your fedora3 (use wget).*# Extract it into '''/var/www/html''' so that when you point your web browser to http://fedora3/wordpress/ you will get an error starting with "There doesn't seem to be a wp-config.php file"
==== Serving Personal Web Pages (Section Total: 12 Marks)====
:# Configure httpd to serve the <code>~/public_html</code> directories of your users. This will require changes to <code>/etc/httpd/conf/httpd.conf</code> as well as the SELinux configuration. See the man page for <code>httpd_selinux</code> and the Apache [http://httpd.apache.org/docs/2.2/ httpd documentation] for details.
:# Prove that this works by creating a page in your <code>~/public_html</code> directory. The URL will be <code>http://''hostname''/~''your-user-id''/</code>
:# Create a short web script which displays the available disk space on the computer. At its most basic level, a web script is the same as a regular script, with this additional requirement:
:#* It must output the line "Content-type: text/plain" or "Content-type: text/html" (depending on whether the script output is plain text or HTML), followed by a blank line.
:# Name the script <code>~/public_html/diskfree.cgi</code> - The URL will be <code>http://''hostname''/~''your-user-id''/diskfree.cgi</code>
:# Configure httpd to allow your script to be run from the web. This will require changes to <code>/etc/httpd/conf/httpd.conf</code> as well as the SELinux configuration (possibly including both booleans and SELinux context). As with step 1, see the man page for <code>httpd_selinux</code> and the Apache [http://httpd.apache.org/docs/2.2/ httpd documentation] for details.
{{Admon/tip|Hint|Look for an "add-handler" line in your httpd.conf file.}}
===C. Write-up (Section Total: 12 Marks)===

Navigation menu