<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Django Service (服务) &#8211; Eternal Center</title>
	<atom:link href="https://eternalcenter-2021-12.github.io/category/services/website-services/django-service/feed/" rel="self" type="application/rss+xml" />
	<link>https://eternalcenter-2021-12.github.io/</link>
	<description></description>
	<lastBuildDate>Sun, 26 Dec 2021 09:02:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>[步骤] Linux SSL 证书的生成 （Let&#8217;s Encrypt certbot 版）</title>
		<link>https://eternalcenter-2021-12.github.io/ssl-lets-encrypt-certbot/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sun, 19 Dec 2021 15:12:46 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Basic Guidelines for Website building (网站建设基础指南)]]></category>
		<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Django Service (服务)]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Nginx Security (安全)]]></category>
		<category><![CDATA[Personal Website Building (个人网站建设)]]></category>
		<category><![CDATA[Project (项目)]]></category>
		<category><![CDATA[Services (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Port Security (系统端口安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[Website Services (网站服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=19886</guid>

					<description><![CDATA[步骤目录： 步骤一：将要申请 Let&#8217;s Encrypt SSL 的域名解析到要进行操作的服务器 IP 地址上 步骤二：安装 certbot 步骤三：使用 certbot 生成 Let&#8217;s Encrypt SSL 证书 步骤四：查看已经生成的 Let&#8217;s Encrypt SSL 证书 步骤五：延期 Let&#8217;s Encrypt SSL 证书5.1 查看 Let&#8217;s Encrypt SSL 证书的延期策略5.2 手动延期 Let&#8217;s Encrypt SSL 证书5.3 自动延期 Let&#8217;s Encrypt SSL 证书 步骤六：Let’s Encrypt SSL 证书的生成限制 具体的操作步骤： 步骤一：将要申请 Let&#8217;s Encrypt SSL 的域名解析到要进行操作的服务器 IP 地址上 （步骤略） &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/ssl-lets-encrypt-certbot/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] Linux SSL 证书的生成 （Let&#8217;s Encrypt certbot 版）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h2>步骤目录：</h2>



<h4>步骤一：将要申请 Let&#8217;s Encrypt SSL 的域名解析到要进行操作的服务器 IP 地址上</h4>



<h4>步骤二：安装 certbot</h4>



<h4>步骤三：使用 certbot 生成 Let&#8217;s Encrypt SSL 证书</h4>



<h4>步骤四：查看已经生成的 Let&#8217;s Encrypt SSL 证书</h4>



<h4>步骤五：延期 Let&#8217;s Encrypt SSL 证书<br>5.1 查看 Let&#8217;s Encrypt SSL 证书的延期策略<br>5.2 手动延期 Let&#8217;s Encrypt SSL 证书<br>5.3 自动延期 Let&#8217;s Encrypt SSL 证书</h4>



<h4>步骤六：Let’s Encrypt SSL 证书的生成限制</h4>



<h2>具体的操作步骤：</h2>



<h4>步骤一：将要申请 Let&#8217;s Encrypt SSL 的域名解析到要进行操作的服务器 IP 地址上</h4>



<p>（步骤略）</p>



<h4>步骤二：安装 certbot</h4>



<pre class="wp-block-code"><code># yum -y install certbot</code></pre>



<p>（补充：这里以在 Fedora 35 上安装 certbot 为例）</p>



<h4>步骤三：使用 certbot 生成 Let&#8217;s Encrypt SSL 证书</h4>



<pre class="wp-block-code"><code># certbot certonly --email mingyu.zhu@eternalcenter.com -n --agree-tos --webroot -w /usr/share/nginx/html/ -d eternalcenter.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Requesting a certificate for eternalcenter.com
Performing the following challenges:
http-01 challenge for eternalcenter.com
Using the webroot path /usr/share/nginx/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/eternalcenter.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/eternalcenter.com/privkey.pem
   Your certificate will expire on 2022-03-20. To obtain a new or
   tweaked version of this certificate in the future, simply run
   certbot again. To non-interactively renew *all* of your
   certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le</code></pre>



<p>（<br>补充：这里以<br>1) 使用 mingyu.zhu@eternalcenter.com 邮箱<br>2) 以非交互式的方式<br>3) 通过给 /usr/share/nginx/html/ 网站目录里添加验证文件进行验证<br>4) 给 eternalcenter.com 域名<br>申请 Let&#8217;s Encrypt SSL 证书为例<br>）</p>



<h4>步骤四：查看已经生成的 Let&#8217;s Encrypt SSL 证书</h4>



<pre class="wp-block-code"><code># certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: eternalcenter.com
    Serial Number: 3e8cdb74a1abfbf3d535ec1c3f8cb3e4e4c
    Key Type: RSA
    Domains: eternalcenter.com
    Expiry Date: 2022-03-20 13:48:48+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/eternalcenter.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/eternalcenter.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
</code></pre>



<p>（<br>补充：<br>1) /etc/letsencrypt/live/eternalcenter.com/fullchain.pem 是公钥<br>2) /etc/letsencrypt/live/eternalcenter.com/privkey.pem 是私钥<br>）</p>



<h4>步骤五：延期 Let&#8217;s Encrypt SSL 证书<br>5.1 查看 Let&#8217;s Encrypt SSL 证书的延期策略</h4>



<pre class="wp-block-code"><code># cat /etc/letsencrypt/renewal/eternalcenter.com.conf 
# renew_before_expiry = 30 days
version = 1.20.0
archive_dir = /etc/letsencrypt/archive/eternalcenter.com
cert = /etc/letsencrypt/live/eternalcenter.com/cert.pem
privkey = /etc/letsencrypt/live/eternalcenter.com/privkey.pem
chain = /etc/letsencrypt/live/eternalcenter.com/chain.pem
fullchain = /etc/letsencrypt/live/eternalcenter.com/fullchain.pem</code></pre>



<p>（补充：可以看出 Let&#8217;s Encrypt SSL 证书是在过期前 30 天才能更新）</p>



<h4>5.2 手动延期 Let&#8217;s Encrypt SSL 证书</h4>



<pre class="wp-block-code"><code># /usr/bin/certbot renew</code></pre>



<p>（补充：这里以延期 Let&#8217;s Encrypt SSL 证书为例）</p>



<h4>5.3 自动延期 Let&#8217;s Encrypt SSL 证书</h4>



<pre class="wp-block-code"><code># crontab -e</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
0 0 */30 * * /usr/bin/certbot renew</code></pre>



<p>（补充：这里以每过 30 天的 0 时 0 分延期 Let&#8217;s Encrypt SSL 证书为例）</p>



<h4>步骤六：Let’s Encrypt SSL 证书的生成限制</h4>



<p>1) 一个域名申请次数不能超过 5 次/周<br>2) 允许申请失败次数不能超过 5 次/时<br>3) 属于同一个顶级域名的二级域名申请次数不能超过 20 次/周<br>4) 申请请求频率不能超过 20 次/秒<br>5) 一个 IP 地址创建用户个数不能超过 10 个/3 小时<br>6) 一个用户最多 pending 审核的数不能超过 300 个</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 curl （访问并测试网页速度）</title>
		<link>https://eternalcenter-2021-12.github.io/curl/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 08:00:30 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Django Service (服务)]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Nginx Monitor (监控)]]></category>
		<category><![CDATA[Services (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Website Services (网站服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=17159</guid>

					<description><![CDATA[案例一： （补充：这里以访问并测试 eternalcenter.com ，并显示测试过程为例） 案例二： （补充：这里以访问并测试 eternalcenter.com ，并不显示测试过程为例）]]></description>
										<content:encoded><![CDATA[
<h4>案例一：</h4>



<pre class="wp-block-code"><code># curl -o /dev/null -s -w %{http_code}:%{http_connect}:%{content_type}:%{time_namelookup}:%{time_redirect}:%{time_pretransfer}:%{time_connect}:%{time_starttransfer}:%{time_total}:%{speed_download} eternalcenter.com</code></pre>



<p>（补充：这里以访问并测试 eternalcenter.com ，并显示测试过程为例）</p>



<h4>案例二：</h4>



<pre class="wp-block-code"><code># curl -o /dev/null -w %{http_code}:%{http_connect}:%{content_type}:%{time_namelookup}:%{time_redirect}:%{time_pretransfer}:%{time_connect}:%{time_starttransfer}:%{time_total}:%{speed_download} https://api.weixin.qq.com/sns/user</code></pre>



<p> （补充：这里以访问并测试 eternalcenter.com ，并不显示测试过程为例） </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Django MVT 模式简介</title>
		<link>https://eternalcenter-2021-12.github.io/django-mvt/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 30 Apr 2021 08:06:19 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Django Foundation (基础)]]></category>
		<category><![CDATA[Django Model Layer (模型层)]]></category>
		<category><![CDATA[Django Service (服务)]]></category>
		<category><![CDATA[Django Template Layer (模版层)]]></category>
		<category><![CDATA[Django View Layer (视图层)]]></category>
		<category><![CDATA[Languages (语言)]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Website Services (网站服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=14196</guid>

					<description><![CDATA[内容一：Django MVT 模式的视图 内容二：Django MVT 模式简介2.1 访问页面 Browser &#8211;&#62; URL Dispatcher &#8211;&#62; Views Models &#8211;&#62; Database 2.2 应答页面 Database &#8211;&#62; Views Models &#8211;&#62; URL Dispatcher &#8211;&#62; Browser]]></description>
										<content:encoded><![CDATA[
<h4>内容一：Django MVT 模式的视图</h4>



<pre class="wp-block-code"><code>         URL Dispatcher

Browser                  Views Models database

         Cache Templates</code></pre>



<h4>内容二：Django MVT 模式简介<br>2.1 访问页面</h4>



<p>Browser &#8211;&gt; URL Dispatcher &#8211;&gt; Views Models &#8211;&gt; Database</p>



<h4>2.2 应答页面</h4>



<p>Database &#8211;&gt; Views Models &#8211;&gt; URL Dispatcher &#8211;&gt; Browser</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux SSL 证书的生成 （openssl 版）</title>
		<link>https://eternalcenter-2021-12.github.io/ssl-openssl/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 20 Apr 2021 07:50:42 +0000</pubDate>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Basic Guidelines for Website building (网站建设基础指南)]]></category>
		<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Django Service (服务)]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Nginx Security (安全)]]></category>
		<category><![CDATA[Personal Website Building (个人网站建设)]]></category>
		<category><![CDATA[Project (项目)]]></category>
		<category><![CDATA[Services (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Port Security (系统端口安全)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[Website Services (网站服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=14032</guid>

					<description><![CDATA[内容一：生成 SSL 证书1.1 交互式生成 SSL 证书 （补充：这里以同时生成长度 4096 位，加密格式为 512 的私钥 eternalcenter.com.key 和公钥 eternalcenter.com.csr 为例） 1.2 非交互式生成 SSL 证书 （补充：这里以同时生成1) 长度为 4096 位2) 加密格式为 5123) 国家为 CN4) 州或省为 Sichuan5) 城市为 Chengdu6) 组织为 Eternal Center7) 部门为 Mingyu Zhu8) 域名为 eternalcenter.com9) 邮箱地址为 contact@mingyuzhu.com的私钥 eternalcenter.com.key 和公钥 eternalcenter.com.csr 为例） 内容二：测试 SSL 证书]]></description>
										<content:encoded><![CDATA[
<h4>内容一：生成 SSL 证书<br>1.1 交互式生成 SSL 证书</h4>



<pre class="wp-block-code"><code># openssl req -nodes -newkey rsa:4096 -sha512 -keyout eternalcenter.com.key -out eternalcenter.com.csr</code></pre>



<p>（补充：这里以同时生成长度 4096 位，加密格式为 512 的私钥 eternalcenter.com.key 和公钥 eternalcenter.com.csr 为例）</p>



<h4>1.2 非交互式生成 SSL 证书</h4>



<pre class="wp-block-code"><code># openssl req -nodes -newkey rsa:4096 -sha512 -out eternalcenter.com.csr -keyout eternalcenter.com.key -subj "/C=CN/ST=Sichuan/L=Chengdu/O=Eternal Center/OU=Mingyu Zhu/CN=eternalcenter.com/emailAddress=contact@mingyuzhu.com"</code></pre>



<p>（<br>补充：这里以同时生成<br>1) 长度为 4096 位<br>2) 加密格式为 512<br>3) 国家为 CN<br>4) 州或省为 Sichuan<br>5) 城市为 Chengdu<br>6) 组织为 Eternal Center<br>7) 部门为 Mingyu Zhu<br>8) 域名为 eternalcenter.com<br>9) 邮箱地址为 contact@mingyuzhu.com<br>的私钥 eternalcenter.com.key 和公钥 eternalcenter.com.csr 为例<br>）</p>



