简单的基于git的wiki
realms-wiki的Python项目详细描述
#realms wiki beta版
基于git的wiki是用python编写的
灵感来自[gollum][gollum]、[ghost][ghost]和[dillinger][dillinger]。
包括基本的身份验证和注册。
演示:http://realms.io
此域暂时用作演示,因此希望它有所更改。
来源:https://github.com/scragg0x/realms wiki
\模板和逻辑是模板和逻辑的基础。
(https://db.tt/qqxhgrnt"width=340/>;](https://db.tt/qqxhgrnt)和(https://db.tt/qqqxhgrnt)以及(https://db.tt/qqqqxhgrnt)和(http://db.tt/qqqxhgrnt)和(lt;img width=340 src="https://db.tt/qqqqqxhgrnt"width=340 src="https://db.tt/piz4w2on//;gt;](https://db.tt/piz4w2on/piz4w2on"/>;](高(https://db.tt/ermdmdhrk)和(https://db.tt/ls08oclh/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/7qvfffffq4/gt;)(https://db.tt/7qvffffq4)和(https://db.tt/7qvffffffq4)和(https://db.tt/7qvffffffffq4)和(http://db.tt/7qvfffffffffffffqq4)和(http/>
r要求
-python 2.7
r不需要数据库。
ssl-dev-libsasl2-dev-libldap2-dev-libsasll-libsasl2-dev-libldap2-dev-libldap2-dev
<<<<<<<<<<<<<<
y-y-y-python-python-pip python-devel.x86_64 libxslt-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 libyaml-devel-devel.x86_64 libxslt-devlt-devel.x86
osx/windows
此应用程序是为linux设计的,我建议使用vagrant在osx或windows上安装。
realms wiki安装通过pypi
使用python包索引安装它:
-软件属性
sudo add apt repository-y ppa:chris lea/node.js
sudo apt get update
sudo apt get install-y nodejs python pip python dev libxml2 dev libxslt1 dev zlib1g dev libffi dev libyaml dev libssl dev libsasl2 dev libldap2 dev
sudo npm install-g bower
bower install
virtualenv.venv
source.venv/bin/activate
realms wiki start
ki via vagrant
vagrant文件包含在开发或本地运行中。
要开始使用vagrant,请下载并安装平台的vagrant和virtualbox,并提供以下链接:
-https://www.vagrantup.com/downloads.html
-https://www.virtualbox.org/wiki/downl加载
然后在终端中执行以下操作:
cd realms wiki
vagrant up
check[http://127.0.0.1:5000/](http://127.0.0.1:5000/)以确保它正在运行。
确保安装了Docker。http://docs.docker.com/installation/
下面是一个运行命令的示例,它最初会从Docker Hub中提取图像。
Dockerun--name realms wiki-p 5000:5000-d realms/realms wiki
mine基于https://github.com/phusion/baseimage docker
dockerfile位于[docker/dockerfile](docker/dockerfile)`realms/base`中,只是创建部署用户。
值。
您可能需要自定义应用程序,最简单的方法是setup命令:
realms wiki setup
这将询问您问题并创建一个"realms wiki.json"文件。
您也可以手动编辑此文件。
在"realms wiki.json"中设置的任何配置值都将结束在"realms/config/u init_u2;u2;py"中设置的骑乘值。
\nginx setup
sudo apt get install-y nginx
在`/etc/nginx/conf.d`
sudo nano/etc/nginx/conf.d/realms.conf
r/>
服务器{
侦听80;
位置/{
proxy_set_header x-real-ip$remote_addr;
proxy_set_header x-forwarded-for$proxy_add_x-forwarded_for;
proxy_set_header host$http_host;
proxy_pass http://127.0.0.1:5000/;
proxy_redirect off;
}
}
测试nginx配置:
reload nginx:
sudo service nginx reload
\apache+mod wsgi setup
sudo apt get install-y apache2 libapache2 mod wsgi
在`/etc/apa中创建虚拟主机配置che2/sites available/realms\u vhost`
<;virtualhost*:80>;
servername wiki.example.org
wsgiprocessgroup realms\u wsgi
wsgiscriptalias//var/www/my realms dir/wsgi.py
别名/static/full/path/to/realms/static
<;/virtualhost>;
create`/var/www/my realms dir/wsgi.py`
import os
import site
-----------------
from realms import create_app
application=create_app()
启用虚拟主机:
sudo a2ensite realms_vhost
测试配置:
reload apache:
sudo serviceApache2重新加载MySQL安装程序r/>realms wiki pip安装mysql python
具有基本搜索功能的mes,但对于大型wiki或需要更高级搜索功能的mes,不建议这样做。
我们目前支持elasticsearch和whoosh作为备用后端。
elasticsearch安装程序有多种安装/运行elas的方法检索。一个简单的方法是使用他们的
存储库。
**apt**
wget-qo-http://packages.elasticsearch.org/gpg-key-elasticsearch sudo apt key add-
echo"deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main"sudo tee/etc/apt/sources.list.d/elasticsearch.list
apt get update&;apt-get install elasticsearch
有关"Yum"的说明或更多详细信息,请访问以下链接:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup repositories.html
**配置elasticsearch**
选项集:
"search-type":"elasticsearch"
"elasticsearch-url":"http://127.0.0.1:9200"
`"用户名"`,"消息"`。默认值是`["name"]`.
_index":"/path/to/your/whoosh/index"
"whoosh\u language":"en"
whoosh\u index必须是一个可由领域用户读取和写入的路径。如果它不存在,它将自动创建。
whoosh设置为使用语言优化,因此将whoosh_语言设置为wiki中使用的语言。对于可用的语言,请选中"whoosh.lang.languages"。
如果不支持您的语言,realms将返回到一个简单的文本分析器。
验证,放置以下配置。
"Auth_Local_enable":false
\ldap(beta)
realms使用以下库使用ldap进行验证。https://github.com/continumio/flask ldap login
支持直接绑定和按搜索绑定。
使用这些示例作为指南,并将其放置在realms-wiki.json配置中。
\将它们留空意味着匿名身份验证。
"ldap":{
"uri":"ldap://localhost:8389",
"bind-dn":",
"bind-auth":",
"user-search":{"base":"dc=realms,dc=io","filter":"uid=%(用户名)s"},
"key-map":{
"username":"cn",
"email":"mail"
}
}
{{直接绑定示例
"ldap":{
"uri":"ldap://localhost:8389",
"bind懔dn":"uid=%(username)s,ou=people,dc=realms,dc=io",
"key懔map":{
"username":"cn"、
"email":"mail"、
}、
"options":{
"opt_protocol_version":3、
}
}
oauth(beta版)
realms目前支持github、twitter、facebook和google。每个提供者都需要一个密钥和机密。
将它们放入"realms wiki.json"配置文件中。使用以下示例。
"oauth":{
"twitter":{
"key":",
"secret":"
},
"github":{
"key":",
"secret":"
}
}
/>如果您在反向代理或单点登录后配置了域,则可以将身份验证委托给代理。
"auth\u proxy":true
注意:当然,在该设置中,必须确保**域只能通过代理访问**。
x配置:
location/{
auth_基本"受限";
验证基本用户文件/etc/nginx/.htpasswd;
er$remote_user;
proxy_pass http://127.0.0.1:5000/;
proxy_redirect off;
}
默认情况下,realms将在"remote_user"http头中查找用户id。您可以使用以下命令指定另一个标题名:
"auth_proxy_header_name":"logged_in_user"
需要根特权,因为它会创建一个新启动脚本。
还请注意,"1024"以下的端口需要用户根。
配置到位后,请使用以下命令:
sudo start realms wiki
sudo stop realms wiki
sudo restart realms wiki
###开发模式
这将在启用自动重新加载的情况下在前台启动服务器:
realms wiki dev
命令:
auth
configure set config.json,需要json编码的字符串
create懔db creates db tables
dev run development server
drop懔db drops db tables
pip execute pip命令,对vir很有用tualenvs
重新启动重新启动服务器
运行运行生产服务器(别名用于启动)
安装程序启动安装向导
安装程序upstart start upstart conf创建向导
启动运行服务器后台程序
状态获取服务器status
停止停止服务器
测试运行测试
版本输出版本
将作为部分导入。
此页导入并使用部分:
http://realms.io/_edit/hbs
此页包含部分的内容:
http://realms.io/_edit/example tmpl
我锁定这些页以保留它们。
您可以复制并粘贴到新页面中进行测试。
cragg@gmail.com>;
[gollum]:https://github.com/gollum/gollum
[ghost]:https://github.com/tryghost/ghost
[dillinger]:https://github.com/joemccann/dillinger/
基于git的wiki是用python编写的
灵感来自[gollum][gollum]、[ghost][ghost]和[dillinger][dillinger]。
包括基本的身份验证和注册。
演示:http://realms.io
此域暂时用作演示,因此希望它有所更改。
来源:https://github.com/scragg0x/realms wiki
\模板和逻辑是模板和逻辑的基础。
(https://db.tt/qqxhgrnt"width=340/>;](https://db.tt/qqxhgrnt)和(https://db.tt/qqqxhgrnt)以及(https://db.tt/qqqqxhgrnt)和(http://db.tt/qqqxhgrnt)和(lt;img width=340 src="https://db.tt/qqqqqxhgrnt"width=340 src="https://db.tt/piz4w2on//;gt;](https://db.tt/piz4w2on/piz4w2on"/>;](高(https://db.tt/ermdmdhrk)和(https://db.tt/ls08oclh/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/ls08oclh)和(https://db.tt/7qvfffffq4/gt;)(https://db.tt/7qvffffq4)和(https://db.tt/7qvffffffq4)和(https://db.tt/7qvffffffffq4)和(http://db.tt/7qvfffffffffffffqq4)和(http/>
r要求
-python 2.7
r不需要数据库。
ssl-dev-libsasl2-dev-libldap2-dev-libsasll-libsasl2-dev-libldap2-dev-libldap2-dev
<<<<<<<<<<<<<<
y-y-y-python-python-pip python-devel.x86_64 libxslt-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 libyaml-devel-devel.x86_64 libxslt-devlt-devel.x86
osx/windows
此应用程序是为linux设计的,我建议使用vagrant在osx或windows上安装。
realms wiki安装通过pypi
使用python包索引安装它:
-软件属性
sudo add apt repository-y ppa:chris lea/node.js
sudo apt get update
sudo apt get install-y nodejs python pip python dev libxml2 dev libxslt1 dev zlib1g dev libffi dev libyaml dev libssl dev libsasl2 dev libldap2 dev
sudo npm install-g bower
bower install
virtualenv.venv
source.venv/bin/activate
ki via vagrant
vagrant文件包含在开发或本地运行中。
要开始使用vagrant,请下载并安装平台的vagrant和virtualbox,并提供以下链接:
-https://www.vagrantup.com/downloads.html
-https://www.virtualbox.org/wiki/downl加载
然后在终端中执行以下操作:
vagrant up
check[http://127.0.0.1:5000/](http://127.0.0.1:5000/)以确保它正在运行。
确保安装了Docker。http://docs.docker.com/installation/
下面是一个运行命令的示例,它最初会从Docker Hub中提取图像。
Dockerun--name realms wiki-p 5000:5000-d realms/realms wiki
mine基于https://github.com/phusion/baseimage docker
dockerfile位于[docker/dockerfile](docker/dockerfile)`realms/base`中,只是创建部署用户。
值。
您可能需要自定义应用程序,最简单的方法是setup命令:
realms wiki setup
这将询问您问题并创建一个"realms wiki.json"文件。
您也可以手动编辑此文件。
在"realms wiki.json"中设置的任何配置值都将结束在"realms/config/u init_u2;u2;py"中设置的骑乘值。
\nginx setup
sudo apt get install-y nginx
在`/etc/nginx/conf.d`
sudo nano/etc/nginx/conf.d/realms.conf
r/>
服务器{
侦听80;
位置/{
proxy_set_header x-real-ip$remote_addr;
proxy_set_header x-forwarded-for$proxy_add_x-forwarded_for;
proxy_set_header host$http_host;
proxy_pass http://127.0.0.1:5000/;
proxy_redirect off;
}
}
测试nginx配置:
reload nginx:
sudo service nginx reload
\apache+mod wsgi setup
sudo apt get install-y apache2 libapache2 mod wsgi
在`/etc/apa中创建虚拟主机配置che2/sites available/realms\u vhost`
<;virtualhost*:80>;
servername wiki.example.org
wsgiscriptalias//var/www/my realms dir/wsgi.py
别名/static/full/path/to/realms/static
<;/virtualhost>;
create`/var/www/my realms dir/wsgi.py`
import os
import site
-----------------
from realms import create_app
application=create_app()
启用虚拟主机:
sudo a2ensite realms_vhost
测试配置:
reload apache:
sudo serviceApache2重新加载MySQL安装程序r/>realms wiki pip安装mysql python
具有基本搜索功能的mes,但对于大型wiki或需要更高级搜索功能的mes,不建议这样做。
我们目前支持elasticsearch和whoosh作为备用后端。
elasticsearch安装程序有多种安装/运行elas的方法检索。一个简单的方法是使用他们的
存储库。
**apt**
wget-qo-http://packages.elasticsearch.org/gpg-key-elasticsearch sudo apt key add-
echo"deb http://packages.elasticsearch.org/elasticsearch/1.4/debian stable main"sudo tee/etc/apt/sources.list.d/elasticsearch.list
apt get update&;apt-get install elasticsearch
有关"Yum"的说明或更多详细信息,请访问以下链接:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup repositories.html
**配置elasticsearch**
选项集:
"search-type":"elasticsearch"
"elasticsearch-url":"http://127.0.0.1:9200"
`"用户名"`,"消息"`。默认值是`["name"]`.
_index":"/path/to/your/whoosh/index"
"whoosh\u language":"en"
whoosh\u index必须是一个可由领域用户读取和写入的路径。如果它不存在,它将自动创建。
whoosh设置为使用语言优化,因此将whoosh_语言设置为wiki中使用的语言。对于可用的语言,请选中"whoosh.lang.languages"。
如果不支持您的语言,realms将返回到一个简单的文本分析器。
验证,放置以下配置。
"Auth_Local_enable":false
\ldap(beta)
realms使用以下库使用ldap进行验证。https://github.com/continumio/flask ldap login
支持直接绑定和按搜索绑定。
使用这些示例作为指南,并将其放置在realms-wiki.json配置中。
\将它们留空意味着匿名身份验证。
"ldap":{
"uri":"ldap://localhost:8389",
"bind-dn":",
"bind-auth":",
"user-search":{"base":"dc=realms,dc=io","filter":"uid=%(用户名)s"},
"key-map":{
"username":"cn",
"email":"mail"
}
}
{{直接绑定示例
"ldap":{
"uri":"ldap://localhost:8389",
"bind懔dn":"uid=%(username)s,ou=people,dc=realms,dc=io",
"key懔map":{
"username":"cn"、
"email":"mail"、
}、
"options":{
"opt_protocol_version":3、
}
}
oauth(beta版)
realms目前支持github、twitter、facebook和google。每个提供者都需要一个密钥和机密。
将它们放入"realms wiki.json"配置文件中。使用以下示例。
"oauth":{
"twitter":{
"key":",
"secret":"
},
"github":{
"key":",
"secret":"
}
}
/>如果您在反向代理或单点登录后配置了域,则可以将身份验证委托给代理。
"auth\u proxy":true
注意:当然,在该设置中,必须确保**域只能通过代理访问**。
x配置:
location/{
auth_基本"受限";
验证基本用户文件/etc/nginx/.htpasswd;
er$remote_user;
proxy_pass http://127.0.0.1:5000/;
proxy_redirect off;
}
默认情况下,realms将在"remote_user"http头中查找用户id。您可以使用以下命令指定另一个标题名:
"auth_proxy_header_name":"logged_in_user"
需要根特权,因为它会创建一个新启动脚本。
还请注意,"1024"以下的端口需要用户根。
配置到位后,请使用以下命令:
sudo start realms wiki
sudo stop realms wiki
sudo restart realms wiki
###开发模式
这将在启用自动重新加载的情况下在前台启动服务器:
realms wiki dev
命令:
auth
configure set config.json,需要json编码的字符串
create懔db creates db tables
dev run development server
drop懔db drops db tables
pip execute pip命令,对vir很有用tualenvs
重新启动重新启动服务器
运行运行生产服务器(别名用于启动)
安装程序启动安装向导
安装程序upstart start upstart conf创建向导
启动运行服务器后台程序
状态获取服务器status
停止停止服务器
测试运行测试
版本输出版本
将作为部分导入。
此页导入并使用部分:
http://realms.io/_edit/hbs
此页包含部分的内容:
http://realms.io/_edit/example tmpl
我锁定这些页以保留它们。
您可以复制并粘贴到新页面中进行测试。
cragg@gmail.com>;
[gollum]:https://github.com/gollum/gollum
[ghost]:https://github.com/tryghost/ghost
[dillinger]:https://github.com/joemccann/dillinger/