非 root 用户设置环境变量:在< .bash_profile >中设置
后台运行:nohup dosomething >> log.out &
nginx
启动nginx:nginx -c <configpath>
重启nginx:nginx -s reload
停止nginx:pkill -9 nginx / kill -QUIT nginxpid
uwsgi
启动uwsgi:uwsgi --ini <inipath>
重启uwsgi:uwsgi --reload <path to uwsgi.pid>
停止uwsgi:uwsgi --stop <path to uwsgi.pid>
mongodb
(mongodb 真是可怕,稍不留神就挂了/(ㄒoㄒ)/~~)
启动mongodb:mongod --config <configpath>
停止mongodb:
进入mongo shell
use admin
(通过验证 db.auth('user', 'pwd'))
db.shutdownServer()
redis
启动redis:redis-server <path to redisconf>
停止redis:redis-cli shutdown
celery
启动celery:celery multi start w1 proj -A -l warning --pidfile=<path to pidfile> --logfile=<path to logfile>
重启celery:celery multi restart w1 proj -A -l warning --pidfile=<path to pidfile> --logfile=<path to logfile>
停止celery:celery multi stopwait w1 proj -A -l warning --pidfile=<path to pidfile> --logfile=<path to logfile>