Django Error: That port is already in use.

1.python manage.py migrate 你会看到如下结果
Django Error: That port is already in use._第1张图片

2.ps aux | grep -i manage 查看开启的服务

Django Error: That port is already in use._第2张图片

 

3. sudo kill 30795  (30795是对应的服务ID)    停掉manage开启的服务,ps aux | grep -i manage 查看开启的服务

Django Error: That port is already in use._第3张图片

4. python manage.py runserver 0.0.0.0:8000重新启动django 

Django Error: That port is already in use._第4张图片

 

5.服务启动成功  浏览器检查页面 http://服务器地址:8000/index/   部署成功

Django Error: That port is already in use._第5张图片

 

你可能感兴趣的:(python,django,linux)