Mac常见操作
程序员文章站
2022-03-10 09:18:48
...
- sed:mac自带bsd的sed,安装gnu下的sed
brew install gnu-sed --with-default-names
- 安装homebrew,类似ubuntu的apt-get
#1、安装homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 安装nginx
#1、安装nginx,默认安装路径:/usr/local/etc brew install nginx #2、启动nginx nginx
- 切换root
sudo su -
- 系统目录无法写入文件Read-only file system
sudo mount -uw /
- 查看sip状态,系统完整性保护,开启后无法修改系统目录文件
csrutil status
- php相关
brew install php71 brew services start php@7.1 brew services restart php@7.1
- 查询80端口被谁占用了
sudo lsof -i:80
- apache启停操作
#关闭随机启动 sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist #开启随机启动 sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist #启动apache sudo apachectl start #重启apache sudo apachectl restart #停止apache sudo apachectl stop
持续更新
上一篇: Pharo 1.2.1发布,开源的Smalltalk开发环境
下一篇: Seam和Quartz集成