Home Wiki > SDB:Apache installation
Sign up | Login

SDB:Apache installation

tagline: From openSUSE

Tested on openSUSE Recommended articles Related articles
Icon-checked.png

Icon-manual.png Icon-help.png


Contents

Introduction

This document provides a quick step by step guide to get Apache running on your openSUSE box.


Warning It does not cover the concepts of web servers in detail. Please do not use the steps given below for production machines as the security considerations needed to successfully run a web server have not been taken care of. The below steps are mainly for users wanting or desiring to deploy the Apache software either for further tweaking or web development purposes.



General Machine Setup

The first thing which must be taken care of is the network. The network must be properly configured before proceeding further.

The second thing is to ensure that the system is uptodate. This can be done by opening the YaST Control Center. In the Software section click the Online update icon to check for software update and install them.

Installation of Apache Packages

The Apache web server can be installed by using zypper. Open a terminal and become root. Type the below command:

# zypper in apache2

Firewall Adjustments

By default the firewall configuration blocks all traffic coming on port 80 to your machine. So if you need to allow access so that the web server can be accessed from within a LAN we need to fine tune the firewall configuration. The below step needs to be performed as root user. The supplied configurations are called apache2 and apache2-ssl. They can be enabled via YaST, by adding them to FW_CONFIGURATIONS_EXT in /etc/sysconfig/SuSEfirewall2

# sysconf_addword /etc/sysconfig/SuSEfirewall2 FW_CONFIGURATIONS_EXT apache2
# sysconf_addword /etc/sysconfig/SuSEfirewall2 FW_CONFIGURATIONS_EXT apache2-ssl
# rcSuSEfirewall2 restart

Starting Server

Start the server and configure it to automatically start at boot time.

# rcapache2 start
# chkconfig -a apache2

Apache Modules

To enable required Apache Modules we can edit APACHE_MODULES in /etc/sysconfig/apache2. Modules can also be enabled/disabled/listed with the commands below. Any such operation requires a restart of the service and of course needs root privileges.

# a2enmod php5
# a2enmod -l
# rcapache2 restart

See also

Related articles

External links