mac 当前电脑已有服务
1.svn
svnserve -d -r /Users/apple/svnroot/repository
2.mysql
启动MySQL服务
sudo /usr/local/mysql/support-files/mysql.server start
停止MySQL服务
sudo /usr/local/mysql/support-files/mysql.server stop
重启MySQL服务
sudo /usr/local/mysql/support-files/mysql.server restart
3.ftpserver
开启ftp server
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
关闭命令
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
4.开启自带apache Mac系统
1)sudo apachectl start
2)sudo vim /etc/apache2/httpd.conf
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
把/Library/WebServer/Documents修改为自己的网站根目录,
我的是/Users/user/Desktop/Project/PHPWorkspace
3) 关闭 sudo apachectl stop
参考: https://blog.csdn.net/magaiou/article/details/80302355 https://blog.csdn.net/kongxx/article/details/79646006
网友评论