Skip to content

Instantly share code, notes, and snippets.

@rnstux
Created February 1, 2020 19:11
Show Gist options
  • Save rnstux/246a56a901e7d9cb40fdb4714d4bc2ad to your computer and use it in GitHub Desktop.
Save rnstux/246a56a901e7d9cb40fdb4714d4bc2ad to your computer and use it in GitHub Desktop.
#!/bin/bash
## Actualizar Raspberry
apt update -y
apt upgrade -y
apt dist-upgrade -y
## Instalar apache
apt install -y apache2
chown -R pi:www-data /var/www/html/
chmod -R 770 /var/www/html/
wget -O apache_index.html http://127.0.0.1
cat ./apache_index.html
## Instalar PHP of PHP 7
apt install -y php libapache2-mod-php
cat > /var/www/html/index.php << "EOF"
<?php phpinfo(); ?>
EOF
wget -O php_index.html http://127.0.0.1/index.php
cat ./php_index.html
## Install MariaDB
apt install -y mariadb-server php-mysql phpmyadmin
mysql -u user -p
#http://127.0.0.1/phpmyadmin
phpenmod mysqli
/etc/init.d/apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment