1. 下载源码:https://codeload.github.com/django/djangoproject.com/zip/master
2. 本地解压
3. 下载python2.7 install https://www.python.org/downloads/
3.1 yum安装zlib-devel-1.2.3-29.el6.x86_64,修改Modules/Setup,开启zlib支持

464 # Andrew Kuchling's zlib module.
465 # This require zlib 1.1.3 (or later).
466 # See http://www.gzip.org/zlib/
467 zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz

4. 下载pip工具,安装pip:https://bootstrap.pypa.io/get-pip.py

5. 安装postgresql https://ftp.postgresql.org/pub/source/v9.0.2/postgresql-9.0.2.tar.gz

./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &

6. 按照readme.rst安装

#. Create a virtualenv

#. Install dependencies::

pip install -r requirements/dev.txt

Alternatively use the make task::

make install

#. Create a 'secrets.json' file in the directory above the checkout, containing
something like:: { "secret_key": "xyz",
"superfeedr_creds": ["any@email.com", "some_string"] } #. Create databases:: createuser -d djangoproject
createdb -O djangoproject djangoproject
createuser -d code.djangoproject
createdb -O code.djangoproject code.djangoproject #. Create tables:: psql -d code.djangoproject < tracdb/trac.sql ./manage.py migrate #. Create a superuser:: ./manage.py createsuperuser #. Populate the www and docs hostnames in the django.contrib.sites app:: ./manage.py loaddata dev_sites #. For docs:: ./manage.py loaddata doc_releases
./manage.py update_docs #. For dashboard:: ./manage.py loaddata dashboard_example_data
./manage.py update_metrics #. Point the ``www.djangoproject.dev``, ``docs.djangoproject.dev`` and ``dashboard.djangoproject.dev``
hostnames with your ``/etc/hosts`` file to ``localhost``/``127.0.0.1``.
Here's how it could look like:: 127.0.0.1 docs.djangoproject.dev www.djangoproject.dev dashboard.djangoproject.dev If you're on Mac OS and don't feel like editing the ``/etc/hosts`` file
manually, there is a great preference pane called `Hosts.prefpane`_. On
Ubuntu there is a `built-in network admin`_ GUI to do the same. Remember
both require admin priviledges, just like you'd need when editing
``/etc/hosts`` with your favorite editor. .. _`Hosts.prefpane`: https://github.com/specialunderwear/Hosts.prefpane
.. _`built-in network admin`: https://help.ubuntu.com/community/NetworkAdmin #. Finally run the server:: make run

8. Windows本地host文件修改:C:\Windows\System32\drivers\etc\hosts 中添加如下:

192.168.31.123    docs.djangoproject.dev
192.168.31.123 www.djangoproject.dev
192.168.31.123 dashboard.djangoproject.dev

9. 本地访问,幸福的码农生活才刚刚开始 ^_^

最新文章

  1. Java虚拟机详解01----初识JVM
  2. Radius session
  3. thinkphp 一个页面使用2次分页的方法
  4. 去掉影响效率的where 1=1
  5. canvas 俄罗斯方块
  6. Java反射学习(java reflect)(一)
  7. redis运行状态图形化监控工具 — RedisLive
  8. js中关于一个数组中最大、最小值以及它们的下标的输出的一种解决办法
  9. nginx 搭建rtmp流媒体所用资源
  10. 选择Blobs (Evision)
  11. 【前端】react and redux教程学习实践,浅显易懂的实践学习方法。
  12. HTML required
  13. xcode10关于clang -lstdc++.6.0.9报错问题
  14. Linux rpm包安装不了
  15. Linux下clock计时函数学习【转】
  16. django 视图函数返回queryset对象或日期对象至浏览器ajax接收的写法
  17. mongo 删除内嵌数组元素
  18. java-信息安全(十二)-数字签名【Java证书体系实现】
  19. BAT-显示桌面图标
  20. 在UNITY中按钮的高亮用POINT灯实现,效果别具一番风味

热门文章

  1. 自定义WebViewPage,实现Url.Action生成绝对地址
  2. 所见即所得的网页设计工具 Macaw
  3. solr6.6 高级搜索Facet
  4. Node.js 使用爬虫批量下载网络图片到本地
  5. Git学习资源推荐
  6. Python——网络编程,如何避免死锁?
  7. Django——模版Template报错
  8. svn命令行版本回滚
  9. 监听器如何获取Spring配置文件
  10. 轻量级代码生成器-OnlyCoder 第一篇