Changes

Jump to: navigation, search

OPS335 Lab 5

221 bytes added, 15:55, 29 March 2016
no edit summary
=== Creating a PHP File ===
'''Perform the following steps:''' #We'll replace our '''index.html''' file with an '''index.php''' with the following contents:
<pre>Hello, this is a web page on vm4.yourid.org and the current time is <?php system("date"); ?>!</pre>
<ol><li value="2">Notice that in a web browser the index.php file isn't treated as a default page and the contents don't contain the date, but instead have exactly the text above. That's because the PHP interpreter isn't installed by default on CentOS. Install it. The package comes with a working default Apache configuration so you don't need to enable it manually. </li><li>Refresh the page, notice that you now see the date instead of the call to the date command. This is a trivial example of dynamic web content - it doesn't need to be the same every time you look at it.</li>,/ol>
=== Install, Configure and Run MySQL Database Server ===
MySQL is used to allow storage and retrieval of structured data. SQL is used by countless services for all kinds of use cases. Again we won't spend much time learning the details of MySQL configuration but you need a basic server set up. You may remember setting up MySQL from OPS235 - we're doing the nearly identical thing here.
Install MySQL. You may notice that it's actually called MariaDB now. They are two separate projects run by different groups but they are compatible so you can use documentation from one to configure ''Perform the other. Make sure you have not just the client but also the server software. When you start the service - youfollowing steps:''ll get some instructions in the log file about setting a root password. Even though we won't configure our service to be accessible over the network - you should get into the habit of doing this with every MySQL installation you ever make.
#Install MySQL. You may notice that it's actually called MariaDB now. They are two separate projects run by different groups but they are compatible so you can use documentation from one to configure the other. Make sure you have not just the client but also the server software.#When you start the service - you'll get some instructions in the log file about setting a root password. Even though we won't configure our service to be accessible over the network - you should get into the habit of doing this with every MySQL installation you ever make.#Note that MySQL has two root passwords - one for localhost and one for external requests. Just run the two commands you're given in the log. Use a password you make up yourself, but don't use a secret password - you'll be putting it in a plain text file later.
== INVESTIGATION 2: INSTALL, CONFIGURE &amp; RUN WEBMAIL APPLICATION (Roundcube Mail) ==
We'll install Roundcube Mail. Download the tarball from their website directly into the html directory of your vm4 using wget. This part may take some effort depending on the Sourceforge website.
'''Perform the following steps:''' #Extract the tarball and rename the directory to '''webmail'''.#In that directory there will be a file named '''INSTALL''' which will walk you through the rest of the installation.<br><br>Some notes:
In that directory there will be a file named '''INSTALL::* Be careful about copy-pasting the MySQL setup part, don't try to rush it.::* You'll need to install a couple more Apache modules: php-xml, php-pdo, and php-mysql.::* Don' which will walk you through t forget to set the rest of password in the installationroundcube configuration.
Some notes<ol><li value="3">Note that both your IMAP and SMTP servers are on different machines, not on vm4. For that to work you'll need to set the following options for Roundcube:</li></ol>
::* Be careful about copy-pasting the MySQL setup part, don$config['t try to rush it.smtp_server']::* You$config['default_host'll need to install a couple more Apache modules]:: php-xml, php-pdo, and php-mysql.* Don$config['default_port't forget to set the password in the roundcube configuration.]
Note that both (the last two are your IMAP and SMTP servers are on different machines, not on vm4. For that to work you'll need to set the following options for Roundcube:server)
* $config['smtp_server']
* $config['default_host']
* $config['default_port']
(the last two are your IMAP server). <ol><li value="4">You should be able to test the configuration in your Roundcube installer Step 3.</li></ol>
== COMPLETING THE LAB ==
13,420
edits

Navigation menu