If you’ve recently installed the Fedora 26 server, you may or may not know that there is an incredible tool (installed alongside the server), called Cockpit. This web-based tool makes it easy to administer your Fedora Server. Tasks you can manage are:

  1. Get a real-time glance at performance
  2. Restart the server
  3. View logs
  4. Check storage
  5. Manage networking
  6. Create/edit user accounts
  7. Manage services

One other feature Cockpit includes is access to a terminal. It is there that we are going to install Apache. That’s right, Cockpit doesn’t have a built-in software tool, so all installation is done through the command line. However, Cockpit does help you out with some of the steps.

With that said, let’s see how this is done.

Accessing Cockpit

Once you have your server up and running, you gain access to Cockpit by pointing a browser to https://SERVER_IP:9090. Log in with the user root and the password you created during the operating system installation. Once within the Cockpit interface, click on the Terminal tab (Figure A).

Figure A

As soon as you click the Terminal tab, you will find yourself in, not surprisingly, a terminal window for your server, logged in as the root user. You are ready to install.

Installing Apache

Before you install Apache, let’s make sure the system is updated with the command:

dnf update

If there are any updates, run them. If necessary (should the kernel update), restart the server by going back to the System tab of Cockpit and clicking on the Restart button. If no restart is necessary, you can then install the Apache server with a single command:

dnf install httpd

You will be prompted to OK the installation (Figure B), so type y and the installation will begin.

Figure B

After it finishes, head over to the Services tab, locate and click on the Apache entry. In the resulting window (Figure C), click the Start button to start the service and then click on the Enable button to enable Apache to start at boot.

Figure C

Finally, you’ll need to go back to terminal tab and issue the following commands to open up the firewall for the server:

firewall-cmd --add-service={http,https} --permanent
​firewall-cmd --add-port={80,443}/tcp --permanent
​sudo firewall-cmd --reload

When you’ve completed the above, point your browser to http://SERVER_IP and the Fedora Apache test page should appear.

Congratulations, you’ve installed Apache, on Fedora Server, with the help of Cockpit.

Wasn’t that simple?