<h4>内容二：测试 SSL 证书</h4>



<pre class="wp-block-code"><code># openssl req -in eternalcenter.com.csr -noout -text</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[实验] Django 服务的搭建</title>
		<link>https://eternalcenter-2021-12.github.io/django-build/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 26 Mar 2020 12:57:11 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Django Service (服务)]]></category>
		<category><![CDATA[Services (服务)]]></category>
		<category><![CDATA[Website Services (网站服务)]]></category>
		<category><![CDATA[纪念 Anniversary]]></category>
		<guid isPermaLink="false">https://eternalcenter-2021-12.github.io/?p=8676</guid>

					<description><![CDATA[纪念：站主于 2020 年 3 月完成了此开源实验，并将过程中的所有命令经过整理和注释以后，形成以下教程 注意： 文中的 python 系统名和 mysite 项目只是站主在本次操作中随意取的名称，读者可以根据自己的喜好换成任意别的名称 步骤目录： 步骤一：系统环境要求 步骤二：安装 Django2.1 安装 Python32.2 创建并进入 Django 项目的目录2.3 将 Django 项目的目录指定为 Django 环境2.4 进入 Django 环境2.5 检验 Django 环境是否成功 步骤三：创建 mysite 项目3.1 创建 mysite 项目3.2 mysite 项目的目录3.2.1 安装 tree 目录查看软件3.2.2 查看 mysite 项目的目录3.3 Django 项目目录介绍 步骤四：启动 Django 服务4.1 启动 Django 服务4.2 测试 Django &#8230; <p class="link-more"><a href="https://eternalcenter-2021-12.github.io/django-build/" class="more-link">Continue reading<span class="screen-reader-text"> "[实验] Django 服务的搭建"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<p class="has-vivid-red-color has-text-color has-medium-font-size"><strong><strong>纪念：站主于 2020 年 3 月完成了此开源实验，并将过程中的所有命令经过整理和注释以后，形成以下教程</strong></strong></p>



<h2>注意：</h2>



<p>文中的 python 系统名和 mysite 项目只是站主在本次操作中随意取的名称，读者可以根据自己的喜好换成任意别的名称</p>



<h2>步骤目录：</h2>



<h4>步骤一：系统环境要求</h4>



<h4>步骤二：安装 Django<br>2.1 安装 Python3<br>2.2 创建并进入 Django 项目的目录<br>2.3 将 Django 项目的目录指定为 Django 环境<br>2.4 进入 Django 环境<br>2.5 检验 Django 环境是否成功</h4>



<h4>步骤三：创建 mysite 项目<br>3.1 创建 mysite 项目<br>3.2 mysite 项目的目录<br>3.2.1 安装 tree 目录查看软件<br>3.2.2 查看 mysite 项目的目录<br>3.3 Django 项目目录介绍</h4>



<h4>步骤四：启动 Django 服务<br>4.1 启动 Django 服务<br>4.2 测试 Django 服务</h4>



<h4>具体的操作步骤：<br>步骤一：系统环境要求</h4>



<p>1) 服务器的系统需要是 CentOS 7 版本<br>2) 服务器要关闭防火墙<br>3) 服务器要关闭 SELinux<br>4) 服务器系统要配置好可用的软件源<br>5) 服务器要能够连接外网</p>



