<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZavNDW</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZavNDW"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/ZavNDW"/>
	<updated>2026-04-25T22:18:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Zabbix_-_cgi_and_mysql&amp;diff=12869</id>
		<title>Zabbix - cgi and mysql</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Zabbix_-_cgi_and_mysql&amp;diff=12869"/>
		<updated>2016-06-28T05:32:47Z</updated>

		<summary type="html">&lt;p&gt;ZavNDW: /* Install Zabbix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The purpose of this document is to assist in installing the Zabbix server software and Zabbix agent on the Alpine Linux operating system. Instructions on how to configure and use Zabbix - as well as many useful tutorials - can be found at http://www.zabbix.com.&lt;br /&gt;
&lt;br /&gt;
{{Note|The minimum required version of Alpine Linux required to install Zabbix is Alpine 2.2.}}&lt;br /&gt;
&lt;br /&gt;
= Install Lighttpd, and PHP =&lt;br /&gt;
&lt;br /&gt;
{{:Setting Up Lighttpd With FastCGI}}&lt;br /&gt;
&lt;br /&gt;
= Configure PostgreSQL =&lt;br /&gt;
&lt;br /&gt;
Install PostgreSQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add postgresql postgresql-client}}&lt;br /&gt;
&lt;br /&gt;
Now configure PostgreSQL:&lt;br /&gt;
{{Cmd|/etc/init.d/postgresql setup&lt;br /&gt;
/etc/init.d/postgresql start&lt;br /&gt;
rc-update add postgresql}}&lt;br /&gt;
&lt;br /&gt;
= Install Zabbix =&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add zabbix zabbix-pgsql zabbix-webif zabbix-setup}}&lt;br /&gt;
&lt;br /&gt;
Now we need to set up the zabbix database. Substitute &#039;*********&#039; in the example below for a real password:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;psql –U postgres&lt;br /&gt;
postgres=# create user zabbix with password &#039;*********&#039;;&lt;br /&gt;
postgres=# create database zabbix owner zabbix;&lt;br /&gt;
postgres=# \q&lt;br /&gt;
cd /usr/share/zabbix/database/postgresql&lt;br /&gt;
cat postgresql.sql | psql -U zabbix zabbix&lt;br /&gt;
cd ..&lt;br /&gt;
cd data/&lt;br /&gt;
cat data.sql | psql -U zabbix zabbix&lt;br /&gt;
cat images_pgsql.sql | psql -U zabbix zabbix&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Create a softlink for the Zabbix web-frontend files:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rm /var/www/localhost/htdocs -R&lt;br /&gt;
ln -s /usr/share/webapps/zabbix /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
Edit PHP configuration to satisfy some zabbix requirements. Edit /etc/php/php.ini and configure the following values at least:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Max_execution_time = 600&lt;br /&gt;
Expose_php = off&lt;br /&gt;
Date.timezone = &amp;lt;insert your timezone here&amp;gt;&lt;br /&gt;
post_max_size = 32M&lt;br /&gt;
upload_max_filesize = 16M&lt;br /&gt;
max_input_time = 600&lt;br /&gt;
memory_limit = 256M&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Configure the following entries in /etc/zabbix/zabbix_server.conf, where DBPassword is the password chosen for the database above:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DBName=zabbix&lt;br /&gt;
&lt;br /&gt;
# Database user&lt;br /&gt;
&lt;br /&gt;
DBUser=zabbix&lt;br /&gt;
&lt;br /&gt;
# Database password&lt;br /&gt;
# Comment this line if no password used&lt;br /&gt;
&lt;br /&gt;
DBPassword=*********&lt;br /&gt;
&lt;br /&gt;
FpingLocation=/usr/sbin/fping&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Zabbix server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add zabbix-server&lt;br /&gt;
/etc/init.d/zabbix-server start}}&lt;br /&gt;
&lt;br /&gt;
Fix permissions on conf directory.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|chown -R lighttpd /usr/share/webapps/zabbix/conf}}&lt;br /&gt;
&lt;br /&gt;
You should now be able to browse to the Zabbix frontend: http://yourservername/.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
You should now be able to browse to the Zabbix setup frontend: http://yourserverip/instal.php.&lt;br /&gt;
&lt;br /&gt;
Follow the setup instructions to configure Zabbix, supplying the database information used above.&lt;br /&gt;
&lt;br /&gt;
After setup, login using: Login name: &#039;&#039;&#039;Admin&#039;&#039;&#039; Password:&#039;&#039;&#039;zabbix&#039;&#039;&#039;. (as described at http://www.zabbix.com/documentation/1.8/manual/installation)&lt;br /&gt;
&lt;br /&gt;
Finally, Zabbix requires special permissions to use the fping binary.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|chmod u+s /usr/sbin/fping}}&lt;br /&gt;
&lt;br /&gt;
= Install Zabbix Agent on Monitored Servers =&lt;br /&gt;
&lt;br /&gt;
Zabbix can monitor almost any operating system, including Alpine Linux hosts. Complete the following steps to install the Zabbix agent on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
{{Note|Support to allow zabbix-agentd to view running processes on Alpine Linux has been added since linux-grsec-2.6.35.9-r2. Please ensure you have that kernel installed prior to attempting to run zabbix-agentd.}}&lt;br /&gt;
&lt;br /&gt;
Ensure that the readproc group exists (support added since alpine-baselayout-2.0_rc1-r1), by adding the following line to /etc/group:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|readproc:x:30:zabbix}}&lt;br /&gt;
&lt;br /&gt;
Install the agent package:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add zabbix-agent}}&lt;br /&gt;
&lt;br /&gt;
Edit the /etc/zabbix/zabbix_agentd.conf file and configure at least the following option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Server=&amp;lt;ip or hostname of zabbix server&amp;gt;&lt;br /&gt;
Hostname=&amp;lt;ip or hostname of zabbix agent&amp;gt;&lt;br /&gt;
ListenPort=10050&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start the zabbix-agent:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add zabbix-agentd&lt;br /&gt;
/etc/init.d/zabbix-agentd start}}&lt;br /&gt;
&lt;br /&gt;
In case you want to monitor using SNMP agent on remote machines you have to add these packages on zabbix server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add net-snmp net-snmp-tools}}&lt;br /&gt;
&lt;br /&gt;
And add these packages on remote machines:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add net-snmp }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Optional: Crash course in adding hosts, checks, and notifications =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; This is optional since it&#039;s not specific to Alpine Linux, but I wanted a couple notes for how to perform a simple check on a server that doesn&#039;t have the agent installed on it, and be notified on state changes.&lt;br /&gt;
&lt;br /&gt;
Administration -&amp;gt; Media Types -&amp;gt; Email&lt;br /&gt;
* Setup server, helo, email from address&lt;br /&gt;
&lt;br /&gt;
Administration -&amp;gt; Users&lt;br /&gt;
* Setup each user who&#039;ll get notified, make sure they have media type &amp;quot;Email&amp;quot; added with their address&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Hosts -&amp;gt; Create host&lt;br /&gt;
* In Linux Servers hostgroup&lt;br /&gt;
* Define dns name, ip, connect by IP&lt;br /&gt;
* If the machine is a simple networking device that will only be monitored using SNMP, add it to Template_SNMPv2_Device, and you&#039;re done.&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Create template&lt;br /&gt;
* Give it a name (Template_Alpine_Linux_Infra_HTTP)&lt;br /&gt;
* In Templates group&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Template_Alpine_Linux_Infra_HTTP -&amp;gt; Items&lt;br /&gt;
* Create Item&lt;br /&gt;
* Host: Template_Alpine_Linux_Infra_HTTP&lt;br /&gt;
* Description: HTTP Basic Check&lt;br /&gt;
* Type: Simple_check&lt;br /&gt;
* Key: http,80&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Templates -&amp;gt; Template_Alpine_Linux_Infra_HTTP -&amp;gt; Triggers&lt;br /&gt;
* Create Trigger&lt;br /&gt;
* Name: &amp;quot;HTTP Trigger&amp;quot;&lt;br /&gt;
* Expression: {Template_Alpine_Linux_Infra_HTTP:http,80.last(0)}#1&lt;br /&gt;
* Severity: High&lt;br /&gt;
&lt;br /&gt;
Configuration -&amp;gt; Actions -&amp;gt; &lt;br /&gt;
* Create Action&lt;br /&gt;
* name: Email notifications&lt;br /&gt;
* Event source: triggers&lt;br /&gt;
* Default Subject: add &amp;quot;{HOST.DNS}:&amp;quot; to the beginning&lt;br /&gt;
* Default message: add &amp;quot;{HOST.DNS}:&amp;quot; to the beginning&lt;br /&gt;
* Conditions: make host have to be from &amp;quot;Linux Servers&amp;quot; hostgroup, and Template_Alpine_Linux_Infra_HTTP:HTTP trigger&amp;quot; is not 1&lt;br /&gt;
* Email affected users&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;br /&gt;
[[Category:PHP]]&lt;br /&gt;
[[Category:SQL]]&lt;/div&gt;</summary>
		<author><name>ZavNDW</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=FreePBX&amp;diff=12831</id>
		<title>FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=FreePBX&amp;diff=12831"/>
		<updated>2016-06-05T06:42:08Z</updated>

		<summary type="html">&lt;p&gt;ZavNDW: /* MySQL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document will be a quick c/p guide to setup asterisk with [http://www.freepbx.org/ FreepPBX] on Alpine Linux. What we will setup is the following:&lt;br /&gt;
&lt;br /&gt;
* Lighttpd with PHP using FastCGI&lt;br /&gt;
* MySQL server&lt;br /&gt;
* Freepbx 2.7.0&lt;br /&gt;
&lt;br /&gt;
== Install Lighttpd and PHP ==&lt;br /&gt;
&lt;br /&gt;
{{:Setting Up Lighttpd With FastCGI}}&lt;br /&gt;
&lt;br /&gt;
== Install pear DB ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add php5-pear; pear install DB}}&lt;br /&gt;
&lt;br /&gt;
== MySQL ==&lt;br /&gt;
&lt;br /&gt;
Install MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add mysql mysql-client}}&lt;br /&gt;
&lt;br /&gt;
Initiate databases&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;/usr/bin/mysql_install_db --user=mysql&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Start MySQL and add to system start&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/mariadb start &amp;amp;&amp;amp; rc-update add mariadb default}}&lt;br /&gt;
&lt;br /&gt;
Set MySQL root password&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/usr/bin/mysqladmin -u root password &#039;new-password&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Asterisk ==&lt;br /&gt;
&lt;br /&gt;
Install asterisk (replace vserver with your kernel version).&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add asterisk asterisk-sample-config dahdi-linux-vserver asterisk-addons-mysql}}&lt;br /&gt;
&lt;br /&gt;
Start asterisk (do not add to system start)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/asterisk start}}&lt;br /&gt;
&lt;br /&gt;
== FreePBX ==&lt;br /&gt;
&lt;br /&gt;
Download Freepbx&lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget http://mirror.freepbx.org/freepbx-2.7.0.tar.gz}}&lt;br /&gt;
&lt;br /&gt;
Unpack source&lt;br /&gt;
&lt;br /&gt;
{{Cmd|tar zxvf freepbx-2.7.0.tar.gz &amp;amp;&amp;amp; cd freepbx-2.7.0}}&lt;br /&gt;
&lt;br /&gt;
Add freepbx databases to MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mysqladmin create asterisk -p&lt;br /&gt;
mysqladmin create asteriskcdrdb -p}}&lt;br /&gt;
&lt;br /&gt;
Import SQL data into MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mysql -D asterisk -u root -p &amp;lt; SQL/newinstall.sql&lt;br /&gt;
mysql -D asteriskcdrdb -u root -p &amp;lt; SQL/cdr_mysql_table.sql}}&lt;br /&gt;
&lt;br /&gt;
Open connection to MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mysql -u root -p}}&lt;br /&gt;
&lt;br /&gt;
Create MySQL users&lt;br /&gt;
&lt;br /&gt;
{{Cmd|GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY &#039;amp109&#039;;&lt;br /&gt;
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY &#039;amp109&#039;;}}&lt;br /&gt;
&lt;br /&gt;
Close connection&lt;br /&gt;
&lt;br /&gt;
{{Cmd|exit}}&lt;br /&gt;
&lt;br /&gt;
Freepbx installer does not like busybox sed so we add normal sed, we need to patch 2 files later on so we need patch (you can remove them afterwards)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add sed patch}}&lt;br /&gt;
&lt;br /&gt;
Flash operator panel needs Perl&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add perl}}&lt;br /&gt;
&lt;br /&gt;
Start the installer (you can accept the defaults)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|./install_amp}}&lt;br /&gt;
&lt;br /&gt;
== Finishing up ==&lt;br /&gt;
&lt;br /&gt;
Change user/group of lighttpd to asterisk&lt;br /&gt;
&lt;br /&gt;
{{Cmd|vim +50 /etc/lighttpd/lighttpd.conf}}&lt;br /&gt;
&lt;br /&gt;
Change permissions of lighttpd/freepbx files&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/lighttpd stop&lt;br /&gt;
chown -R asterisk:asterisk /var/log/lighttpd&lt;br /&gt;
chown -R asterisk:asterisk /var/run/lighttpd*&lt;br /&gt;
chown -R asterisk:asterisk /var/www/localhost/htdocs/freepbx&lt;br /&gt;
/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
Stop asterisk&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/asterisk stop}}&lt;br /&gt;
&lt;br /&gt;
Patch FreePBX to support Alpine Linux&lt;br /&gt;
[[File:Freepbx_engine.patch.txt]]&lt;br /&gt;
&lt;br /&gt;
{{Cmd|cd /var/lib/asterisk/bin&lt;br /&gt;
patch -p0 &amp;lt; freepbx_engine.patch}}&lt;br /&gt;
&lt;br /&gt;
This file gets overwritten when using freepbx so we need to patch the original&lt;br /&gt;
[[File:Freepbx_engine.patch.txt]]&lt;br /&gt;
&lt;br /&gt;
{{Cmd|cd /var/www/localhost/htdocs/freepbx/admin/modules/framework/bin/&lt;br /&gt;
patch -p0 freepbx_engine.patch}}&lt;br /&gt;
&lt;br /&gt;
Start Asterisk with FreePBX&lt;br /&gt;
&lt;br /&gt;
{{Cmd|amportal start}}&lt;br /&gt;
&lt;br /&gt;
Load needed dahdi modules&lt;br /&gt;
&lt;br /&gt;
{{Cmd|modprobe dahdi&lt;br /&gt;
modprobe dahdi_dummy}}&lt;br /&gt;
&lt;br /&gt;
Make them load on boot&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo dahdi &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
echo dahdi_dummy &amp;gt;&amp;gt; /etc/modules}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Telephony]]&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:PHP]]&lt;br /&gt;
[[Category:SQL]]&lt;/div&gt;</summary>
		<author><name>ZavNDW</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_Up_Apache_with_PHP&amp;diff=12830</id>
		<title>Setting Up Apache with PHP</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_Up_Apache_with_PHP&amp;diff=12830"/>
		<updated>2016-06-05T06:21:20Z</updated>

		<summary type="html">&lt;p&gt;ZavNDW: /* Installing Apache + PHP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing Apache + PHP ==&lt;br /&gt;
Add the main packages with the command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|#apk add apache2 php5-apache2}}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Move to the directory where your site will reside:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|#cd /var/www/localhost/htdocs}}&lt;br /&gt;
&lt;br /&gt;
And create an index.php file to test if everything is ok:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|#vi index.php}}&lt;br /&gt;
&lt;br /&gt;
Add the following lines in the file:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;?php&lt;br /&gt;
phpinfo();&lt;br /&gt;
?&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
That done, let us start apache2 web server:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service apache2 start}}&lt;br /&gt;
&lt;br /&gt;
Now access: http://&amp;lt;ip_address&amp;gt; and if everything is ok you will see the php info page.&lt;br /&gt;
&lt;br /&gt;
== Ending ==&lt;br /&gt;
&lt;br /&gt;
Finally let us set up apache2 to start on operating system startup:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add apache2}}&lt;br /&gt;
&lt;br /&gt;
Now you can create your php site and host in this directory.&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
This is the easiest way to setup apache with php support, but it&#039;s the most inefficient (resource wise) setup, please refer to [[Apache with php-fpm]]&lt;/div&gt;</summary>
		<author><name>ZavNDW</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=FreePBX&amp;diff=12829</id>
		<title>FreePBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=FreePBX&amp;diff=12829"/>
		<updated>2016-06-05T05:57:47Z</updated>

		<summary type="html">&lt;p&gt;ZavNDW: /* Install pear DB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document will be a quick c/p guide to setup asterisk with [http://www.freepbx.org/ FreepPBX] on Alpine Linux. What we will setup is the following:&lt;br /&gt;
&lt;br /&gt;
* Lighttpd with PHP using FastCGI&lt;br /&gt;
* MySQL server&lt;br /&gt;
* Freepbx 2.7.0&lt;br /&gt;
&lt;br /&gt;
== Install Lighttpd and PHP ==&lt;br /&gt;
&lt;br /&gt;
{{:Setting Up Lighttpd With FastCGI}}&lt;br /&gt;
&lt;br /&gt;
== Install pear DB ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add php5-pear; pear install DB}}&lt;br /&gt;
&lt;br /&gt;
== MySQL ==&lt;br /&gt;
&lt;br /&gt;
Install MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add mysql mysql-client}}&lt;br /&gt;
&lt;br /&gt;
Initiate databases&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;/usr/bin/mysql_install_db --user=mysql&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Start MySQL and add to system start&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/mysql start &amp;amp;&amp;amp; rc-update add mysql default}}&lt;br /&gt;
&lt;br /&gt;
Set MySQL root password&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/usr/bin/mysqladmin -u root password &#039;new-password&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Asterisk ==&lt;br /&gt;
&lt;br /&gt;
Install asterisk (replace vserver with your kernel version).&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add asterisk asterisk-sample-config dahdi-linux-vserver asterisk-addons-mysql}}&lt;br /&gt;
&lt;br /&gt;
Start asterisk (do not add to system start)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/asterisk start}}&lt;br /&gt;
&lt;br /&gt;
== FreePBX ==&lt;br /&gt;
&lt;br /&gt;
Download Freepbx&lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget http://mirror.freepbx.org/freepbx-2.7.0.tar.gz}}&lt;br /&gt;
&lt;br /&gt;
Unpack source&lt;br /&gt;
&lt;br /&gt;
{{Cmd|tar zxvf freepbx-2.7.0.tar.gz &amp;amp;&amp;amp; cd freepbx-2.7.0}}&lt;br /&gt;
&lt;br /&gt;
Add freepbx databases to MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mysqladmin create asterisk -p&lt;br /&gt;
mysqladmin create asteriskcdrdb -p}}&lt;br /&gt;
&lt;br /&gt;
Import SQL data into MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mysql -D asterisk -u root -p &amp;lt; SQL/newinstall.sql&lt;br /&gt;
mysql -D asteriskcdrdb -u root -p &amp;lt; SQL/cdr_mysql_table.sql}}&lt;br /&gt;
&lt;br /&gt;
Open connection to MySQL&lt;br /&gt;
&lt;br /&gt;
{{Cmd|mysql -u root -p}}&lt;br /&gt;
&lt;br /&gt;
Create MySQL users&lt;br /&gt;
&lt;br /&gt;
{{Cmd|GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY &#039;amp109&#039;;&lt;br /&gt;
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY &#039;amp109&#039;;}}&lt;br /&gt;
&lt;br /&gt;
Close connection&lt;br /&gt;
&lt;br /&gt;
{{Cmd|exit}}&lt;br /&gt;
&lt;br /&gt;
Freepbx installer does not like busybox sed so we add normal sed, we need to patch 2 files later on so we need patch (you can remove them afterwards)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add sed patch}}&lt;br /&gt;
&lt;br /&gt;
Flash operator panel needs Perl&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add perl}}&lt;br /&gt;
&lt;br /&gt;
Start the installer (you can accept the defaults)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|./install_amp}}&lt;br /&gt;
&lt;br /&gt;
== Finishing up ==&lt;br /&gt;
&lt;br /&gt;
Change user/group of lighttpd to asterisk&lt;br /&gt;
&lt;br /&gt;
{{Cmd|vim +50 /etc/lighttpd/lighttpd.conf}}&lt;br /&gt;
&lt;br /&gt;
Change permissions of lighttpd/freepbx files&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/lighttpd stop&lt;br /&gt;
chown -R asterisk:asterisk /var/log/lighttpd&lt;br /&gt;
chown -R asterisk:asterisk /var/run/lighttpd*&lt;br /&gt;
chown -R asterisk:asterisk /var/www/localhost/htdocs/freepbx&lt;br /&gt;
/etc/init.d/lighttpd start}}&lt;br /&gt;
&lt;br /&gt;
Stop asterisk&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/asterisk stop}}&lt;br /&gt;
&lt;br /&gt;
Patch FreePBX to support Alpine Linux&lt;br /&gt;
[[File:Freepbx_engine.patch.txt]]&lt;br /&gt;
&lt;br /&gt;
{{Cmd|cd /var/lib/asterisk/bin&lt;br /&gt;
patch -p0 &amp;lt; freepbx_engine.patch}}&lt;br /&gt;
&lt;br /&gt;
This file gets overwritten when using freepbx so we need to patch the original&lt;br /&gt;
[[File:Freepbx_engine.patch.txt]]&lt;br /&gt;
&lt;br /&gt;
{{Cmd|cd /var/www/localhost/htdocs/freepbx/admin/modules/framework/bin/&lt;br /&gt;
patch -p0 freepbx_engine.patch}}&lt;br /&gt;
&lt;br /&gt;
Start Asterisk with FreePBX&lt;br /&gt;
&lt;br /&gt;
{{Cmd|amportal start}}&lt;br /&gt;
&lt;br /&gt;
Load needed dahdi modules&lt;br /&gt;
&lt;br /&gt;
{{Cmd|modprobe dahdi&lt;br /&gt;
modprobe dahdi_dummy}}&lt;br /&gt;
&lt;br /&gt;
Make them load on boot&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo dahdi &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
echo dahdi_dummy &amp;gt;&amp;gt; /etc/modules}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Telephony]]&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:PHP]]&lt;br /&gt;
[[Category:SQL]]&lt;/div&gt;</summary>
		<author><name>ZavNDW</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_Up_Lighttpd_With_FastCGI&amp;diff=12828</id>
		<title>Setting Up Lighttpd With FastCGI</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_Up_Lighttpd_With_FastCGI&amp;diff=12828"/>
		<updated>2016-06-05T05:50:22Z</updated>

		<summary type="html">&lt;p&gt;ZavNDW: edit php version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Install the additional packages:&lt;br /&gt;
{{Cmd|apk add lighttpd php5-common php5-iconv php5-json php5-gd php5-curl php5-xml php5-pgsql php5-imap php5-cgi fcgi}}&lt;br /&gt;
{{Cmd|apk add php5-pdo php5-pdo_pgsql php5-soap php5-xmlrpc php5-posix php5-mcrypt php5-gettext php5-ldap php5-ctype php5-dom}}&lt;br /&gt;
&lt;br /&gt;
==Configure Lighttpd==&lt;br /&gt;
{{Cmd|vi /etc/lighttpd/lighttpd.conf}}&lt;br /&gt;
Uncomment line:&lt;br /&gt;
 include &amp;quot;mod_fastcgi.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Start lighttpd service and add to needed runlevel==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service lighttpd start &amp;amp;&amp;amp; rc-update add lighttpd default}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:PHP]]&lt;/div&gt;</summary>
		<author><name>ZavNDW</name></author>
	</entry>
</feed>