常用服务脚本命令
mysql
1
2
3
4
5
6
7
8
9
10
11
12
13
14// login mysql
mysql -u root -p
// start mysql server
mysql.server start
// stop mysql server
mysql.server stop
// restart mysql server
mysql.server restart
// reload mysql server
mysql.server reloadnginx
1
2
3
4
5
6
7
8
9// config nginx
sudo vim /usr/local/etc/nginx/nginx.conf
// start nginx server
cd /usr/local/bin
sudo ./nginx
// reload nginx server
sudo /usr/local/bin/nginx -s reloadredis
1
2
3
4
5
6// login redis
redis-cli
// start redis server
cd /usr/local/etc
redis-server redis.confvagrant
1
2
3
4
5
6
7
8
9
10
11// login vagrant
cd ~/projects/vip/vagrant
vagrant ssh
// start vagrant server
cd /Users/huiqiang.lin/projects/vip/vagrant
vagrant up
// reload vagrant server
cd /Users/huiqiang.lin/projects/vip/vagrant
vagrant reloadssh远程登录
1
ssh -p port username@ip