-
-
Save mechawrench/190a89d4169768b3a1495f9f885f7ebf to your computer and use it in GitHub Desktop.
Raspberry Pi Install PHP7 + Nginx + MySQL + PhpMyAdmin (last versions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$(whoami)" != "root" ]; then | |
echo "root required!" | |
exit | |
fi | |
apt-get update | |
apt-get upgrade | |
apt-get dist-upgrade | |
#helps to prevent hacking attempts by detecting log-in attempts that use a dictionary attack | |
#and banning the offending IP address for a short while. | |
apt-get install fail2ban | |
#instal php/mysql/phpmyadmin | |
apt-get install php7.0-fpm php7.0-curl php7.0-gd php7.0-cli php7.0-mcrypt php7.0 php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mysql | |
apt-get install mysql-server | |
mysql_secure_installation | |
# PhpMyAdmin | |
read -p "Do you want to install PhpMyAdmin? <y/n> " prompt | |
if [ "$prompt" = "y" ]; then | |
apt-get install phpmyadmin | |
ln -s /usr/share/phpmyadmin /var/www/default/public | |
fi | |
apt-get -y autoremove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment