Skip to main content

LTK server setup guide

This guide was created by the Center for the Study of Learning and Performance (CSLP) for use by clients who wish to host the Learning Toolkit (LTK) on a local server. The instructions included will work for web server setup in general, but the configurations suggested have been tailored to the needs of these software packages.

How To Use This Guide

Begin by reading the introduction on the next page. Then read the LTK Overview page. Finally, read the overview for the operating system that you will be using on your web server and follow instructions.

Turning a computer into a web server can be a challenging task. This document guides you through the standard steps involved in setting up a web server on your MacOS, Windows, or Linux PC. If all goes well, the experience will be close to the one outlined here. The details will vary from server to server. In some cases, additional undocumented steps may be required. You may need to consult official online documentation or forums in unexpected situations.

The Audience of this Guide

This guide is intended for technicians who:

  1. Are comfortable navigating and configuring the operating system on their server.
  2. Know what a web server is and what it is used for.
  3. Are comfortable adapting general technical instructions to match their situation.

This guide is a compilation of the steps necessary to set up a web server so that you do not have to search for them on the internet. This guide cannot, however, teach you the necessary background from scratch. If you have limited experience, you may still be able to succeed through patience, perseverance, willingness to learn, and willingness to look for help in online forums and documentation. If you do not feel comfortable with the language in this manual, you will need to request the help of a more experienced technician.

Server Machine Pre-Requisites

The resources (RAM, MHz, etc) required by a web-server are decided by the web sites and web applications that will be installed on it and by the number of users that will accessing it simultaneously. Presently, a bottom-of-the-line off-the-shelf desktop PC is sufficient for a modest web-server and will be able to serve content to a few dozen simultaneous users. The recommended server specifications for each piece of CSLP software can be found in their overview pages.

Network Pre-Requisites

In order for a web-server to communicate with a user's computer, port 80 must not be blocked by any software or hardware between the server machine and the user machines. When troubleshooting network problems, examine anti-virus software, firewall software, routers and proxy-servers as any of them could be responsible for blocking port 80.

What is in this Manual?

This manual instructs you on how to:

  1. Turn your MacOS, Windows, or Linux PC into web server using IIS (PC) and Apache (Mac, Linux)
  2. Install the PHP scripting language (including the GD extension) on you web server
  3. Install the MySQL database software on your web server
Software Versions

The version numbers for the various components that this manual guides you to install may change over time. New versions are added while others become unavailable. We will always strive to use landmark versions that are regarded as particularly stable. We will not suggest upgrading versions merely because a new one has come out.

A Note About Multi-Purpose Servers

This document assumes that your server’s sole purpose is to be a web server that hosts one web application. It is certainly possible to use the same server for additional tasks but doing so adds new variables into the setup process and is therefore beyond the scope of this document.

What Next?

Next, read the software overview page for the LTK. Then continue by reading the overview for your server's operating system.

The Learning Toolkit (LTK) is a suite of applications working in tandem to develop students’ literacy and self-regulation skills. ePEARL, a dynamic, electronic portfolio, is at the heart of the LTK and it can be used alone or in conjunction with ABRACADABRA and with the SESI-21 prototype.

Minimum Server Requirements

Providing the LTK is the only application on the server:

  • Processor: 2 GHz minimum, 2.5 GHz (4-core) recommended
  • RAM: 2 GB minimum, 8 GB recommended
  • Internet connection: 300kb/s upload bandwidth minimum, 1000kb/s recommended

This recommendation supports 30 to 60 users using the portfolio at the same time.

Load Tests

The tests performed show the following results. Please note that the number of concurrent users represents the number of users that are performing an action at the same instant. In practice, a classroom of 30 students will never be perfectly synchronized, and will behave more like 10-20 concurrent users.

  • A 3200 MHz server supports 30 concurrent users, for an average response time of 1.6 seconds. Pages are received at 100 kb/s. For 25 users, the response time decreases to 1.33 seconds, and page reception is at 124 kb/s.
  • A server equaling 2 x 3060 MHz supports 60 concurrent users, for an average response time of 1.57 seconds. Pages are received at 39.9 kb/s. For 45 users, the response time decreases to 1.18 seconds, and page reception is at 52.3 kb/s
