sudo visudo
{USER} ALL=(ALL) NOPASSWD: ALL
sudo apt install vim -y
sudo apt update
sudo apt upgrade
sudo apt autoremove
sudo apt install git -y
sudo apt install apache2 mysql-server php php-mysql php-mbstring php-zip php-dom php-curl php-imagick php-gd -y
git config --global user.name "Singh"
git config --global user.email "[email protected]"
git config --global core.excludesfile "~/.gitignore"
git config --global color.ui true
git config --global push.default current
sudo ln -s /bin/nano /usr/bin/nano
curl https://gist.githubusercontent.com/pritdeveloper/703cb04659cd37d836fadbe0f02b0df6/raw >> ~/.gitconfig
curl https://gist.githubusercontent.com/pritdeveloper/acfd4edd5cc3f43cb6b5f3338acd9fdf/raw > ~/.gitignore
sudo apt install composer -y
sudo a2enmod rewrite
sudo a2enmod ssl
sudo vi /etc/apache2/envvars
sudo vi ~/.bashrc
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W$(parse_git_branch)\$ '
fi
curl https://gist.githubusercontent.com/pritdeveloper/7e703ce556680fb007b1d51090a6bfcf/raw > ~/.bash_aliases
. ~/.bashrc
sudo mkdir /var/www/vhosts
sudo chown ${USER}:${USER} -R /var/www/html/ /var/www/vhosts/
curl https://gist.githubusercontent.com/pritdeveloper/549542016e7f57c8c295e068b99c5e1e/raw | sudo tee /etc/apache2/sites-available/a.conf
sudo apt install phpmyadmin -y
warnings in phpmyadmin
sudo vi /usr/share/phpmyadmin/libraries/sql.lib.php sudo vi /usr/share/phpmyadmin/libraries/plugin_interface.lib.phpLines 613, 551 replace with
|| (count($analyzed_sql_results['select_expr']) == 1 if ($options != null && count( (array) $options) > 0) {