Skip to content

Instantly share code, notes, and snippets.

@GussRw
Last active May 25, 2024 00:54
Show Gist options
  • Save GussRw/817f3c2e30563d43d33097d35f6bd93c to your computer and use it in GitHub Desktop.
Save GussRw/817f3c2e30563d43d33097d35f6bd93c to your computer and use it in GitHub Desktop.
My Debian Setup

My Debian Setup

Google Chrome

sudo apt install fonts-liberation libappindicator3-1
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install -f

Discord

https://discordapp.com/api/download?platform=linux&format=deb
sudo apt install libc++1
sudo dpkg -i discord-x.x.x.deb
sudo apt install -f

PHP 8.3

sudo add-apt-repository ppa:ondrej/php
sudo apt install php8.3 libapache2-mod-php8.3
sudo apt install php8.3-fpm php8.3-dom php8.3-raphf php8.3-http php8.3-curl php8.3-zip php8.3-mysql php8.3-mbstring php8.3-xml php8.3-gd php8.3-curl php8.3-intl php8.3-dom php8.3-xml php8.3-soap php8.3-sqlite3 php8.3-bcmath
sudo update-alternatives --set php /usr/bin/php8.3

systemctl stop apache2
a2dismod php8.3
a2dismod mpm_prefork
a2enmod mpm_event
apt install libapache2-mod-fcgid
a2enconf php8.3-fpm
a2enmod proxy
a2enmod rewrite
a2enmod proxy_fcgi
systemctl restart apache2

PHP 7.4

sudo add-apt-repository ppa:ondrej/php
sudo apt install php7.4 libapache2-mod-php7.4
sudo apt install php7.4-{fpm,dom,raphf,curl,zip,mysql,mbstring,xml,gd,curl,intl,dom,xml,soap,sqlite3,bcmath}

PHP old versions on ubuntu > 22

Add this source to /etc/apt/sources.list

deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
#deb-src https://ppa.launchpadcontent.net/ondrej/php/ubuntu/kinetic main
Add composer to PATH
export PATH=$PATH:~/.config/composer/vendor/bin

MySQL 5

sudo apt install mysql-server
sudo /etc/init.d/mysql stop
sudo mkdir /var/run/mysqld/
sudo chown mysql /var/run/mysqld/
sudo mysqld_safe --skip-grant-tables &
sudo mysql -u root
use mysql;
update user set authentication_string=PASSWORD("toor") where User='root';
update user set plugin="mysql_native_password" where User='root';
flush privileges;
exit;
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'toor';

MySQL 8

sudo apt install mysql-server
sudo mysql -u root
use mysql;
update user set plugin="mysql_native_password" where User='root';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'toor';
flush privileges;

CREATE USER 'user_name'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
CREATE DATABASE database_name;
GRANT ALL PRIVILEGES ON database_name.* TO 'user_name'@'localhost' WITH GRANT OPTION;

Valet Linux

sudo apt install jq xsel libnss3-tools
composer global require cpriego/valet-linux
valet install

NodeJS

curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs build-essential

ZSH & Oh-My-Zsh

sudo apt install zsh
sudo chsh -s /usr/bin/zsh $USER
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Spaceship Theme
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" 
ZSH-Autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Add to .zshrc

 plugins=(zsh-autosuggestions)
 ZSH_THEME="spaceship"

Wkhtmltopdf

sudo apt install ttf-mscorefonts-installer libssl-dev libfontconfig1 libxrender1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo apt install ./wkhtmltox_0.12.6-1.bionic_amd64.deb

Wkhtmltopdf (Ubuntu 22)

sudo apt install ttf-mscorefonts-installer libssl-dev libfontconfig1 libxrender1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb

Python

sudo apt install python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment