Mac安装mysql后配置文件Mac安装mysql后配置文件mysql -u root -proot 本机mysql账号密码关于zsh终端的一个坑修改完 ~/.bash_profile 添加全局变量后,用zsh终端重新打开,还是找不到命令。解决办法,在 ~/.zshrc 里添加source ~/.bash_profile即每次打开终端,自动执行一遍配置文件,就能找到对应命令了Mac 自带apache 的使用sudo apachectl start // 启动sudo apachectl stop // 停止配置文件目录/etc/apache2/httpd.conf站点根目录/Library/WebServer/Documents/Mac 安装 nginx安装brew install nginx安装完提示Docroot is: /usr/local/var/wwwThe default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so thatnginx can run without sudo.nginx will load all files in /usr/local/etc/nginx/servers/.To have launchd start nginx now and restart at login: brew services start nginxOr, if you don’t want/need a background service you can just run: nginx根据提示,直接输入 nginx 命令就可以打开服务器了。站点根目录在 /usr/local/var/www。配置文件在 /usr/local/etc/nginx/nginx.conf。Mac 使用小技巧在终端打开访达,直接运行 open 命令即可。比如想往一个目录复制文件,在命令行里cd到路径后,通过open命令打开访达,复制文件更方便open . // 打开当前目录