• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

“MadAuth”的版本间的差异

来自Minecraft插件百科
跳转至: 导航搜索
第38行: 第38行:
 
         </div>
 
         </div>
 
     </div>
 
     </div>
== 环境 ==
+
<div style="float:none;-webkit-border-image: none;color: #333;height: auto;line-height: 20px;margin: 35px 0 0 0;min-height: 20px;background-color: #f8f8f8;box-shadow:0 0 10px rgba(193, 193, 193, 0.5);-webkit-box-shadow:0 0 10px rgba(193, 193, 193, 0.5);-moz-box-shadow:0 0 10px rgba(193, 193, 193, 0.5);width:100%;">
=== Python ===
+
        <!--标题-->
 
+
        <p style="color:#ffffff;font-size: 22px;text-align: center;margin:0; padding:16px;background-color: #3385ff;">环境 · Requirment</p>
 +
    </div>
 +
<!--大板块,一分为二(热门条目,最新条目)-->
 +
    <!--<div id="container_1" style="display: table; margin: 0 auto; padding:0;">
 +
        <div id="mf-documentation" style="display: table-cell; -webkit-border-image: none;-webkit-box-shadow: rgba(0, 0, 0, 0.046875) 0px 1px 1px 0px inset;background-color: whiteSmoke;border-bottom-color: #E3E3E3;border-bottom-left-radius: 3px;border-bottom-right-radius: 3px;border-bottom-style: solid;border-bottom-width: 1px;border-left-color: #E3E3E3;border-left-style: solid;border-left-width: 1px;border-right-color: #E3E3E3;border-right-style: solid;border-right-width: 1px;border-top-color: #E3E3E3;border-top-left-radius: 3px;border-top-right-radius: 3px;border-top-style: solid;border-top-width: 1px;box-shadow: rgba(0, 0, 0, 0.046875) 0px 1px 1px 0px inset;color: #333;font-size: 14px;height: auto;line-height: 20px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;min-height: 20px;padding-bottom: 0px;padding-left: 9px;padding-right: 9px;padding-top: 9px;width: 50%;">
 +
            <p style="display:block; text-align:center; color: #444; font-size: 12pt;">
 +
                Python & Django
 
'''Python'''目前来说的话,还是一个挺不错的语言。
 
'''Python'''目前来说的话,还是一个挺不错的语言。
  
第48行: 第54行:
  
 
安装时切记要安装'''pip''',否则后面将会很麻烦。
 
安装时切记要安装'''pip''',否则后面将会很麻烦。
=== Django ===
 
  
 
'''Django'''是一个非常好的'''PyThon'''下的网页框架。
 
'''Django'''是一个非常好的'''PyThon'''下的网页框架。
第55行: 第60行:
  
 
使用<code>pip install django</code>Django一般都是向下兼容。
 
使用<code>pip install django</code>Django一般都是向下兼容。
 
+
            </p>
=== MySQLdb(可选) ===
+
        </div>
 
+
<div style="padding: 3.5px; display: table-cell;"></div>
 +
        <div id="mf-join" style="display: table-cell;-webkit-border-image: none;-webkit-box-shadow: rgba(0, 0, 0, 0.046875) 0px 1px 1px 0px inset;background-color: whiteSmoke;border-bottom-color: #E3E3E3;border-bottom-left-radius: 3px;border-bottom-right-radius: 3px;border-bottom-style: solid;border-bottom-width: 1px;border-left-color: #E3E3E3;border-left-style: solid;border-left-width: 1px;border-right-color: #E3E3E3;border-right-style: solid;border-right-width: 1px;border-top-color: #E3E3E3;border-top-left-radius: 3px;border-top-right-radius: 3px;border-top-style: solid;border-top-width: 1px;box-shadow: rgba(0, 0, 0, 0.046875) 0px 1px 1px 0px inset;color: #333;font-size: 14px;height: auto;line-height: 20px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;min-height: 20px;padding-bottom: 9px;padding-left: 9px;padding-right: 9px;padding-top: 9px;width: 50%;">
 +
            <p style="display:block; text-align:center; color: #444; font-size: 12pt;">
 +
                MySQLdb(可选)
 
'''MySQLdb'''是一个'''Python'''下的'''''MySQL'''''操作模块。
 
'''MySQLdb'''是一个'''Python'''下的'''''MySQL'''''操作模块。
  
第65行: 第73行:
  
 
同样的,安装这个也只需要输入
 
同样的,安装这个也只需要输入
 +
 
<code>pip install mysqldb</code>
 
<code>pip install mysqldb</code>
 +
            </p>
 +
        </div>
 +
    </div>-->
 
== 部署 ==
 
== 部署 ==
 
=== 使用开发服务器 ===
 
=== 使用开发服务器 ===

2016年3月12日 (六) 23:01的版本

欢迎来到MadAuth词条

插件名
MadAuth

作者
Mcdarc

版本
v3.1

兼容版本
1.5.1-1.9

介绍 · Introduction

这是一个逗逼的外置登录

这个网页验证使用SQLite + Python + Django环境,无需搭建MySQL环境!

MySQL的设置教程请看下文

并且如果合理部署的话,可以说是几乎不占用性能的!

环境 · Requirment

部署

使用开发服务器

我相信这里有很多懒癌晚期的患者=A=。

但是值得庆幸的是,Django为我们提供了开发服务器

我们可以直接使用开发服务器部署。

这是最为简单的部署方法!

  1. 你先要设置setting.py中的ALLOWED_HOSTS = [你的域名]
    1. []不可去掉,并设置setting.py中的Debug = False
    2. Python区分大小写!
  2. 进入根目录,打开命令行(或者ssh使用cd进入根目录)。
  3. 使用python manage.py runserver <你需要的端口>
    1. 端口那里选填。若不填默认8000。
    2. 不要修改manage.py!
    3. 若出现python未找到请重新安装。
    4. 若出现语法错误请确认python版本为2.7.10

使用screen

由于Linux服务器版本一般没有桌面环境。

但是一退出远程连接又会kill掉进程。

所以我们要使用screen来''保护''我们可怜的进程=A=

  1. 使用apt-get install screenyum install screen即可安装
  2. 然后使用screen -S <选填参数:你的自定义作业名> ./start.sh即可