<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Install a LAPP Stack (Apache 2.4/PHP 7/PostgreSQL 10/MariaDB 10) on openSUSE Tumbleweed</title>
        <description>Assume the Tumbleweed linux is ready.

I. Database Install the database first (PostgreSQL 10):

1.  Install database
zypper install postgresql10 postgresql10-contrib postgresql10-server

2. Enable auto-start on boot
chkconfig -a postgresql

3. Start PostgreSQL
systemctl start postgresql.service

4. Set password for postgres
Switch user to postgres:
su postgres
psql
In the psql console, set the password:
\password postgres

5. Fine-tune performance
(1) Edit postgresql.conf
vi /var/lib/pgsql/data/postgresql.conf
(2) Set parameters
shared_buffers = 4GB
work_mem = 32MB 
effective_cache_size = 8GB

shared_buffers: 1/4 of total memory is a reasonable starting value
effective_cache_size: 1/2 of total memory would be a normal setting


II. Web Server
1. Install apache2
zypper install apache2 apache2-mod_evasive

2. Add commonly-used modules
Add modules:
a2enmod php7
a2enmod rewrite
a2enmod headers
List apache loaded modules:
apachectl -M

3. Enable auto-start on boot
chkconfig -a apache2

4. Edit default-server.conf (/etc/apache2)
(1) Edit DocumentRoot to your own default websidte directory (e.g. DocumentRoot &quot;/home/yoursite&quot;).
(2) Edit the &amp;lt;Directory&gt; right below DocumentRoot.
(3) Add/Append the following directives:
ServerName website.com
ExtendedStatus On
TraceEnable Off
AddType image/x-icon .ico

5. Modify server-tuning.conf (/etc/apache2) 
(1) Raise StartServers if necessary
(2) Raise MaxSpareServers if necessary
(3) Raise ServerLimit if necessary
(4) Raise MaxClients if necessary

III. Hypertext Preprocessor
1. Install php7
zypper install php7 php7-pgsql

2. Install commonly-used modules
zypper install php7-curl php7-fileinfo php7-gd php7-mbstring php7-openssl php7-zip php7-zlib



MariaDB
1. Install mariadb
zypper install mariadb mariadb-tools

2. Security setting
mysql_secure_installation
(all &quot;yes&quot; is preferred)

3. Enable auto-start on boot
chkconfig -a mysql

References:
Install a LAPP server: openSUSE 42 / Apahce 2.4/PostgreSQL 9.4/ PHP 5.6
How to Install PostgreSQL and phpPgAdmin on OpenSUSE Leap 42.1
Apache MPM prefork
Apache MPM Common Directives</description>
        <link>http://mepopedia.com/forum/read.php?135,88941,88941#msg-88941</link>
        <lastBuildDate>Mon, 24 Aug 2026 16:14:32 +0800</lastBuildDate>
        <generator>Phorum 5.2.7</generator>
        <item>
            <guid>http://mepopedia.com/forum/read.php?135,88941,88941#msg-88941</guid>
            <title>Install a LAPP Stack (Apache 2.4/PHP 7/PostgreSQL 10/MariaDB 10) on openSUSE Tumbleweed</title>
            <link>http://mepopedia.com/forum/read.php?135,88941,88941#msg-88941</link>
            <description><![CDATA[Assume the Tumbleweed linux is ready.<br />
<br />
<center>I. Database </center>Install the database first (PostgreSQL 10):<br />
<br />
1.  Install database<br />
<div style="background:#ddd;padding-left:1em">zypper install postgresql10 postgresql10-contrib postgresql10-server</div>
<br />
2. Enable auto-start on boot<br />
<div style="background:#ddd;padding-left:1em">chkconfig -a postgresql</div>
<br />
3. Start PostgreSQL<br />
<div style="background:#ddd;padding-left:1em">systemctl start postgresql.service</div>
<br />
4. Set password for postgres<br />
Switch user to postgres:<br />
<div style="background:#ddd;padding-left:1em">su postgres<br />
psql</div>
In the psql console, set the password:<br />
<div style="background:#ddd;padding-left:1em">\password postgres</div>
<br />
5. Fine-tune performance<br />
(1) Edit postgresql.conf<br />
<div style="background:#ddd;padding-left:1em">vi /var/lib/pgsql/data/postgresql.conf</div>
(2) Set parameters<br />
<div style="background:#ddd;padding-left:1em">shared_buffers = 4GB<br />
work_mem = 32MB <br />
effective_cache_size = 8GB</div>
<br />
<b>shared_buffers</b>: 1/4 of total memory is a reasonable starting value<br />
<b>effective_cache_size</b>: 1/2 of total memory would be a normal setting<br />
<br />
<br />
<div style="text-align:center">II. Web Server</div>
1. Install apache2<br />
<div style="background:#ddd;padding-left:1em">zypper install apache2 apache2-mod_evasive</div>
<br />
2. Add commonly-used modules<br />
Add modules:<br />
<div style="background:#ddd;padding-left:1em">a2enmod php7</div>
<div style="background:#ddd;padding-left:1em">a2enmod rewrite</div>
<div style="background:#ddd;padding-left:1em">a2enmod headers</div>
List apache loaded modules:<br />
<div style="background:#ddd;padding-left:1em">apachectl -M</div>
<br />
3. Enable auto-start on boot<br />
<div style="background:#ddd;padding-left:1em">chkconfig -a apache2</div>
<br />
4. Edit <b>default-server.conf</b> (/etc/apache2)<br />
(1) Edit DocumentRoot to your own default websidte directory (e.g. DocumentRoot "/home/yoursite").<br />
(2) Edit the &lt;Directory> right below DocumentRoot.<br />
(3) Add/Append the following directives:<br />
<div style="background:#ddd;padding-left:1em">ServerName website.com</div>
<div style="background:#ddd;padding-left:1em">ExtendedStatus On</div>
<div style="background:#ddd;padding-left:1em">TraceEnable Off</div>
<div style="background:#ddd;padding-left:1em">AddType image/x-icon .ico</div>
<br />
5. Modify server-tuning.conf (/etc/apache2) <br />
(1) Raise <i>StartServers</i> if necessary<br />
(2) Raise <i>MaxSpareServers</i> if necessary<br />
(3) Raise <i>ServerLimit</i> if necessary<br />
(4) Raise <i>MaxClients</i> if necessary<br />
<br />
<div style="text-align:center">III. Hypertext Preprocessor</div>
1. Install php7<br />
<div style="background:#ddd;padding-left:1em">zypper install php7 php7-pgsql</div>
<br />
2. Install commonly-used modules<br />
<div style="background:#ddd;padding-left:1em">zypper install php7-curl php7-fileinfo php7-gd php7-mbstring php7-openssl php7-zip php7-zlib</div>
<br />
<div style="background:#ddd;padding-left:1em"></div>
<br />
MariaDB<br />
1. Install mariadb<br />
<div style="background:#ddd;padding-left:1em">zypper install mariadb mariadb-tools</div>
<br />
2. Security setting<br />
<div style="background:#ddd;padding-left:1em">mysql_secure_installation</div>
(all "yes" is preferred)<br />
<br />
3. Enable auto-start on boot<br />
<div style="background:#ddd;padding-left:1em">chkconfig -a mysql</div>
<br />
References:<br />
<a href=http://mepopedia.com/forum/read.php?135,76348>Install a LAPP server: openSUSE 42 / Apahce 2.4/PostgreSQL 9.4/ PHP 5.6</a><br />
<a href=https://www.howtoforge.com/tutorial/how-to-install-postgresql-and-phppgadmin-on-opensuse-leap-42.1/>How to Install PostgreSQL and phpPgAdmin on OpenSUSE Leap 42.1</a><br />
<a href=http://httpd.apache.org/docs/2.4/mod/prefork.html>Apache MPM prefork</a><br />
<a href=http://httpd.apache.org/docs/2.4/mod/mpm_common.html>Apache MPM Common Directives</a>]]></description>
            <dc:creator>HP</dc:creator>
            <category>Linux系統管理</category>
            <pubDate>Sat, 02 Feb 2019 21:12:36 +0800</pubDate>
        </item>
    </channel>
</rss>
