linux-setup-2021
v0.0.1
Published
LINUX SETTING: KDE Neon and ubuntu 21.04
Downloads
2
Readme
LINUX SETTING: kubuntu 21.04
Setup New Ubuntu
#1 install kubuntu https://kubuntu.org/getkubuntu/ or KDE Neon https://neon.kde.org/download User Edition
# Create Boot Image Terminal
lsblk
# sudo umount /dev/sdb
sudo dd bs=4M if=~/Downloads/ubuntu.iso of=/dev/sdb conv=fdatasync
# install OS from Boot Image
ssh-keygen
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
sudo swapoff /swapfile
sudo rm /swapfile
#3 Setting add-apt-repository install
# sudo apt install -y python-software-properties software-properties-common
#OR
sudo apt install -y software-properties-common
# Remove a PPA using APT in terminal
# sudo add-apt-repository --remove ppa:danielrichter2007/grub-customizer
#4 grub-customizer
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt install grub-customizer -y
#5 ibus-unikey
sudo apt install ibus-unikey -y
ibus-daemon -Rd
im-config
#8 Screenshot
import ~/Pictures/Screenshot_`date '+%d-%m-%Y_%H:%M:%S'`.png
#10 install gedit git rar unrar ...
sudo apt install gedit git rar unrar nginx gparted docker-compose rhythmbox simplescreenrecorder tree -y
#12 download https://ngrok.com/download
sudo unzip ~/Downloads/ngrok-stable-linux-amd64.zip -d /usr/bin/
#13 install Inkscape Stable
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt install -y inkscape
sudo add-apt-repository --remove ppa:inkscape.dev/stable
#14 install Sublime Text
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt install -y apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install -y sublime-text
#28 Python run localhost:3000
python2.7 -m SimpleHTTPServer 3000
# or
python3 -m http.server 3000
#29 Create a Self-Signed SSL Certificate for Nginx
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
sudo gedit /etc/nginx/snippets/self-signed.conf
# add to new line
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
# save & exit
sudo openssl dhparam -out /etc/nginx/dhparam.pem 4096
# next file:::::::::::::::::::::::::::::::::::
sudo gedit /etc/nginx/snippets/ssl-params.conf
# add to new line
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off; # Requires nginx >= 1.5.9
ssl_stapling on; # Requires nginx >= 1.3.7
ssl_stapling_verify on; # Requires nginx => 1.3.7
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
# Disable strict transport security for now. You can uncomment the following
# line if you understand the implications.
# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
# add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
# save & exit
# next file:::::::::::::::::::::::::::::::::::
sudo gedit /etc/hosts
# ...
# ...
# next line add
127.0.0.1 domain1.com
127.0.0.1 domain2.com
127.0.0.1 shop-mgt.com
# save & exit
# next file:::::::::::::::::::::::::::::::::::
sudo gedit /etc/nginx/conf.d/domain.conf
# add code
server {
listen 443;
listen [::]:443;
ssl on;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
server_name domain1.com;
location / {
proxy_pass http://localhost:3000/;
}
}
server {
listen 443;
listen [::]:443;
ssl on;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
server_name domain2.com;
location / {
proxy_pass https://localhost:8000/;
}
}
# save & exit
#EX::::::::::::::::::::::::::::::::::::::::::#
sudo gedit /etc/nginx/conf.d/shop-mgt.com.conf
##############################################
server {
listen 80;
server_name shop-mgt.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
listen [::]:443;
ssl on;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
server_name shop-mgt.com;
location / {
proxy_pass http://localhost:11197/;
}
}
##############################################
sudo service nginx restart
# browser https://domain1.com/ or https://domain2.com/
# Telegram skypeforlinux slack Postman PostmanCanary dbeaver visual code webstorm goland datagrip google-chrome yarn firebase-tools cordova mongo studio firefox