V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
jihuoguo
V2EX  ›  Python

django,能搞像 tomcat 那样,在 windows 上开机启动服务吗

  •  
  •   jihuoguo · 2018-12-29 14:42:38 +08:00 · 3133 次点击
    这是一个创建于 1916 天前的主题,其中的信息可能已经有所发展或是发生改变。
    11 条回复    2018-12-30 17:52:04 +08:00
    guolaopi
        1
    guolaopi  
       2018-12-29 15:12:14 +08:00
    写个 BAT 开机执行一下
    xpresslink
        2
    xpresslink  
       2018-12-29 15:14:00 +08:00
    这件事情,和 django 和 tomcat 都没有关系。
    你把任何可执行程序或快捷方式放到
    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
    这个目录里面就可以开机自己启动。
    还有可以添加后台服务项的方式,对于你有点难就不说了。
    xpresslink
        3
    xpresslink  
       2018-12-29 15:15:48 +08:00
    win10 以前用户直接就可以看到
    开始->程序->启动
    文件夹
    hushuikun
        4
    hushuikun  
       2018-12-29 15:23:42 +08:00 via Android
    把 django 程序添加到服务吧,我用的是 nssm 添加的
    singerll
        5
    singerll  
       2018-12-29 15:24:48 +08:00
    组策略添加开机脚本即可
    xiangyuecn
        6
    xiangyuecn  
       2018-12-29 15:28:19 +08:00
    可以用用 winsw 把任意代码程序安装成服务,我用这个写了个 nginx 的 windows 服务,github: xiangyuecn/Nginx-Windows-Service-Manager。另外还有个 Zookeeper 的,java 的,应该和 Python 类似操作
    julyclyde
        7
    julyclyde  
       2018-12-29 15:43:32 +08:00
    django 只是个编程框架,并不涉及到“怎么运行”
    jihuoguo
        8
    jihuoguo  
    OP
       2018-12-29 16:38:05 +08:00
    hv3s1
        9
    hv3s1  
       2018-12-29 17:40:15 +08:00
    不准备用个 uwget 么...
    zhjits
        10
    zhjits  
       2018-12-30 12:51:42 +08:00
    GoTop
        11
    GoTop  
       2018-12-30 17:52:04 +08:00
    你需要的是开机启动 apache
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1535 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:58 · PVG 07:58 · LAX 16:58 · JFK 19:58
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.