<h4>步骤二：安装 Django<br>2.1 安装 Python3</h4>



<pre class="wp-block-code"><code>&#91;root@python ~]# yum -y install python3</code></pre>



<h4>2.2 创建并进入 Django 项目的目录</h4>



<pre class="wp-block-code"><code>&#91;root@python ~]# mkdir project
&#91;root@python ~]# cd project</code></pre>



<h4>2.3 将 Django 项目的目录指定为 Django 环境</h4>



<pre class="wp-block-code"><code>&#91;root@python project]# python3 -m venv django_env</code></pre>



<h4>2.4 进入 Django 环境</h4>



<pre class="wp-block-code"><code>&#91;root@python project]# source django_env/bin/activate
(django_env) &#91;root@python project]# pip install django==1.11.6
Collecting django==1.11.6
  Downloading https://files.pythonhosted.org/packages/82/33/f9d2871f3aed5062661711bf91b3ebb03daa52cc0e1c37925f3e0c4508c5/Django-1.11.6-py2.py3-none-any.whl (6.9MB)
    100% |████████████████████████████████| 7.0MB 12kB/s 
Collecting pytz (from django==1.11.6)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)",)': /simple/pytz/
  Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
    100% |████████████████████████████████| 512kB 15kB/s 
Installing collected packages: pytz, django
Successfully installed django-1.11.6 pytz-2019.3
You are using pip version 9.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(django_env) &#91;root@python project]# </code></pre>



