LAMP Stack for PI: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
A '''LAMP''' stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the '''L'''inux operating system, with the '''A'''pache web server. The site data is stored in a '''M'''ySQL database, and dynamic content is processed by '''P'''HP.
A '''LAMP''' stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the '''L'''inux operating system, with the '''A'''pache web server. The site data is stored in a '''M'''ySQL database, and dynamic content is processed by '''P'''HP.
==Install==
===Apache===
<source lang="bash">
apt install apache2/stable
SERVER_NAME=localhost &&
cat > /etc/apache2/conf-available/servername.conf << EOF
ServerName $SERVER_NAME
EOF
a2enconf servername
systemctl reload apache2
apachectl -t
</source>
===PHP===
<source lang="bash">
apt install  php7.3/stable libapache2-mod-php7.3/stable
a2enmod php7.3
apt install  php7.3-fpm/stable
a2enmod proxy_fcgi setenvif
a2enconf php7.3-fpm
systemctl restart apache2
</source>
===MySQL===
<source lang="bash">
apt install mariadb-server-10.3/stable
apt install phpmyadmin/stable
sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php
systemctl restart apache2
</source>

Revision as of 18:21, 18 August 2019

A LAMP stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MySQL database, and dynamic content is processed by PHP.

Install

Apache

apt install apache2/stable
SERVER_NAME=localhost &&
cat > /etc/apache2/conf-available/servername.conf << EOF
ServerName $SERVER_NAME
EOF
a2enconf servername
systemctl reload apache2
apachectl -t

PHP

apt install  php7.3/stable libapache2-mod-php7.3/stable
a2enmod php7.3
apt install   php7.3-fpm/stable 
a2enmod proxy_fcgi setenvif
a2enconf php7.3-fpm
systemctl restart apache2

MySQL

 apt install mariadb-server-10.3/stable
apt install phpmyadmin/stable
sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php
systemctl restart apache2