Dolibarr Installation

 Dolibarr Installation using PHP, MySQL, Apache


Apache HTTPD Server Project Configuration

(https://httpd.apache.org/docs/2.4/install.html)
Downloaded httpd-2.4.48.tar.gz
Extracted and renamed by following 2 commands
tar -xvf httpd-2.4.48.tar.gz
mv httpd-2.4.48.tar.gz httpd-2.4.48
Run from /opt/httpd folder ./configure
Got configure: error: APR not found.  Please read the documentation
Downloaded expat-2.2.6.tar.gz
 tar -xvf expat-2.2.6.tar.gz 
  mv expat-2.2.6 /opt/httpd-2.4.48/srclib/
Navigate to expat-2.2.6 folder
  ./configure --prefix=/usr/local/expat
make
make install

Downloaded apr-1.7.0.tar.gz
 tar -xvf apr-1.7.0.tar.gz 
  mv apr-1.7.0 /opt/httpd-2.4.48/srclib/apr
Navigate to apr folder
  ./configure --prefix=/usr/local/apr
make
make install

Downloaded apr-util-1.6.1.tar.gz
tar -xvf apr-util-1.6.1.tar.gz
mv apr-util-1.6.1 /opt/httpd-2.4.48/srclib/apr-util
Navigate to apr-utilfolder
  ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-expat=/usr/local/expat
make
make install

yum install openssl-devel
yum install libcurl-devel
yum install libicu-devel
yum install php-gd
yum install libzip-devel
yum -y install libpng*
Downloaded curl 7.78.0.tar.gz
After installing openssl, tar xvf curl-7.78.0
./configure --prefix=/usr/local/curl --with-openssl
make
make install


Downloaded pcre-8.00.tar.gz
Download PCRE from their website
Compile it with a prefix and install it:
./configure --prefix=/usr/local/pcre
make
make install


Go back to where Apache installation is and compile Apache with PCRE:

--with-pcre=/usr/local/pcre

./configure --prefix=/opt/httpd --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-cgi  --enable-info  --enable-rewrite  --enable-speling  --enable-usertrack  --enable-deflate  --enable-ssl  --enable-mime-magic
make
make install

After the build, go to /opt/httpd/conf directory and vi httpd.conf
Enable the line where ServerName is

Installing php
In the PHP source directory, create a Makefile by typing:

./configure --prefix=/usr/local/apache/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/opt/mysql --with-config-file-path=/usr/local/apache/php --enable-force-cgi-redirect --disable-cgi --with-zlib --with-gettext  --enable-calendar --with-curl==/usr/local/curl --enable-intl --enable-zip --with-mysqli --with-gd

Run the commands 

make

make install
Install the php.ini file:
cp -p php.ini-production /usr/local/apache/php/php.ini

Add these directives are in /usr/local/apache/conf/httpd.conf (if already there, verify they are correct):
# Make sure there's only **1** line for each of these 2 directives:
# Use for PHP 4.x:
#LoadModule php4_module	modules/libphp4.so
#AddHandler php-script	.php

# Use for PHP 5.x:
LoadModule php5_module	modules/libphp5.so
AddHandler php5-script	.php 

# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php

AddType text/html	.php

# PHP Syntax Coloring
# (optional but useful for reading PHP source for debugging):
AddType application/x-httpd-php-source phps
Enabling PHP 

under usr/local/apache/php folder Rename the file php.ini-production to php.ini 

file_uploads = On
allow_url_fopen = On
memory_limit = 512M
upload_max_filesize = 100M
max_execution_time = 360

in php.ini file
date.timezone = america/new_york
post_max_size = 16M

Follow - 
https://httpd.apache.org/docs/current/install.html
http://dan.drydog.com/apache2php.html

Database creation

mysql -u root -p
CREATE DATABASE dolibarr;
CREATE USER 'dolibarruser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON dolibarr TO 'root'@'localhost';
ALTER USER 'dolibarruser'@'localhost' WITH MAX_QUERIES_PER_HOUR 90;
FLUSH PRIVILEGES;
Navigate to /usr/local/apache/htdocs/dolibarr
touch htdocs/conf/conf.php
chown root:root  htdocs/conf/conf.php
 chmod 777  htdocs/conf/conf.php





Comments

Popular posts from this blog

MySQL Installation on Linux