How to install Apache2 server on Linux Lite OS?

Written by Administrator on Monday April 27, 2020

If you plan to install one of the most popular server on your system (Apache2), you should start with running a command:

$ sudo apt-get install apache2


Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-hosny-amiri fonts-sil-scheherazade linux-headers-4.15.0-88
  linux-headers-4.15.0-88-generic linux-image-4.15.0-88-generic
  linux-modules-4.15.0-88-generic linux-modules-extra-4.15.0-88-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 8 newly installed, 0 to remove and 20 not upgraded.
Need to get 1,604 kB of archives.
After this operation, 6,497 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 bionic/main amd64 libapr1 amd64 1.6.3-2 [90.9 kB]
Get:2 bionic/main amd64 libaprutil1 amd64 1.6.1-2 [84.4 kB]
Get:3 bionic/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.1-2 [10.6 kB]
Get:4 bionic/main amd64 libaprutil1-ldap amd64 1.6.1-2 [8,764 B]
Get:5 bionic-security/main amd64 apache2-bin amd64 2.4.29-1ubuntu4.13 [1,070 kB]
Get:6 bionic-security/main amd64 apache2-utils amd64 2.4.29-1ubuntu4.13 [83.8 kB]
Get:7 bionic-security/main amd64 apache2-data all 2.4.29-1ubuntu4.13 [160 kB]
Get:8 bionic-security/main amd64 apache2 amd64 2.4.29-1ubuntu4.13 [95.1 kB]
Fetched 1,604 kB in 16s (101 kB/s)                                             
Selecting previously unselected package libapr1:amd64.
(Reading database ... 355358 files and directories currently installed.)
Preparing to unpack .../0-libapr1_1.6.3-2_amd64.deb ...
Unpacking libapr1:amd64 (1.6.3-2) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../1-libaprutil1_1.6.1-2_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.1-2) ...
Selecting previously unselected package libaprutil1-dbd-sqlite3:amd64.
Preparing to unpack .../2-libaprutil1-dbd-sqlite3_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.6.1-2) ...
Selecting previously unselected package libaprutil1-ldap:amd64.
Preparing to unpack .../3-libaprutil1-ldap_1.6.1-2_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.6.1-2) ...
Selecting previously unselected package apache2-bin.
Preparing to unpack .../4-apache2-bin_2.4.29-1ubuntu4.13_amd64.deb ...
Unpacking apache2-bin (2.4.29-1ubuntu4.13) ...
Selecting previously unselected package apache2-utils.
Preparing to unpack .../5-apache2-utils_2.4.29-1ubuntu4.13_amd64.deb ...
Unpacking apache2-utils (2.4.29-1ubuntu4.13) ...
Selecting previously unselected package apache2-data.
Preparing to unpack .../6-apache2-data_2.4.29-1ubuntu4.13_all.deb ...
Unpacking apache2-data (2.4.29-1ubuntu4.13) ...
Selecting previously unselected package apache2.
Preparing to unpack .../7-apache2_2.4.29-1ubuntu4.13_amd64.deb ...
Unpacking apache2 (2.4.29-1ubuntu4.13) ...
Setting up libapr1:amd64 (1.6.3-2) ...
Setting up apache2-data (2.4.29-1ubuntu4.13) ...
Setting up libaprutil1:amd64 (1.6.1-2) ...
Setting up libaprutil1-ldap:amd64 (1.6.1-2) ...
Setting up libaprutil1-dbd-sqlite3:amd64 (1.6.1-2) ...
Setting up apache2-utils (2.4.29-1ubuntu4.13) ...
Setting up apache2-bin (2.4.29-1ubuntu4.13) ...
Setting up apache2 (2.4.29-1ubuntu4.13) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/ → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/ → /lib/systemd/system/apache-htcacheclean.service.
insserv: warning: current start runlevel(s) (empty) of script `apache-htcacheclean' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache-htcacheclean' overrides LSB defaults (0 1 6).
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot

Starting Apache2 on Linux Lite

Apache2 is installed and now we can start it as a service:

$ sudo systemctl start apache2

In order to verify, that Apache2 server is running, we can check a status of a service:

$ sudo systemctl status apache2


Ok, system sais, that apache2 is running. Let's check in in browser:

Great, Apache2 server is installed and seem like it works!

Category: linux Tags: install linux-lite apache2