DevOps Tools and Documentation. If your desktop using windows, download and install git-scm. Use terminal or git bash for the next section.
powerprofilesctl set performance
powerprofilesctl set balanced
Please make sure your server or desktop has SSH key. To check it please do this command :
cat ~/.ssh/id_ed25519.pub
if there is no key appears, plese generate the key also set global config of git and please add the public key to your github profile.
ssh-keygen -t ed25519 -C "awangga@gmail.com"
git config --global user.email "awangga@gmail.com"
git config --global user.name "Rolly Maulana Awangga"
Old RSA Legacy Systems:
ssh-keygen -t rsa -b 4096 -C "awangga@gmail.com"
cat ~/.ssh/id_rsa.pub
Set tmux tmp dir
# Buat folder tmuxtmp di current directory
mkdir -p $(pwd)/tmuxtmp
# Set tmux tmpdir ke folder tersebut
export TMUX_TMPDIR=$(pwd)/tmuxtmp
# Jalankan tmux
tmux
Open your git bash, change directory into your repo folders then:
git tag #check current version
git tag v0.0.3 #set tag version
git push origin --tags #push tag version to repo
Mounting drive and generate ssh
import os
from google.colab import drive
drive.mount('/content/drive')
folder = '/content/drive/My Drive/SK2/fix/siabre'
savedir=folder
os.chdir(savedir) #change dir
!pwd
generate ssh key, add github.com host, and backup key to current folder for next future use
!ssh-keygen -t rsa -b 4096 -C "rolly@awang.ga"
!git config --global user.name "Rolly Maulana Awangga"
!git config --global user.email rolly@awang.ga
!ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
!cat ~/.ssh/id_rsa.pub
!cp -R /root/.ssh/ ./ssh/
for next use just
!cp -R ./ssh/ /root/.ssh/
clone and change dir
!git clone url
os.chdir('/content/drive/My Drive/SK2/fix/siabre')
Please create git repo first and copy ssh uri, for example :
git@github.com:awangga/crot.git
use it in replace with : git remote add origin Go to your website folder for example in : /var/www/html/siap
cd /var/www/html/siap
git init
git commit -m "first commit"
git remote add origin git@github.com:awangga/crot.git
git pull origin main --allow-unrelated-histories
git push origin main
If database name is dbname then, On Source Server :
mysqldump -u root -p --opt dbname > dbname.sql
scp dbname.sql user@192.168.1.219:~/
then go to target server:
ssh user@192.168.1.219
mysql -u root -p dbname < dbname.sql
Using git bash create yout key, you dont have to do this if you already have a key
ssh-keygen -t rsa -b 4096 -C "rolly@awang.ga"
send key to the server
cat ~/.ssh/id_rsa.pub | ssh usernya@hostnya.com 'cat >> .ssh/authorized_keys'
ssh into server and change permission
chmod 700 .ssh; chmod 640 .ssh/authorized_keys
Check Disk Usage
sudo du -hc --max-depth=1 /
Setup timezone
sudo dpkg-reconfigure tzdata
date
Go Installation
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go
Install Google Drive Connection and tools
sudo apt install unzip tmux
sudo apt install python3-pip
sudo pip install gdown
Update and Maintenance
gdown uid --folder
tmux
tmux ls
tmux attach #
Navigation : Ctrl+B in same time, then :