Required Software

The LTK uses the PHP scripting language and a MySQL database. The minimum required versions are 5.2.17 (with GD support) and MySQL 4.1. Apache or IIS may be used as the web server software.

Installing the LTK

After you have successfully set up and configured your web-server, you will need to download the LTK Administrator's guide and follow installations instructions. The latest version of the LTK and all it's guides are always available here: http://grover.concordia.ca/eportfolio/ltk_versions/

Windows web-server setup instructions guide you trough making a WIMP server. WIMP stands for Windows, IIS, MySQL, PHP which are the names of the server software and tools that this type of web server will use. Follow instructions found in each of the links below to set up your server.

These instructions were written following a Windows Server 2008 R2 server that runs IIS 7. However, the steps should be compatible to those needed for other versions of windows as well. If you find any important discrepancies, please let us know by writing to help.ltk@concordia.ca.

Remember your MySQL Login Information!

As you go through this procedure, remember to make note every time you are asked to choose a username or a password. Especially your MySQL login information.

Post-Installation Reference

When you are done installing your web server, here is what you will need to know. Write this down or remember to come back when you need it.

  • Web root directory: 
    C:\Inetpub\wwwroot
  • PHP configuration file: 
    C:\PHP\php.ini
  • How to start, stop, or restart IIS: 
    Start > Administrative Tools > Internet Information Services (IIS) Manager (in older versions, may be located at
    Start > Control Panel > Administrative Options > Internet Information Service)
  • Default MySQL login information (if you didn't change it): 
    username: root
    password: (blank)

Internet Information Services (IIS) is a web server that comes with Windows Server 2008. If it is not already installed on your computer, you may need your Windows Installation CD to install it. For older versions of Windows, the instructions are slightly different from Windows Server 2008. Please follow the instructions corresponding to your Windows version.

Windows Server 2008

The following instructions were written following a Windows Server 2008 R2 server that runs IIS 7.

  1. Installation:
    1. START > ADMINISTRATIVE TOOLS > SERVER MANAGER
    2. In the left-side pane, select ROLES
    3. Click ADD ROLES
    4. If you see the "Before You Begin" page, click NEXT
    5. Check the WEB SERVER (IIS) checkbox
    6. Click NEXT
    7. Click NEXT
    8. Check the CGI checkbox (and keep the ones already checked)
    9. Click NEXT
    10. Click INSTALL
    11. Click CLOSE

  2. Configuration:
    1. START > ADMINISTRATIVE TOOLS > INTERNET INFORMATION SERVICES (IIS) MANAGER
    2. Select the computer from the list of Connections
    3. Double-click on ISAPI AND CGI RESTRICTIONS
    4. Click on EDIT FEATURE SETTINGS...
    5. Check the ALLOW UNSPECIFIED CGI MODULES checkbox
    6. Check the ALLOW UNSPECIFIED ISAPI MODULES checkbox
    7. Click OK
Windows XP/2000/2003

The following instructions were written following a Windows 2003 server that runs IIS 5. However, the steps should be compatible with those needed for Windows XP, Windows 2000 and Windows 2003.

  1. Installation:
    1. START > CONTROL PANEL
    2. Double click on ADD REMOVE PROGRAMS
    3. Select ADD/REMOVE WINDOWS COMPONENTS
    4. Select INTERNET INFORMATION SERVICES (IIS)
    5. Click on DETAILS
    6. SELECT WORLD WIDE WEB SERVICE
    7. Click OK
    8. Click NEXT
    9. Click FINISH

  2. Configuration:
    1. START > CONTROL PANEL
    2. Double click on ADMINISTRATION TOOLS
    3. Double click on INTERNET INFORMATION SERVICES
    4. Open folders until you see the "Web Sites" folder
    5. Right click on the "Web Sites" folder and select PROPERTIES
    6. Click on the DOCUMENTS tab
    7. Click ADD
    8. Type: index.php
    9. Click OK
    10. Click OK

  3. Windows 2003 Only:
    1. START > CONTROL PANEL
    2. Double click on ADMINISTRATION TOOLS
    3. Double click on INTERNET INFORMATION SERVICES
    4. Open folders until you see the "Web Service Extensions" folder
    5. Change STATUS for "All unknown CGI Extensions" to ALLOW
    6. Change STATUS for "All unknown ISAPI Extensions" to ALLOW

PHP: Hypertext Preprocessor is a popular server-side scripting language used for building web pages. It can be downloaded for free. The minimum required version of PHP is 5.2.17 but the recommended version is 5.5.x. Please ensure that IIS (or Apache) is already installed before you install PHP.

  1. Installation:
    1. Download the PHP 5.5 "Non Thread Safe" zip file from: 
      http://windows.php.net/download/#php-5.5.
      Choose the zip that corresponds to your Windows architecture (32-bit or 64-bit)

      Note: If you are using Windows Server 2003 and use GPI importing, download the PHP 5.3 "Non Thread Safe" zip file instead. 

    2. Extract the contents to C:\PHP

  2. Configuration IIS with PHP 5.5:
    1. If you are using IIS 7+, open this guide: 
      http://php.net/manual/en/install.windows.iis7.php 

      If you are using IIS 5 or 6, open this guide: 
      http://php.net/manual/en/install.windows.iis6.php 

    2. Follow the instructions in the "Using IIS Manager user interface to create a handler mapping for PHP" section to map PHP to IIS

    3. (Optional) Follow the instructions in the "FastCGI and PHP Recycling configuration" and "FastCGI timeout settings" to adjust FastCGI settings

  3. Configuration PHP settings for LTK:
    1. Open php.ini for editing (PHP’s configuration file).
      C:\PHP\php.ini

    2. Make the following changes:
      1. Search for: upload_max_filesize
        Change this line to: upload_max_filesize = 20M
      2. Search for: memory_limit
        Change this line to: memory_limit = 128M
      3. Search for: post_max_size
        Change this line to: post_max_size = 25M
      4. Search for: php_gd2.dll
        Uncomment this line (remove ";" from the beginning of the line).
      5. Search for: session.auto_start
        Change this line to: session.auto_start = 0
      6. Search for: session.gc_maxlifetime
        Change this line to: session.gc_maxlifetime = 10800
      7. Search for: magic_quotes_gpc
        Change this line to: magic_quotes_gpc = Off
      8. Search for: register_globals
        Change this line to: register_globals = Off

    3. (Optional) If you plan to import student information from GPI databases, then keep php.ini open and proceed to Windows GPI Setup.

MySQL is a widely used open-source database. It is commonly used with web applications like ePEARL. We will guide you through installing the latest version of MySQL. The minimum required version of MySQL is 4.1 but version 5.5 is recommended.

  1. Installation & Configuration:
    1. Download MySQL Community Server fromhttp://www.mysql.com/downloads/mysql/5.5.html#downloads
      Choose the Installer that corresponds to your Windows architecture (32-bit or 64-bit)
    2. Double-click on the downloaded file to being MySQL installation. 

    3. Follow these instructions:
      1. Proceed until the "Setup Type" page of the wizard
      2. Select TYPICAL
      3. Click INSTALL
      4. "MySQL Enterprise" information window appears: 
        Click NEXT. 
        Click NEXT.
      5. Wizard Complete: 
        Check CONFIGURE THE MYSQL SERVER NOW. 
        Click FINISH.

    4. You will be taken to MySQL Server Instance Configuration Wizard. 
      Follow these instructions:
      1. Click NEXT on the welcome page
      2. Please select a configuration type: 
        Select STANDARD CONFIGURATION. 
        Click NEXT.
      3. Please set the Windows options: 
        Check INSTALL AS WINDOWS SERVICE. 
        Check LAUNCH THE MYSQL SERVICE AUTOMATICALLY. 
        Check INCLUDE BIN DIRECTORY IN WINDOWS PATH (optional) 
        Click NEXT.
      4. Please set the security options: 
        Check MODIFY SECURITY SETTINGS 
        Enter a new ‘root’ password. (Write this password down!) 
        Retype the password. 
        Uncheck ENABLE ROOT ACCESS FROM REMOTE (optional) 
        Uncheck CREATE AN ANONYMOUS ACCOUNT. 
        Click NEXT.
      5. Ready to execute: 
        Click EXECUTE.
      6. Click FINISH

Additional steps are required in order to support importing GPI school data. GPI requires a Microsoft SQL Server connections which requires additional PHP libraries. There have been major changes to the way PHP handles SQL Server connections in PHP 5 and different libraries must be included depending on your version.

It is highly recommended that you raise the server's PHP memory limit when importing from GPI.

  1. Open php.ini for editing (PHP’s configuration file).
    C:\PHP\php.ini

  2. Make the following changes:
    Search for: memory_limit
    Change this line to: memory_limit = 512M

After you have finished importing from GPI you can change your memory limit back to the recommended settings (128M).

PHP 5.4+: Additional PHP Configuration
  1. Download Microsoft Drivers for PHP for SQL Server:
    http://www.microsoft.com/en-us/download/details.aspx?id=20098 .
    1. Click "Download"
    2. Select an appropriate SQLSRV file corresponding to your setup, e.g. "SQLSRV32.EXE"
      See the following System Requirements to determine which version of SQLSRV you should download: https://msdn.microsoft.com/en-us/library/cc296170.aspx
    3. Click "Next"
    4. Save file to desktop

  2. Run the SQLSRV executable, e.g. "SQLSRV32.EXE":
    1. Click "Yes"
    2. Click "Browse" and select your PHP library folder (ext) most likely found under "C:\PHP".
    3. Click "OK"
    4. You should now have several new libraries added to your ext folder.

  3. Open php.ini for editing (PHP’s configuration file).
    C:\PHP\php.ini
    Make the following changes:
    1. Search for your other extensions: extension=
      Append the corresponding extension to the bottom of the extension list:
      • For PHP 5.6:
        extension=php_pdo_sqlsrv_56_nts.dll
      • For PHP 5.5:
        extension=php_pdo_sqlsrv_55_nts.dll
      • For PHP 5.4:
        extension=php_pdo_sqlsrv_54_nts.dll
      (Note this assumes you are using the recommended non-thread safe version of PHP)

  4. Note: If you are using SQLSRV Version 3.1 or higher and receive an error message when trying to use GPI that states the Microsoft ODBC Driver 11 is not installed, you can download it here: http://www.microsoft.com/en-us/download/details.aspx?id=36434

    Note: If you are using SQLSRV Version 3.0 and receive an error message when trying to use GPI that states the Microsoft SQL Server 2012 Native Client is not installed, you can download it from here: http://www.microsoft.com/en-us/download/details.aspx?id=29065
PHP 5.3.x: Additional PHP Configuration

Most systems must install the 3.0 Microsoft SQL Server Drivers.
Systems using Windows Server 2003 and older must install the 2.0 Microsoft SQL Server Drivers.

  • 3.0 Microsoft SQL Server Drivers

    1. Download Microsoft Drivers for PHP for SQL Server (version 3.0):
      http://www.microsoft.com/en-us/download/details.aspx?id=20098
      1. Click "Download"
      2. Select "SQLSRV30.EXE"
      3. Click "Next"
      4. Save file to desktop

    2. Run "SQLSRV30.EXE"
      1. Click "Yes"
      2. Click "Browse" and select your PHP library folder (ext) most likely found under "C:\PHP".
      3. Click "OK"
      4. You should now have several new libraries added to your ext folder.

    3. Open php.ini for editing (PHP’s configuration file).
      C:\PHP\php.ini
      Make the following changes:
      1. Search for your other extensions: extension=
        Append a new extension to the bottom of the extension list:
        extension=php_pdo_sqlsrv_53_nts.dll
        (Note this assumes you are using the recommended non-thread safe version of PHP)

    4. Note: If you recieve an error message when trying to use GPI that states the Microsoft SQL Server 2012 Native Client is not installed, you can download it from here: http://www.microsoft.com/en-us/download/details.aspx?id=29065
  • 2.0 Microsoft SQL Server Drivers (Windows Server 2003 and older)

    1. Download Microsoft Drivers for PHP for SQL Server (version 2.0):
      http://download.microsoft.com/download/C/D/B/CDB0A3BB-600E-42ED-8D5E-E4630C905371/SQLSRV20.EXE

    2. Run "SQLSRV20.EXE"
      1. Click "Yes"
      2. Click "Browse" and select your PHP library folder (ext) most likely found under "C:\PHP".
      3. Click "OK"
      4. You should now have several new libraries added to your ext folder.

    3. Open php.ini for editing (PHP’s configuration file).
      C:\PHP\php.ini
      Make the following changes:
      1. Search for your other extensions: extension=
        Append a new extension to the bottom of the extension list:
        extension=php_pdo_sqlsrv_53_nts_vc9.dll
        (Note this assumes you are using the VC9 version and the recommended non-thread safe version of PHP)

    4. Note: If you recieve an error message when trying to use GPI that states the Microsoft SQL Server 2008 Native Client is not installed, you can download it from here:
PHP 5.2.17: Additional PHP Configuration
  1. Open php.ini for editing (PHP’s configuration file).
    C:\PHP\php.ini
    Make the following changes:
    1. Search for: extension=php_pdo_mssql.dll
      Uncomment this line (remove ";" from the beginning of the line).
  2. Copy the file named ntwdblib.dll located in the C:\Windows\system32 folder on the Microsoft SQL server hosting your GPI databases into the same folder on the server hosting ePEARL.

Depending on your version of MacOS, it may come with some of these server components already installed. Apache, for instance, is standard with every version of MacOS and MacOS X Server and the instructions that follow simply tell you how to turn it on.

PHP and MySQL are trickier. While PHP is frequently installed, it lacks a need module and must be replaced. MySQL in inconsistently installed across different versions and the instructions therefor assume that it is not present - you are welcome to look up whether you already have MySQL installed, but there is no harm in simply installing it again.

The instructions below were written for Mac OS X Leopard Apache Web Server. If you find any important discrepancies, please let us know by writing to help.ltk@concordia.ca.

Apache
  1. APPLE MENU > SYSTEM PREFERENCE
  2. INTERNET AND NETWORK SHARING
  3. Select PERSONAL WEBSHARING

PHP

PHP 5 is installed in OS X Leopard by default, but the built-in Apache web server may not be configured to automatically run PHP. To enable PHP, the apache configuration file needs to be modified. This file is located in the following location:

/etc/apache2/httpd.conf

In order to edit this file, the permissions on the file must be changed. This can be accomplished by doing the following:

  1. Open a terminal windows (Applications -> Utilities -> Terminal)
  2. Change to the correct directory (cd /etc/apache2)
  3. Change the permissions on the file (sudo chmod 755 httpd.conf)

Once the file permissions are changed, you can use a tool like TextWrangler to open the httpd.conf file and modify it. After opening the httpd.conf file, we need to look for the following line:

#LoadModule php5_module libexec/apache2/libphp5.so

This line needs to be uncommented by removing the # in front of the line. Remove the # and then save the file.

PHP is now enabled, but we need to restart the apache web server for the changes to take effect. To restart the web server, do the following:

  1. Go to System Preferences -> Sharing View
  2. Uncheck the Web Sharing box. Then check the Web Sharing box again. This will start and stop the apache web server.

To test PHP, create a PHP file called test.php in the following directory

/Library/WebServer/Documents/

Enter the following URL to visit the page:

http://localhost/test.php

MySQL

Mac OS X Server v10.6 includes the MySQL v5.0. Because it’s preinstalled, you won’t find it in /usr/local/mysql. Instead, its elements are distributed in the file system according to standard UNIX file layout as follows:

  • MySQL executables are located in the /usr/sbin/ and /usr/bin/ folders.
  • MySQL man pages are located in the /usr/share/man/ folder.
  • Other MySQL parts are located in the /usr/share/mysql/ folder.
  • When installed, the MySQL database resides in the /var/mysql/ folder.

At some point a newer version of MySQL will be posted to www.mysql.com. At that time you can download the source and build it (if you have the developer packages installed) or you can download the relevant binary distribution and install it, following the instructions posted on that website.

By default, such installations reside in the /usr/local/mysql/ folder. If you install your own version of MySQL, you’ll have two versions of MySQL present on your system. This causes no harm as long as you don’t try to run the two versions at the same time.

Be sure to use commands intended for the new version by specifying the full path (starting with /usr/local/mysql/), or make sure your shell’s path variable is set to search in your local folder first.

Turning MySQL Service On

Before you can configure your database manager, you must turn MySQL service on in Server Admin.

  1. Open Server Admin and connect to the server.
  2. Click Settings, then click Services.
  3. Select the MySQL checkbox.
  4. Click Save.
You start MySQL service from Server Admin.
  1. Open Server Admin and connect to the server.
  2. Click the triangle at the left of the server.
  3. The list of services appears.
  4. From the expanded Servers list, select MySQL.
  5. Click Start MySQL (below the Servers list).

The service runs until you stop it and restarts if your server is restarted.

To start mysqld:
  1. $ sudo /usr/sbin/serveradmin start mysql
Setting Up MySQL Service

Use MySQL service settings in Server Admin to specify the database location, to enable network connections, and to set the MySQL root password.

  1. Open Server Admin and connect to the server.
  2. Click the triangle at the left of the server.
  3. The list of services appears.
  4. Click MySQL.
  5. Click Settings.
  6. Select the "Allow network connections" checkbox to permit users to access MySQL service.
  7. This grants users access to database information through the web server.
  8. Enter the path to the location of your database in the Database location field.
  9. You can also click the Choose button and browse for the folder you want to use.
  10. Click Save.
To set/change the root password:

The MySQL root password is not related to the Mac OS X Server root password.

  1. $ sudo /usr/sbin/serveradmin stop mysql
  2. $ sudo /usr/sbin/serveradmin settings mysql:rootPassword = password
  3. $ sudo /usr/sbin/serveradmin start mysql
To set/change the database location:

MySQL is preconfigured to use /var/mysql/ as the default database location. By default, changing the database location creates a database at the chosen path if one does not exist at that location.

  1. $ sudo /usr/sbin/serveradmin stop mysql
  2. $ sudo /usr/sbin/serveradmin settings mysql:databaseLocation = /path/to/new/ database/
  3. $ sudo /usr/sbin/serveradmin start mysql
To move a database to a new location:
  1. $ sudo /usr/sbin/serveradmin stop mysql
  2. $ sudo cp -Rp /oldpath/mysql /newpath/
  3. $ sudo /usr/sbin/serveradmin settings mysql:databaseLocation = /newpath/ mysql
  4. $ sudo /usr/sbin/serveradmin start mysql
To set the network option:
  1. $ sudo /usr/sbin/serveradmin stop mysql
  2. $ sudo /usr/sbin/serveradmin settings mysql:allowNetwork = yes
    Or
    $ sudo /usr/sbin/serveradmin settings mysql:allowNetwork = no
  3. $ sudo /usr/sbin/serveradmin start mysql
To setup remote access to MySQL and to grant access to all databases:
  1. $ mysql -u database_user -p database_name
  2. mysql> GRANT ALL PRIVILEGES ON *.* TO Username@hostname_or_IP_Address IDENTIFIED BY 'password' WITH GRANT OPTION;
Installing your own version of MySQL
  1. Download MySQL:
    1. Go to http://dev.mysql.com/downloads/mysql/
    2. Select the version that best matches your server

  2. Installation:
    1. Install mysql-x.x.xx-.dmg or .tar.gz
    2. Follow instructions

Linux setup instructions are organized differently than those for Windows and MacOS. Linux instructions are inconsistent from one distribution type to the next and so, rather than grouping instructions by server component, they are grouped by distribution type. In all cases you will be asked to run security updates on the server, disable it's firewall, and use it's built in package manager to install the needed software.

If you would like to try installing the software for a distribution type that is not covered below, you will probably be able to do so by taking hints from these instructions and doing a bit on only research. If you find any important discrepancies between your install experience and these instructions, please let us know by writing to help.ltk@concordia.ca.

Starting a System Shell Window

To install the software you’ll need to start a system shell, choose the following menu options:

Applications -> Accessories -> Terminal

Installing Security Updates

The computer on which you will be configuring the server software will need all security updates available for the software platform to be installed and current before you attempt the steps described in this document.

Enter the following commands in the shell window:

su

(When prompted, enter root password)

yum clean all

you will see a few lines of about about "Cleaning up"

yum update

(when prompted, accept the GPG certificates that are offered) you will be asked if you want to continue a few time [y/N] – say yes – this whole process could take several minutes. The last line will be "Complete!"

reboot

Disabling the Firewall

The software firewall is started by default. This firewall can interfere with network operations like web serving.

Enter the following commands in the shell window:

su

(When prompted, enter root password)

/usr/sbin/setup
(Use arrow keys and the tab key to navigate, select “Firewall configuration”, and then "Run Tool")

reboot

Security Level:

Press Tab to move Cursor to Disabled, press spasuce bar to select with asterisk.

SELinux:

  1. Press Tab to move to SELinux section, use arrow keys to select Disabled.
  2. Press Tab to move to OK button, press Enter key to confirm
  3. Press Tab twice to move to quit button, press Enter to confirm

reboot

 

Installing the Software

Enter the following commands in the shell window:

su

(When prompted, enter root password)

yum install httpd httpd-devel mysql mysql-server mysql-devel

You will see some output. Accept if asked to confirm or continue.

yum install php php-mysql php-common

You will see some output. Accept if asked to confirm or continue. Will end with Complete!

yum install php-gd php5-json php-mbstring php-mcrypt php-devel php-xml php-pear

(You may receive warnings that a package already exists on the system, don’t worry about them.)
You will see some output. Accept if asked to confirm or continue. Will end with Complete!

/sbin/service mysqld start

You will see a bunch of output and will be return to a command prompt.

/usr/bin/mysqladmin -u root password 'mysecretpassword'
(Please substitute your own unique password for 'mysecretpassword')

/sbin/chkconfig mysqld on
/usr/bin/pear install MDB2_driver_mssql

Bunch of output. Ignore message about updated protocols, options features and "to install use…"

/sbin/service httpd start

Bunch of output. Ignore message about "fully qualified domain name"

/sbin/chkconfig httpd on
chown -R username.username /var/www/html

you should see no output, just a new command prompt – username can be the user you are current logged in with?
(Place docs in /var/www/html)

Starting a System Shell Window

To install the software you’ll need to start a system shell, choose the following menu options:

Applications -> Accessories -> Terminal

Installing Security Updates

The computer on which you will be configuring the server software will need all security updates available for the software platform to be installed and current before you attempt the steps described in this document.

Enter the following commands in the shell window:

su

(When prompted, enter root password)

yum clean all

you will see a few lines of about about "Cleaning up"

yum update

(when prompted, accept the GPG certificates that are offered) you will be asked if you want to continue a few time [y/N] – say yes – this whole process could take several minutes. The last line will be "Complete!"

reboot

Disabling the Firewall

The software firewall is started by default. This firewall can interfere with network operations like web serving.

Enter the following commands in the shell window:

su

(When prompted, enter root password)

/usr/sbin/setup
(Use arrow keys and the tab key to navigate, select “Firewall configuration”)

On the screen marked “Firewall Configuration”:
You will be sent back to the command prompt for a second and then be taken to another tool.

  1. Press space bar to de-select option “Enabled” with asterisk.
  2. Press Tab key to select OK button, press Enter. When asked for confirmation, press Enter on the Yes button.
  3. You will be taken back to the command prompt for a second/ The select quit
  4. You will take back to the command prompt for real this time

cd /etc/selinux
nano config
SELINUX=disabled

Press Control-X to save and exit. Press Y to acces changes , and do not change then name of the file when asked.

reboot

Installing the Software

Enter the following commands in the shell window:

su

(When prompted, enter root password)

yum install httpd httpd-devel mysql mysql-server mysql-devel

say yes when needed, you will see al ot of output, when done the last line will be Complete! And you will be at a blank command line.

yum install php php-mysql php-common

say yes when needed, you will see al ot of output, when done the last line will be Complete! And you will be at a blank command line.

yum install php-gd php5-json php-mbstring php-mcrypt php-devel php-xml php-pear

(You may receive warnings that a package already exists on the system, don’t worry about them.)
say yes when needed, you will see al ot of output, when done the last line will be Complete! And you will be at a blank command line.

/sbin/service mysqld start

You will see a bunch of output and will be return to a command prompt.

/usr/bin/mysqladmin -u root password 'mysecretpassword'
(Please substitute your own unique password for 'mysecretpassword')

/sbin/chkconfig mysqld on
/usr/bin/pear install MDB2_driver_mssql

Ignore warnings about "New Update Protocalls". New prompt

/sbin/service httpd start
/sbin/chkconfig httpd on
chown -R username.username /var/www/html

you should see no output, just a new command prompt – username can be the user you are current logged in with?
(Place docs in /var/www/html)

Starting a System Shell Window

To install the software you’ll need to start a system shell, choose the following menu options:

Applications -> System -> Terminal -> XTerm

Disabling the Firewall

The software firewall is started by default. This firewall can interfere with network operations like web serving.

Enter the following commands in the shell window:

su

(When prompted, enter root password)

sysconf_addword /etc/sysconfig/SuSEfirewall2 FW_CONFIGURATIONS_EXT apache2

You will be taken to an empty command prompt, no messages

rcSuSEfirewall2 restart

You will see a few lines of text – ignore warnings about apache2 not existing

reboot

Installing the Software

Enter the following commands in the shell window:

su

(When prompted, enter root password)
(Note: when you launch the first command, you will see a window open which updates hundreds of packages to install security updates. Allow these updates to install fully.)

yast2 –-install apache2

you might not see anything for a while

yast2 –-install mysql mysql-tools
yast2 –-install php5 php5-mysql apache2-mod_php5
yast2 –-install php5-gd php5-json php5-mbstring php5-mcrypt php-xml php5-pear
rcmysql start
mysqladmin -u root password 'mysecretpassword'

(Please substitute your own unique password for 'mysecretpassword')

chkconfig -a mysql
pear install MDB2_driver_mssql
a2enmod php5
a2enmod -l
rcapache2 restart
chkconfig -a apache2

(place docs in /srv/www/htdocs) (Use yast2 in, System Services (Run level): Services to add apache2 and mysql to startup run levels.)

Security Updates

The computer on which you will be configuring the server software will need all security updates available for the software platform to be installed and current before you attempt the steps described in this document. You can start the updates by choosing the following menu options:

System -> Administration -> Update Manager

(this could take some time, and you may be asked to restart afterwards)

Starting a System Shell Window

To install the software you’ll need to start a system shell, choose the following menu options:

Applications -> Accessories -> Terminal

Installing the Software

Enter the following commands in the shell window:

sudo tasksel install lamp-server

(When prompted, enter root password)
This can take some time, you will see a graphical progress bar
(When prompted, assign a mysql root password)
when this command is done, you will be taken back to the command line

sudo apt-get install php5-gd

You will see a bunch of output, and will be occasionally asked to confirm [Y/n] that you want to continue. This should take less that a minute.

sudo apt-get install php-pear

You will see a bunch of output, and will be occasionally asked to confirm [Y/n] that you want to continue. This should take less that a minute.

sudo apt-get install php5-json

You will see a bunch of output, and will be occasionally asked to confirm [Y/n] that you want to continue. This should take less that a minute.

sudo pear install MDB2_driver_mssql

You will see a bunch of output, and will be occasionally asked to confirm [Y/n] that you want to continue. This should take less that a minute.

sudo /etc/init.d/apache2 restart

You should see

* Restarting Web Server apache2

and a bit more output – should take less than ten seconds

sudo chown -R username.username /var/www

In the above command, replace username with your username. You should see no output, just a new command prompt.

(Place documents in /var/www)
now you can go ahead and place files in this directory

sudo /etc/init.d/apache2 restart

(Optional step: download phpMyAdmin from www.phpmyadmin.net)

(File locations)
WEBROOT: /var/www
PHPINI: /etc/php5/apache2/php.ini

Back to top

© Concordia University