Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. Open `~/.bashrc` :
  2.  
  3. ```bash
  4. sudo nano ~/.bashrc
  5. ```
  6.  
  7.  
  8. and insert :
  9.  
  10.  
  11. ```bash
  12. # ES
  13. alias stopEs='sudo /etc/init.d/elasticsearch stop'
  14. alias startEs='sudo /etc/init.d/elasticsearch start'
  15. alias restartEs='sudo /etc/init.d/elasticsearch restart'
  16.  
  17. # Redis
  18. alias stopRedis='sudo /etc/init.d/redis-server stop'
  19. alias startRedis='sudo /etc/init.d/redis-server start'
  20. alias restartRedis='sudo /etc/init.d/redis-server restart'
  21.  
  22. # Apache
  23. alias stopApache='sudo apachectl stop'
  24. alias startApache='sudo apachectl start'
  25. alias restartApache='sudo apachectl restart'
  26.  
  27. # Mysql
  28. alias stopMysql='sudo service mysql stop'
  29. alias startMysql='sudo service mysql start'
  30. alias restartMysql='sudo service mysql restart'
  31.  
  32. # All
  33. alias startAll='sudo apachectl start && sudo service mysql start && sudo /etc/init.d/redis-server start && sudo /etc/init.d/elasticsearch start'
  34. alias stopAll='sudo apachectl stop && sudo service mysql stop && sudo /etc/init.d/redis-server stop && sudo /etc/init.d/elasticsearch stop'
  35.  
  36.  
  37. ```
  38.  
  39. Then :
  40.  
  41. ```bash
  42. source ~/.bashrc
  43. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement