How to install Apache HTTPD in openSUSE

Published on June 20, 2018 by Daniel Lanza

 opensuse  httpd

This tutorial will explain how to install Apache HTTPD in openSUSE 15.

The original documentation is found in The Apache HTTP Server Project. And the official documentation for openSUSE is in The Apache HTTP Server.

Requirements

You will need the following:

Steps

Set hostname and domain

Files /etc/hostname and /etc/hosts will be modified to resolve the following:

More information in Setting hostname and domain in openSUSE.

dalanz@apachesrv:~> hostname
apachesrv
dalanz@apachesrv:~> hostname --fqdn
apachesrv.dalanzg.com

Install Apache HTTPD

Install Apache HTTPD with example pages in YaST2 or zipper command.

dalanz@apachesrv:~> sudo zypper install apache2 apache2-example-pages

Start and stop Apache

Start the Apache service with the following command:

dalanz@apachesrv:~> sudo systemctl start apache2

Check you can access the example page -> http://localhost

It works
It works

Check the status:

dalanz@apachesrv:~> sudo systemctl status apache2
● apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: di>
   Active: active (running) since Mon 2018-08-20 11:35:59 CEST; 2min 56s ago
 Main PID: 4788 (httpd-prefork)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
    Tasks: 6
   CGroup: /system.slice/apache2.service
           ├─4788 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C >
           ├─4794 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C >
           ├─4795 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C >
           ├─4796 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C >
           ├─4797 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C >
           └─4799 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C >

Aug 20 11:35:59 apachesrv systemd[1]: Starting The Apache Webserver...
Aug 20 11:35:59 apachesrv systemd[1]: Started The Apache Webserver.

And stop the service:

dalanz@apachesrv:~> sudo systemctl stop apache2

Start Apache automatically at boot time

You can start Apache automatically at boot time.

dalanz@apachesrv:~> sudo systemctl enable apache2
Created symlink /etc/systemd/system/httpd.service → /usr/lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/apache.service → /usr/lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /usr/lib/systemd/system/apache2.service.
comments powered by Disqus

See also

How to install Oracle 12c R2 in openSUSE

This tutorial will explain how to install Oracle Database 12c R2 in openSUSE Leap 42.3. Requirements You will need the following: openSUSE Leap 42.3 -> Install openSUSE virtual machine with VirtualBox Oracle 12c R2 database installation file -> linuxx64_12201_database.zip Steps Install libraries Set hostname and domain Create groups and users Grant oracle user access to X server Configuring Kernel Parameters and Resource Limits Create directory for Oracle Database Install Oracle Database Configuration of Oracle Listener Configuration of Oracle Database Create user for database Create table for database Connect to Oracle database with SQL Developer Start database when server is restarted Install libraries According to Supported SUSE Linux Enterprise Server 12 in Oracle documentation, install the following libraries by using YaST or zypper command:

Read more

How to install SAP NetWeaver 7.51 as ABAP Developer Edition in openSUSE

This tutorial will explain how to install SAP NetWeaver as ABAP server in a virtual machine to develop your own custom ABAP objects. Requirements You will need the following: An openSUSE virtual machine with VirtualBox (Check this link Download SAP NetWeaver compress files from SAP NetWeaver AS ABAP Developer Edition Steps Set port forwarding Set hostname and hosts Install uuidd Mount SAP NetWeaver files Install SAP NetWeaver Install SAP GUI in your host machine SAP GUI for JAVA logon Check SAP NetWeaver license Stop SAP NetWeaver Start SAP NetWeaver Set port forwarding Forward from the Host IP and ports to the following Guest IP and ports in the virtual machine settings:

Read more

How to install PostgreSQL in openSUSE

This tutorial will explain how to install postgreSQL server in openSUSE. A new role and database will be created with the client software. Requirements You will need the following: openSUSE Leap 42.3 Steps Install PostgreSQL Post-installation checks Change postgres role password Create a new role Create a new database Install PostgreSQL Install PostgreSQL from YAST or zypper command: postgresql -> PostgreSQL client postgresql-server -> PostgreSQL server postgresql-contrib -> Contributed extensions and additions

Read more