LibreLAMP Installation

Installing LibreLAMP on RHEL/CentOS 7 is rather easy, thanks to the yum package manager.

For installation help with the operating system itself, please refer to the RHEL/CentOS 7 documentation.

If you are looking for a good virtual hosting company, I would highly recommend Linode. I have been their customer since 2008 and they have always always been good to me. Select a CentOS 7 image and you are good to go. This website is hosted on a CentOS 7 Linode.

Enable the EPEL Package Repository

EPEL is a package repository containing quality RPM packages for RHEL/CentOS that do not ship in the base distribution. Some packages in LibreLAMP require packages in EPEL.

First check to see if it is already installed:

rpm -q epel-release

If that package is not installed on CentOS 7 systems, you can install it (as the root user) with the following command:

yum -y install epel-release

For Red Hat Enterprise Linux, it is a little more complicated. See the EPEL documentation at http://fedoraproject.org/wiki/EPEL.

Optional: The haveged Daemon

Good cryptography depends upon quality random numbers.

Good random generation requires good sources of entropy. The haveged daemon, packaged in the EPEL package repository, increases the entropy of the sources used to generate random numbers in Linux.

To install and enable it:

yum -y install haveged
systemctl enable haveged.service
systemctl start haveged.service

Once that is done, for all practical purposes you can forget about it. It will start whenever the server boots and just do its thing.

Backup and Stop MariaDB

If you are already running the MariaDB database server, LibreLAMP has a major version update to what ships in CentOS. It is recommended that you back-up all your databases and stop the database server before installing LibreLAMP.

Things will probably be okay if you do not, but it is safer to do so.

Install LibreLAMP

Once the epel-release package has been installed, you can install the awel-libre-release package:

curl -O https://librelamp.com/awel-libre-release-7-3.noarch.rpm
rpm -ih awel-libre-release-7-3.noarch.rpm
yum clean all && yum update

That’s it! Any existing RHEL/CentOS 7 LAMP packages will be replaced by the LibreLAMP equivalents, and you can now easily install additional LibreLAMP packages.

Individual Component Installation

To install the Apache web server with TLS support:

yum install httpd mod_ssl

Some configuration advice can be found on the Apache TLS Configuration page.

To install the MariaDB database server and client:

yum install mariadb mariadb-server

To install a basic PHP environment with support for MariaDB:

yum install php php-pear php-mysqlnd php-pdo

For a full listing of available PHP packages in LibreLAMP, please see http://awel.domblogger.net/7/libre/x86_64/repoview/letter_p.group.html.


To install the Postfix SMTP server:

yum install postfix

Some configuration advice can be found on the Postfix page.

To install the Dovecot IMAP/POP3 server:

yum install dovecot

Enable Services

To configure your system to start the Apache web server when it boots:

systemctl enable httpd.service

To manually start the Apache web server when it is not running:

systemctl start httpd.service

To configure your system to start the MariaDB database server when it boots:

systemctl enable mariadb.service

To manually start the MariaDB database server when it is not running:

systemctl start mariadb.service

To configure your system to start the Postfix SMTP when it boots:

systemctl enable postfix.service

To manually start the Postfix SMTP when it is not running:

systemctl start postfix.service

To configure your system to start the Dovecot IMAP/POP3 server when it boots:

systemctl enable dovecot.service

To manually start the Dovecot IMAP/POP3 server when it is not running:

systemctl start dovecot.service