Last active
January 23, 2021 09:01
-
-
Save saderi/af196e947b5f913a32e188d901975f0e to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# This script is meant for quick & easy install via: | |
# Tested in debian 9 | |
# $ wget -q -O - "https://gist.github.com/saderi/af196e947b5f913a32e188d901975f0e/raw" | bash - | |
# install apache, mysql | |
apt-get update \ | |
&& apt-get install -y curl vim git ca-certificates apt-transport-https gnupg && \ | |
apt-get install -y apache2 mariadb-server | |
# install php | |
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - && \ | |
echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list && \ | |
apt update && \ | |
apt-get install -y php php-mysql libapache2-mod-php php-xml php-gd php-zip php-mbstring php-json | |
apt-get install -y certbot python-certbot-apache | |
# Edit .bashrc enable color in bash | |
sed -i \ | |
-e "s/# export LS_OPTIONS='--color=auto'/export LS_OPTIONS='--color=auto'/g" \ | |
-e "s/# alias ls='ls \$LS_OPTIONS'/alias ls='ls \$LS_OPTIONS'/g" \ | |
-e "s/# eval \"\`dircolors\`\"/eval \"\`dircolors\`\"/g" \ | |
.bashrc | |
# Create custom .vimrc for disable VISUAL mod and enable syntax | |
echo "syntax on" > .vimrc \ | |
&& echo "colorscheme desert" >> .vimrc \ | |
&& echo "set mouse-=a" >> .vimrc | |
echo "Use this for MySQL root password"; | |
echo "----------------------------------" | |
echo "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOUR_ROOT_PASSWORD');" | |
echo "UPDATE mysql.user SET plugin='' WHERE User='root';" | |
echo "FLUSH PRIVILEGES;" | |
echo | |
echo | |
echo "Good Lock :) :D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment