Chinaunix

标题: Red Hat 无 root 帐户 配置 Python和 Django [打印本页]

作者: kxw102    时间: 2011-12-15 20:41
标题: Red Hat 无 root 帐户 配置 Python和 Django
大家好,我是新人。
最近我想借用公司的服务器,在公司内部开发自己的网页,我想用Apache+Python+Django+Mysql搭配使用,但是IT部门肯定不会给我root权限的,而且也没有必要在全局安装这些东西。
我听说Python2.6开始可以在自己的账户下面进行安装site-packages等等,但是我不知道怎么做。就算可以,没有root权限,可以配置Django吗?

谢谢各位的意见。
作者: dooros    时间: 2011-12-16 13:27
可以,你可以试试。
作者: kxw102    时间: 2011-12-16 15:22
想请问一下,如何做到的呢?
作者: windwiny    时间: 2011-12-16 15:49
  1. Specification

  2. site directory (site-packages)

  3. A directory in sys.path. In contrast to ordinary directories the pth files in the directory are processed, too.
  4. user site directory

  5. A site directory inside the users' home directory. A user site directory is specific to a Python version. The path contains the version number (major and minor only).

  6. Unix (including Mac OS X)
  7. ~/.local/lib/python2.6/site-packages
  8. Windows
  9. %APPDATA%/Python/Python26/site-packages
  10. user data directory

  11. Usually the parent directory of the user site directory. It's meant for Python version specific data like config files, docs, images and translations.

  12. Unix (including Mac)
  13. ~/.local/lib/python2.6
  14. Windows
  15. %APPDATA%/Python/Python26
  16. user base directory

  17. It's located inside the user's home directory. The user site and use config directory are inside the base directory. On some systems the directory may be shared with 3rd party apps.

  18. Unix (including Mac)
  19. ~/.local
  20. Windows
  21. %APPDATA%/Python
  22. user script directory

  23. A directory for binaries and scripts. [10] It's shared across Python versions and the destination directory for scripts.

  24. Unix (including Mac)
  25. ~/.local/bin
  26. Windows
  27. %APPDATA%/Python/Scripts
复制代码

作者: 3227049    时间: 2011-12-16 16:16
python,django都不需要root的,自己编译一个在自己目录,或者全局的python,用virtualenv或者把类包放在PYTHONPATH/sys.path里

apache也不用root的,不过非root绑不了1024以下端口,就是说80用不了
作者: dooros    时间: 2011-12-16 19:25
直接安装到自己的目录下。
作者: xiaopan3322    时间: 2011-12-21 10:53
py和Django不需要root的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2