Commands Cheat Sheet
RuSITE | caorussell | March 13, 2020, 9:48 a.m.

We have used too many servers in building our site. When we will make some modification on site, some of servers should be restart or reload.

There is a cheat sheet of commands we used before.

Ubuntu

sudo apt update
sudo apt list --upgradable
sudo apt upgrade

Nginx

# start, stop and reload server
sudo /etc/init.d/nginx start
sudo /etc/init.d/nginx stop
sudo /etc/init.d/nginx reload
# check access and error log
vim /var/log/nginx/access.log;
vim /var/log/nginx/error.log;

uWSGI

sudo killall -9 uwsgi
uwsgi --ini mysite_uwsgi.ini

Django

#

MySQL

# login into mysql with username "root"
mysql -u root -p
# backup database "mysite" to file "mysite.sql"
mysqldump -u root -p mysite > ~/mysite/databackup/mysite.sql
# import database from "mysite.sql" to database "mysite"
mysql -u root -p mysite < ~/mysite/databackup/mysite.sql

Others

# run jupyterlab in the background
nohup jupyter lab &