燕十八

mac的端口被占用

1. 查看端口号

 sudo lsof -i:80
COMMAND  PID   USER   FD   TYPE            DEVICE SIZE/OFF NODE NAME
httpd    955   root    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd    959 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd    960 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd    961 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd    962 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd   1291 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd   1295 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd   1296 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd   1322 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd   1323 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)
httpd   1324 daemon    9u  IPv6 0xf133408b3ad7dd3      0t0  TCP *:http (LISTEN)

2. 查杀对应的端口号

sudo kill 955

 

3. 进入到tp6的目录

 php think run -p 80 

1 Development server is started On <http://0.0.0.0:80/>
2 You can exit with `CTRL-C`
3 Document root is: /Applications/XAMPP/xamppfiles/htdocs/tp6/public

 

posted @ 2021-12-18 10:04  启红  阅读(93)  评论(0编辑  收藏  举报