Logo       PBase-Foundation


Before Installing be sure the hostname and /etc/hosts are correct.

Check hostname

Make sure the target server's hostname command returns the fully qualified hostname and domainname. If needed, change it with:

hostnamectl set-hostname myhost1.myrealdomainname.net

Check /etc/hosts

Be sure the target server's /etc/hosts file is correct. The pbase-preconfig RPM may add a commented-out line with the host's IP and hostname. Enable this line only if needed. In a DHCP environment your IP address may change on reboot and the value added to /etc/hosts may become stale.

Install Apache

The first step is to install the the pbase-preconfig. It places YUM repository specs into the target server's /etc/yum.repos.d/ directory. Once that bootstrapping step is done, all the other application components become available.

yum -y install https://pbase-foundation.com/pbase-preconfig.rpm
yum -y install pbase-preconfig-apache
yum -y install pbase-apache
yum -y install pbase-preconfig-lets-encrypt
yum -y install pbase-lets-encrypt
yum -y install pbase-firewall-enable

If not already enabled NTP can be installed and started with:

yum -y install pbase-ntp-timesync

How to watch Apache server logs

When install is done, load the shell-aliases from /root/.bashrc and run the "tailhttpd" alias:

source ~/.bashrc

Configuration Options

The pbase-preconfig-apache rpm creates a sample configuration file that can be customized:

"pbase_apache" : {
"addSelfToEtcHosts": false,
"addSecurityHeaders": true,
"restrictHttpMethods": true,
"useSitesEnabledConf": false,
"enableIndexPhp": false,
"serverAdmin": "yoursysadmin@yourrealmail.com"