Simple Server Set Up without Panel, easy deployment and easy migration. Please make sure your server has SSH key. To check it please do this command
sudo su
cat ~/.ssh/id_rsa.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 rsa -b 4096 -C "[email protected]"
git config --global user.email "[email protected]"
git config --global user.name "Rolly Maulana Awangga"
cat ~/.ssh/id_rsa.pub
Please create git repo first and copy ssh uri, for example :
[email protected]: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 [email protected]:awangga/crot.git
git pull origin master --allow-unrelated-histories
git push origin master
If database name is dbname then, On Source Server :
mysqldump -u root -p --opt dbname > dbname.sql
scp dbname.sql [email protected]:~/
then go to target server:
ssh [email protected]
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 "[email protected]"
send key to the server
cat ~/.ssh/id_rsa.pub | ssh [email protected] '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 /