Project httpsrv 1.0 – Script to compile, install and manage on DEB based Linux

Httpsrv 1.0 is my attempt to make it easier to compile your own LAMP STACK on Linux
This guide applies to and are tested for Ubuntu but will probably work on Debian as well as Linux Mint
The tutorial expects that you are logged in as root or using sudo -i and firewalls are turned off
Also update your system before doing this update, upgrade, dist-upgrade and reboot
(This webserver can run Magento, wordpress and more)

Video: Click here to watch on YouTube

1 Download ”httpsrv” and extract the zip archive to your desktop. Click here to download httpsrv

2 Download sources as (tar.gz) and (.rpm) Save them to the folder httpsrv/src on your desktop.
Downloadpage for php:
Downloadpage for apache:
Downloadpage for mysql:
Downloadpage for phpmyadmin:
Downloadpage for apr and apr-util:

3 Rename all of the downloaded sources and archives to not include the version numbers.
Ex: php.tar.gz, httpd.tar.gz, mysql.rpm, phpMyAdmin.tar.gz, apr.tar.gz, apr-util.tar.gz

4 Upload the folder ”httpsrv” to /srv on your server e.g by using ftp =)

5 Install dependencies and recomended software (Run all steps below as root or sudo)
Copy and paste one line at a time

apt-get install libpcre3-dev libbz2-dev libfreetype6-dev libicu-dev g++ libxslt-dev -y
apt-get install gcc make nano libjpeg-dev libpng-dev libxml2-dev libcurl4-openssl-dev -y
apt-get install libssl-dev libmcrypt-dev libreadline-dev pkg-config -y

6 Install MySQL repository from DEB. Install, configure and start the database.
Copy and paste one line at a time

cd /srv/httpsrv/src && dpkg -i mysql.deb
apt-get update && apt-get install mysql-client mysql-server -y

7 Untar tar.gz arcives into the folder /srv/httpsrv/src on your Linux server.
Copy and paste one line at a time

tar zvxf php.tar.gz && mv php-* build/php
tar zvxf httpd.tar.gz && mv httpd-* build/httpd
tar zvxf phpMyAdmin.tar.gz && mv phpMyAdmin-* ../phpmyadmin
tar zvxf apr-util.tar.gz && mv apr-util-* build/httpd/srclib/apr-util
tar zvxf apr.tar.gz -C build && mv build/apr-* build/httpd/srclib/apr

8 Edit /srv/httpsrv/src/script/init_httpsrv and change variables if you need to
Change the variable ‘MySQL Socket’ from SOCK=/var/lib/mysql/mysql.sock to: SOCK=/run/mysqld/mysqld.sock
This step is important since /run/mysqld/mysqld.sock is the default searchpath to the mysql socket-file

9 Run the script for installation and create tables for phpmyadmin
Copy and paste one line at a time

cp -f script/init_httpsrv /etc/init.d/httpsrv && chmod 775 /etc/init.d/httpsrv
/etc/init.d/httpsrv web_conf
/etc/init.d/httpsrv web_make
/etc/init.d/httpsrv php_conf
/etc/init.d/httpsrv php_make
/etc/init.d/httpsrv install
/etc/init.d/httpsrv link
mysql -u root -p < ../phpmyadmin/sql/create_tables.sql

10 Edit: /srv/httpsrv/conf/httpd.conf. Find the line that reads ”ServerRoot”
Define a new variable and call it ”root_path” on the row below the ”ServerRoot” directive.
This variable will be used in the configuration file for phpMyAdmin.

Change the path on the variable to whatever the ”ServerRoot” directive points to.

Define root_path /srv/httpsrv

11 Again Edit: /srv/httpsrv/conf/httpd.conf and add or replace to bellow.

ServerName httpsrv:80
User httpsrv
Group httpsrv
DirectoryIndex index.html index.htm index.php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# Add this line to the bottom of your configuration.
# Configurationfile for phpmyadmin, aliases and permissions:
Include conf/extra/phpmyadmin.conf

12 Restart httpsrv and configure autostart:
Copy and paste one line at a time

update-rc.d httpsrv defaults
/etc/init.d/httpsrv restart

Link to more reading and disclaimer for httpsrv

Donation are not required but very much appreciated.
Click the below link to donate with PayPal (PayPal.Me)