Installing Apache on Linux Mint 22.3 Zena

 

Installing Apache on Linux Mint 22.3 Zena is a very similar process to other Debian-based systems. Since Mint 22.3 is built on a modern Ubuntu LTS base, you’ll be using the apt package manager to get everything running.


Step 1: Update System Packages

Before installing new software, it is best practice to update your local package index to ensure you get the latest version available in the repositories.

Bash
 
sudo apt update

Step 2: Install Apache

Run the following command to install the Apache2 package:

Bash
 
sudo apt install apache2

When prompted, type Y and press Enter to confirm the installation.


Step 3: Configure the Firewall

Linux Mint comes with UFW (Uncomplicated Firewall). You need to allow web traffic to reach your server.

1. Check available application profiles:

Bash
 
sudo ufw app list

2. Allow "Apache":

For standard HTTP traffic (Port 80), run:

Bash
 
sudo ufw allow 'Apache'

(If you plan to set up SSL/HTTPS later, use sudo ufw allow 'Apache Full' instead).


Step 4: Verify the Installation

Once the installation is complete, Apache should start automatically. You can check its status with:

Bash
 
systemctl status apache2

The Web Test

To confirm it’s working visually:

  1. Open your web browser (Firefox is the default in Mint).

  2. Type http://localhost or your machine's local IP address into the address bar.

  3. You should see the Apache2 Ubuntu Default Page. This confirms the software is installed and serving content correctly.


Step 5: Managing the Apache Process

Here are the essential commands you'll need for day-to-day management:

  • Stop Apache: sudo systemctl stop apache2

  • Start Apache: sudo systemctl start apache2

  • Restart Apache: sudo systemctl restart apache2 (Useful after making configuration changes).

  • Reload Apache: sudo systemctl reload apache2 (Applies changes without dropping active connections).

  • Disable Autostart: sudo systemctl disable apache2 (If you don't want it to start when the computer boots).


Key File Locations

Now that your server is live, here is where the important files live:

  • Default Web Root: /var/www/html/ (Place your .html files here).

  • Main Configuration: /etc/apache2/apache2.conf

  • Site Configurations: /etc/apache2/sites-available/

  • Error Logs: /var/log/apache2/error.log


Are you planning to host a simple landing page, or are you looking to set up a full LAMP stack with MySQL and PHP?

 

 

posted @ 2026-05-08 05:28  profesor  阅读(20)  评论(0)    收藏  举报