LAMP Stack for PI

From Chorke Wiki
Revision as of 19:21, 18 August 2019 by Shahed (talk | contribs)
Jump to navigation Jump to search

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