<p>（<br>补充：<br>1) 这里以安装 1.11.6 版本的 django 为例<br>2) 如果向直接安装最新版本的 django 可以使用 pip install django 命令<br>）</p>



<h4>2.5 检验 Django 环境是否成功</h4>



<pre class="wp-block-code"><code>(django_env) &#91;root@python project]# python
Python 3.6.8 (default, Aug  7 2019, 17:28:10) 
&#91;GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import django
&gt;&gt;&gt; django.__version__
'1.11.6'
&gt;&gt;&gt; exit()</code></pre>



<h4>步骤三：创建 mysite 项目<br>3.1 创建 mysite 项目</h4>



<pre class="wp-block-code"><code>(django_env) &#91;root@python project]# django-admin startproject mysite</code></pre>



<h4>3.2 mysite 项目的目录<br>3.2.1 安装 tree 目录查看软件</h4>



<pre class="wp-block-code"><code># yum -y install tree</code></pre>



<h4>3.2.2 查看 mysite 项目的目录</h4>



<pre class="wp-block-code"><code>(django_env) &#91;root@python project]# cd mysite
(django_env) &#91;root@python mysite]# tree
.
├── manage.py
└── mysite
    ├── __init__.py
    ├── settings.py
    ├── urls.py
    └── wsgi.py

1 directory, 5 files</code></pre>



<h4>3.3 Django 项目目录介绍</h4>



<p>1) mysite 此 Django 项目的容器<br>2) manage.py 命令行工具，与 Django 项目进行交互<br>3) mysite/<strong>init</strong>.py 空文件，通知 Python 此项目是一个 Python 包<br>4) mysite/settings.py 此 Django 项目的配置文件<br>5) mysite/urls.py 此 Django 项目的 URL 声明和 Django 的网站“目录”<br>6) mysite/wsgi.py WSGI 兼容 Web 服务器的入口</p>



<h4>步骤四：启动 Django 服务<br>4.1 启动 Django 服务</h4>



<pre class="wp-block-code"><code>(django_env) &#91;root@python mysite]# python manage.py runserver 0.0.0.0:8000
Performing system checks...

System check identified no issues (0 silenced).
February 27, 2020 - 05:35:30
Django version 1.11.6, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.</code></pre>



<p>（补充：这里以使用 8000 端口开启网站服务为例）</p>



<h4>4.2 测试 Django 服务</h4>



<p>通过浏览器访问以下网址：</p>



<pre class="wp-block-code"><code>http:&#47;&#47;127.0.0.1:8000/admin</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
