Skip to content

Instantly share code, notes, and snippets.

@Max95Cohen
Last active January 21, 2023 11:52
Show Gist options
  • Save Max95Cohen/75cbbf39f74064ee2246f0b23aea2bb8 to your computer and use it in GitHub Desktop.
Save Max95Cohen/75cbbf39f74064ee2246f0b23aea2bb8 to your computer and use it in GitHub Desktop.
apt install command
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install \
git \
vim \
nano \
php8.1 php8.1-{cli,fpm,gd,zip,mbstring,mysql,dom,xml,curl,redis,memcached} \
php7.4 php7.4-{cli,fpm,gd,zip,mbstring,mysql,dom,xml,curl,redis,memcached} \
mysql-server-8.0 \
nginx
cd
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
wget https://gist.githubusercontent.com/Max95Cohen/7af5c9db2c003cb0c032265c77a14907/raw/1d51080f12a88846e6ff6188cace28c8cae58530/git.sh
wget https://gist.githubusercontent.com/Max95Cohen/e86448c0e258703d604c98992fb5e55d/raw/3c824eddd6f1b42dfc8b888510083e00dfe2b0c4/.vimrc
sed -i 's/ls --color=auto/ls --color=auto --group-directories-first/' .bashrc
sed -i '59i PROMPT_COMMAND="source /home/aibekq/git.sh";' .bashrc
sed -i '60i \ ' .bashrc
echo "PS1='${debian_chroot:+($debian_chroot)}[\e[0;33m\t\e[0m] \e[1;36m\w \e[0;30m\j \e[1;31m$git_branch\n\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] $ '" >> .bashrc
echo "alias rm='rm -i';" >> .bashrc
echo "eval \$(ssh-agent);" >> .bashrc
echo "if [ -f /var/run/reboot-required ]; then echo 'reboot required'; fi" >> .bashrc
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment