However, the start/stop commands for each are not added to the PATH by default and it's tough remembering the long paths to the control programs.
But there's a solution:
- Open the Terminal
- Make sure that you're in your home folder.
- Edit (or create) .bash_profile
$ nano .bash_profile
- Add aliases for your commands
alias apache2ctl="sudo /opt/local/apache/bin/apachectl" alias mysqlstart="sudo /opt/local/bin/mysqld_safe5" alias mysqlstop="sudo /opt/local/bin/mysqladmin5 -u root -p shutdown"
- restart your bash session with
source ~/.bash_profile
and you're good to go...
apache2ctl start # Start Apache apache2ctl stop # Stop Apache apache2ctl graceful # Restart Apache mysqlstart # Start Mysql mysqlstop # Stop Mysql
No comments:
Post a Comment
Please leave your feedback and comments. I love to discuss this stuff!