Tuesday, March 23, 2010

Installing SquirrelMail 1.4.20 RC2

SquirrelMail is an application that provides web-based access to POP or IMAP email servers.

Prerequsites
Web server enabled to server php pages
PHP
Email server
Perl

Versions used
Apache 2.2.8
PHP 5.2.8
Hmailserver 5.3
Perl 2.6

Steps
  1. Download the zip package from the website, squirrelmail.org
  2. Extract the zip file to a temporary location e.g. C:\temp
  3. Create a new folder named squirrelmail in the webroot folder of the web server e.g. In c:\apache\htdocs
  4. Copy the contents of c:\temp\squirrelmail-1.4.20-RC2 to c:\apache\htdocs\squirrelmail
  5. Create the folders c:\squirrelmail\data and c:\squirrelmail\attachments
  6. Open a command prompt window and change directory to c:\apache\htdocs\squirrelmail\config
  7. Type perl conf.pl
  8. A menu driven command interface is displayed
  9. Review the different options. Modify the server settings [domain name, imap server, smtp server [use IP e.g. 127.0.0.1 for the last two]] and general settings [data directory, attachment directory. Set them to the directories created above]
  10. Save data when finished and quit
  11. This will create a new file, c:\apache\htdocs\squirrelmail\config\config.php with the appropriate config information
  12. Using a browser, navigate to localhost/squirrelmail
  13. To log in, use the credentials of an available email account on the configured mail server

Installing Roundcube 0.3.1

Roundcube is an application that provides web-based access to IMAP email servers.

Prerequisites
Web server with php configured
PHP
Email server
RDBMS

Versions used
Apache 2.2.8
PHP 5.2.8
Hmailserver 5.3
MySQL 5.0.45

Steps
  • Download the roundcube tar.gzip package from the roundcube website, roundcube.net
  • Unzip the zip and tar to a temporary location e.g. C:\temp
  • Create a new folder named roundcubemail in the webroot folder of the web server e.g. In c:\apache\htdocs
  • copy the contents of c:\temp\roundcubemail-0.3.1 to c:\apache\htdocs\roundcubemail
  • Open a command prompt window
  • Type mysql -u root -p
  • Enter the password for the mysql root user
mysql> create database roundcube;
mysql> grant all privileges on roundcube.* to roundcube@localhost identified by "roundcube";
> quit
  • Using a browser, navigate to localhost/roundcubemail/installer/
  • Click on the start installation button
  • Click on the next button
  • Disable spell checking, set details for the database and IMAP server
  • Click on the create config button
  • Create a new file named main.inc.php in c:\apache\htdocs\roundcubemail\config and paste the contents of the main.inc.php section to it
  • Edit this file, main.inc.php, setting the smtp authentication details [for servers that require smtp authentication].
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = 'valid user account';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = 'valid password';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = 'LOGIN';
  • Create a new file named db.inc.php in c:\apache\htdocs\roundcubemail\config and paste the contents of the db.inc.php section to it
  • Click on the continue button
  • Click on the initialize database button
  • Fill in appropriate details for testing smtp settings and click on the send test mail button
  • Fill in appropriate details for testing the imap configuration and click on the check login button
  • Open a new browser window and navigate to localhost/roundcubemail
  • Log in with details of a valid email account

Installing phpMyAdmin 3.1.1

phpMyAdmin is a web-based application used to administer MySQL databases.

Prerequisites
Web server configured to process PHP pages
PHP

Versions used
PHP 5.2.8
Apache  2.2.8

Steps
  1. Download the package from the phpMyAdmin website, phpmyadmin.net.
  2. Unzip the package to a folder in the web server's document root, e.g. phpMyAdmin
  3. Create a folder named config in this home folder
  4. Navigate to http://yourserver/phpmyadmin/setup/ to set up the config.inc.php file in the config folder
  5. Click on the New Server to specify the details of the MySQL server to administer. Specify the hostname for the server. Other options can be left as default. Save these options.
  6. Save the new configuration
  7. Edit the newly created file ./config/config.inc.php. Change the blowfish_secret value to a different string that must contain numbers, letters and special characters e.g. my2blowfish$ecret.
  8. Move the file to the root of the phpmyadmin directory.
  9. The installation is complete and you can navigate to yourwebserver/phpmyadmin to start using it. Login with a valid MySQL login to the server configured for administration.
  10. If you are upgrading your installation, copy the config.inc.php file to your new installation/folder.

Installing Mantis 1.1.6

Mantis is an open source web-based bug tracking system.

Prerequisites
Web server configured to process PHP pages
PHP
MySQL

Versions used
PHP – 5.2.8
Apache -  2.2.8
Mantis – 1.1.6

Steps

  • Download the package from the mantis website, mantisbt.org
  • Unzip the package to a folder in the web server's document root, e.g. Mantis
  • Create a database on the MySQL server e.g.
mysql> create database mantis;
mysql> grant all on mantis.* to mantis@localhost identified by 'password';
mysql> flush privileges;
mysql> quit;
  • Open your browser and navigate to yourserver/mantis/admin/install.php. This will run the installer. Provide database connection details
  • Installation is complete. Login as the admin user with the username administrator and password root. Change the default password once logged in.
  • Delete the \mantis\admin folder so that install scripts are not re-run by mistake.
Configuring mantis
To configure mantis e.g. to send email, edit the c:\apache\mantis\config_inc.php file. Add the following.
// Setting up the mail 
    $g_phpMailer_method='2'; //smtp
    $g_smtp_host='smtp.server.address';

//for smtp authentication. If not required, set to ''
    $g_smtp_username='email address';
    $g_smtp_password='password';

// Configure email addresses system 
        $g_administrator_email='email address';
        $g_webmaster_email=$g_administrator_email; //shown on mantis pages
        $g_from_email='email address'; //from address for emails generated by mantis
$g_from_name= 'Mantis Bug Tracker';
    $g_return_path_email='email address';

// Setting the language and date format
        $g_default_language='english';
        $g_short_date_format='d-m-Y';
        $g_normal_date_format='d-m-Y H:i';
        $g_complete_date_format='d-m-Y H:i';
// Customizing Mantis
        $g_window_title='My Mantis';

Installing AtMail open 1.03

AtMail is an application that provides web-based access to IMAP email servers.

Prerequisites
Web server with php configured
PHP
Email server
RDBMS

Versions used
Apache 2.2.8
PHP 5.2.8
Hmailserver 5.3
MySQL 5.0.45

Steps
  1. Download the installation package from artmail.org
  2. Unzip the zip and tar to a temporary location e.g. C:\temp
  3. Create a new folder named atmail in the webroot folder of the web server e.g. In c:\apache\htdocs
  4. Copy the contents of c:\temp\atmail to c:\apache\htdocs\atmail
  5. Using a browser, navigate to localhost/atmail
  6. Follow the configuration steps given
  7. Log in using appropriate email details

Installing Apache HTTP server 2.2.8

Apache HTTP server is an open source web server.

Prerequisites
None

Steps
  1. Download package from Apache HTTP server website, http://httpd.apache.org/
  2. Uninstall any previously installed version of Apache and delete all the folders where Apache was installed.
  3. Ensure no service is listening to port 80. Stop/disable any that are, e.g. IIS, Skype. This isn't mandatory as the port that Apache will listen to can be updated after the installation is done.
  4. Run the installer.
  5. On the Server Information page, put in “localhost” for the network domain and server name. Put anything for the administrator's address e.g. admin@localhost.com. Leave the default selection to install for all users to port 80 as a service.
  6. Click Next and choose Typical Installation
  7. Click Next and change the destination folder to C:\Apache instead of the default installation path. This is to avoid permission inconveniences when making updates if one installs to the Program Files folder.
  8. The Apache Service Monitor [feather icon] should show on the task bar after installation is complete.
  9. Navigate to http://localhost. If the page says “It works!”, then installation was successful.

To change the port on which Apache should listen e.g. if IIS was already listening on port 80 and it isn't desired to change this, update the httpd.conf file in the conf directory within the Apache install path. Change instances of port 80 to another unused port e.g. 8080. The editor needs to be run as administrator to be able to save the changes if installation was done to the Program Files folder. Restart Apache using the Apache monitor and navigate to http://localhost:8080 to confirm the changes work OK.



Setting up SSL (for https access)
  • Create an environment variable named OPENSSL_CONF with the value C:\Apache\conf\openssl.cnf
  • Open a command prompt window and navigate to c:\apache\bin
  • Type the following command sequence
openssl genrsa -des3 -out server.key 1024
  • Provide a pass phrase when prompted (4-500 characters)
openssl rsa -in server.key -out server.pem
openssl req -new -key server.key -out server.csr
  • After providing the passphrase, provide the requested information. Set the common name to localhost (or the fully qualified domain name for the web server). The other fields can be set as appropriate or left blank. Leave the extra information fields blank.
openssl x509 -req -days 999 -in server.csr -signkey server.key -out server.crt
  • Copy the files server.crt and server.pem from the c:\apache\bin folder to the c:\apache\conf folder

  • Edit the c:\apache\conf\http.conf file
  • Uncomment the line for loading the ssl module
LoadModule ssl_module modules/mod_ssl.so
  • Uncomment the line that includes ssl configuration
Include conf/extra/httpd-ssl.conf
  • Edit the c:\apache\conf\extra\httpd-ssl.conf
  • Set the SSLCertificateKeyFile attribute
SSLCertificateKeyFile "C:/Apache/conf/server.pem"
  • Also ensure the SSLCertificateFile attribute points to the server.crt file just created
SSLCertificateFile "C:/Apache/conf/server.crt"
  • Restart apache and try to access a website via https e.g. https://localhost/myapp/ (no need to specify the port number e.g. https://localhost/443/myapp)