ssh-keygen
Host name
HostName IP
User root
Port 22
IdentityFile ~/.ssh/key
ssh name
curl -L zekan.tk/vimrc > .vimrc
sudo cp .vimrc /root/.vimrc
vim /etc/ssh/sshd_config
#Port 22
sudo ufw allow NEW_PORT
sudo service ssh restart
Essentials
sudo apt install tmux zsh git vim vim-gtk curl wget tig jq -y
OH MY ZSH on root and normal user, make sure to use different themes to distinguish
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Create new user
adduser user
usermod -aG sudo user
usermod -aG wheel user
# NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# YARN
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install --no-install-recommends yarn
sudo apt install apache2
sudo systemctl start apache2.service
sudo systemctl enable apache2.service
# OMG WTF THIS WORKS
sudo apt install php php-{bcmath,bz2,intl,gd,mbstring,mysql,zip,fpm,curl,dom} -y
sudo a2enmod rewrite
sudo a2enmod php7.4
systemctl restart apache2
sudo chown -R www-data:www-data /var/www/page
sudo apt install mysql-server
sudo mysql_secure_installation
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dev.* TO 'wordpress'@'localhost';
FLUSH PRIVILEGES;
Open vim /etc/mysql/mysql.cnf
[mysqld]
default-authentication-plugin=mysql_native_password
Setup PSQL
sudo apt install postgresql postgresql-contrib
sudo su postgres
createuser -s USER
createdb USER
psql
\password USER
# -> password
# -> password
\q
sudo apt install tig
sudo ufw app list
sudo ufw allow in "Apache"
sudo ufw allow 22
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d url.com