# FAQ

## Contents

1. What are the required software to run OrangeHRM?
2. How to install OrangeHRM manually on Linux?
3. How to install OrangeHRM manually on Windows?
4. How to install the pre-requisities manually on Windows?

## 1. What are the required software to run OrangeHRM?

You will need to be running an Operationg System that supports the Apache HTTP Server and MySQL database server. In addition to that following pre-requisities must be installed.

1. Apache HTTP Server 1.3 or later
2. MySQL 5.5 or later
3. PHP 5.6 or later

Instead of installing above mentioned pre-requisities seperately, it is possible to install a stack which has MySQL, Apache and PHP configured to work together.

## 2. How to install OrangeHRM manually on Linux?

For Linux Installation these steps should be followed;

1. Retrieve the PHP source of OrangeHRM onto the directory that is configured as Apache Server htdocs directory;
   ex: /var/www/html/orangehrm/
2. Change the owner & group of the source directory (and all files and sub-directories within it) to apache (on most Linux distributions the user/user-group of apache webserver is set to apache/apache, if your apache web server's httpd.conf has another user/user-group please use that user instead ex: nobody). Run the following command in bash.
   ex: /var/html/orangehrm/
   chown -R apache.apache /var/www/html/orangehrm/
3. Now you need to create the database. To do this get to the MySQL prompt (you should be logged in as a user having rights create databases and users). Create the database using command; (please note down the database name), and change into the database using 'USE'.
   CREATE DATABASE <orangehrm-db-name>
   USE <orangehrm-db-name>
   then you need to create the tables using the script dbscript.sql residing in /orangehrm/dbscript directory. Then type in command
SOURCE <path-to-doc-root>/orangehrm/dbscript/dbscript.sql
4. In the MySQL server create a user account with all priviledges, please note down the username and password since it will be required to configure the application to give it access to the database in step (5). You will also need the database name given in step (3). Use the commands as follows (Note: the second command is required if your PHP distribution has a MySQL client older than 4.1);
   GRANT ALL PRIVILEGES ON <orangehrm-db-name>.* TO '<username>'@'%' IDENTIFIED BY '<password>' WITH GRANT OPTION;
   SET PASSWORD FOR '<username>'@'%' = OLD_PASSWORD('<password>');
5. Then you have to configure the application to give the authentication information it requires to access MySQL server. To do this rename file Conf.php-distribution(in /orangehrm/lib/Confs/Conf.php)to Conf.php and edit following settings. Set the following parameters;
   $this->dbhost = '<IP address of MySQL server>';
   $this->dbport = '<port no, of MySQL server>';
   $this->dbname = '<orangehrm-db-name>';
   $this->dbuser = '<username>'; //the user name of the account you created
   $this->dbpass = '<password>'; //the user name of the account you created
6. Start or restart Apache server

## 3. How to install OrangeHRM manually on Windows?

For Windows Installation these steps should be followed;

1. Extract the PHP source of OrangeHRM onto the directory that is configured as Apache Server htdocs directory;
   ex: C:\apache\Apache2\htdocs\orangehrm\
2. Now you need to create the database. To do this get to the MySQL prompt (you should be logged in as a user having rights create databases and users). Create the database, and change into the database using 'USE'; (please note down the database name)
   CREATE DATABASE <orangehrm-db-name>
   USE <orangehrm-db-name>
   then you need to create the tables using the script dbscript.sql residing in /orangehrm/dbscript directory. Type in command
SOURCE C:\apache\Apache2\htdocs\orangehrm\dbscript\dbscript.sql
3. In the MySQL server create a user account with all priviledges, please note down the username and password since it will be required to configure the application to give it access to the database in step (5). You will also need the database name given in step (2). Use the commands as follows (Note: the second command is required if you your PHP distribution has a MySQL client older than 4.1);
   GRANT ALL PRIVILEGES ON <orangehrm-db-name>.* TO '<username>'@'%' IDENTIFIED BY '<password>' WITH GRANT OPTION;
   SET PASSWORD FOR '<username>'@'%' = OLD_PASSWORD('<password>');
4. Then you have to configure the application to give the authentication information it requires to access MySQL server. To do this rename file Conf.php-distribution(in /orangehrm/lib/Confs/Conf.php)to Conf.php and edit following settings. Set the following parameters;
   $this->dbhost = '<IP address of MySQL server>';
   $this->dbport = '<port no, of MySQL server>';
   $this->dbname = '<orangehrm-db-name>';
   $this->dbuser = '<username>'; //the user name of the account you created
   $this->dbpass = '<password>'; //the user name of the account you created

## 4. How to install the pre-requisities manually on Windows?

1. Download Apache HTTP Server, PHP Windows package, MySQL server
   Versions Requirements :
   - Apache HTTP Server ver 1.33 or later
   - PHP Windows package ver 5.6 or later
   - MySQL Server ver 5.5 or later

   #### Note

   Download PHP complete ZIP package from http://www.php.net/downloads.php. Usually it comes in the form of php-x.x.x-Win32.zip. (do not use the windows installer package since it only contains the CGI interpreter, and contains no extensions)

2. Firstly Install Apache HTTP Server by following these steps;
   1. Accept the license agreement and press next
   2. Press next again after reading about Apache HTTP Server
   3. When promted for details about; Network Domain, Server Name, etc., use the values below :

      Network Domain | : | localhost
      Server Name | : | localhost
      Admin. Email | : | <your Email-id>

      press next
   4. If you are installing Apache HTTP server 2, then
      Select Install Apache HTTP Server 2.0 as a Service.
   5. Choose custom installation.
   6. change path of apache to directory
      c:\apache\
   7. Install server

   #### Note

   In case you are using a firewall software, please make sure the you give (allow) access to Apache HTTP server.

3. Secondly you have to install PHP;
   1. unzip the PHP package you downloaded into directory.
      c:\php\
   2. Then open the file in the apache installation directory
      C:\apache\Apache2\conf\httpd.conf"
   3. Then goto the area where the LoadModule tags are defined. In the list there should be one line that reads as
      # LoadModule rewrite_module modules/mod_rewrite.so
      Remove the leading '#' char to make the line active
   4. Goto the end of LoadModule section

   #### Note

   if you are using PHP5 the LoadModule lines should be altered as

   LoadModule php5_module "c:/php/php5apache.dll"
   OR
   LoadModule php5_module "c:/php/php5apache2.dll"
   OR
   LoadModule php5_module "c:/php/php5apache2_2.dll"
   for Apache 1.3 / Apache 2 / Apache 2.2 Web servers respectively. Also add line;
   PHPIniDir "C:/php"
   5. Then at the end of AddType section add line
      AddType application/x-httpd-php .php
   6. Save and close httpd.conf
   7. Now goto directory
      c:\php\
      and open file
      c:\php\php.ini

   #### Note

   if the php.ini file does not exist then rename exisiting file php.ini-dist as php.ini and open it

   8. Find these key-words in it and change them if required
      error_reporting = E_ALL
      display_errors = On
      for PHP5, extension_dir should read as;
      extension_dir = “c:\php\ext”
      and in the 'Dynamic Extension' area should have;
      'extension=php_mysql.dll',
      'extension=php_xmlrpc.dll',
      'extension=php_xsl.dll'
      enabled by removing preceding ';' if any
   9. Save & close php.ini
4. Restart Apache Server(on windows; through the Apache Server Monitor on task bar)
5. Start installing MySQL server

1. Double-click the setup.exe file to start the installation. The Setup Wizard panel is displayed.
2. Click Next.
3. Select Custom Install and click Next.
4. Expand the Developer Components and select “Scripts.Examples” to run from your hard drive
5. Change installation directory to
   C:\MySQL
6. Click next
7. When promted to signup for MySql.com account select skip sign-up, press next.
8. The installation setup wizard is complete, leave the checkmark next to the field,
   Configure the MySQL Server now.
   Click Finish.
9. Click Next to begin the configuration process,
10. accept the default value of Detailed Configuration for the configuration type
    click Next.
11. Select Sever Machine for the server type and click Next.
12. Select Transactional Database Only for the database usage and click Next.
13. For the InnoDB Tablespace Settings, select MySQL Datafiles from the dropdown list
    Click Next.
14. Select Manual Setting for the number of concurrent connections.Set this value to 5 (depending on number clients using the application)
    Click Next.
15. Accept the default value of Enable TCP/IP Networking for the networking options and click Next.
16. Accept the default value of Standard Character Set for the default character set and click Next.
17. Accept the default value of Install as Windows Service for the Windows. You may explicitly identify which version of MySQL is running (you need not worry if you are having only single MySQL server) Check the box to Include Bin Directory in Windows.
    Click Next.
18. Always select a new root password when you install MySQL for the first time. That is because MySQL normally has no password in Windows which allows anyone to access the database. Make sure you remember what the password is.
    Remove the check mark next to the Anonymous Account.
    Click Next.
19. All of the information required by the configuration wizard is complete.
    Click the Execute button to begin the actual configuration.
20. After all the status messages are issued, click the Finish button.