satellite
介绍
satellite is a self-syncing distributed wiki with file uploads and all sorts of other useful features like offline editing.
主要的特性有:
- textile的wiki语法
- 支持文件上传
- 所有文档基于git存储与管理
- 离线编辑,并可自动同步到服务器
- 支持代码高亮
- 全面快捷键支持
经我们测试,用于个人知识管理,非常棒。
安装
- 安装 Git! (and Ruby)
- 获取代码,原始代码在"这里":http://github.com/kenpratt/satellite/tree/master ,我们fork出了一个版本(http://github.com/holin/satellite/tree/master),根据中文环境和自己的实际需求增加了一些功能,具体看 satellit扩展功能。
$ git clone git://github.com/holin/satellite.git satellite |
- 安装gems, {color:red}注意 ,rack要求使用0.4版本(其它版本未完整测试,最新的0.9rack不能用)
1 2 3 4 |
$ sudo gem install rack mongrel metaid erubis RedCloth coderay $ cd path/to/satellite $ git submodule init $ git submodule update |
- 配置应用,下方其他中有公开git repository申请说明
cd path/to/satellite |
- edit conf/production.rb
- production.rb example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# production configuration # URI of master git repository for wiki content config.master_repository_uri = 'git+ssh://repo.or.cz/srv/git/pkmh.git' # user information to use for git content submissions config.user_name = 'holin' config.user_email = 'holin@example.com' # logging level (:error, :warn, :info, :debug) config.log_level = :warn # automatically reload app when app files change? (for development) config.auto_reload = true |
- 启动server
1 2 3 |
$ bin/start_satellite ** Starting Satellite_2 ** Satellite_2 is now running at http://0.0.0.0:4000/ |
- 访问http://localhost:4000/
配置文件,initialize中的配置都可以在production.rb里面通过config.xxx = ??? 来配置
- lib/configration.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
def initialize # defaults values self.app_name = 'Satellite' self.server_ip = '0.0.0.0' self.server_port = 7000 self.master_repository_uri = '' self.user_name = '' self.user_email = '' self.sync_frequency = 60 self.app_dir = File.join(File.dirname(File.expand_path(__FILE__)), '../') self.conf_dir = File.join(app_dir, 'conf') self.template_dir = File.join(app_dir, 'templates') self.static_dir = File.join(app_dir, 'static') self.log_dir = File.join(app_dir, 'log') self.data_dir = File.join(app_dir, 'data') self.log_level = :info self.log_file_name = 'app.log' self.auto_reload = false self.prettify_exceptions = true self.max_upload_filesize = 200 self.authentication = false self.authenticator = nil end |
Mac下配置开机启动
- 下载 Lingon
- 写启动server脚本satellite.sh
1 2 3 4 5 |
#!/bin/sh export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Applications/:$PATH cd /Users/devon/wiki && bin/start_satellite |
- 运行Lingon,配置User Deamon
- 注销,并重新登录。测试是否正确配置
其他
- 申请 repo.or.cz 的git服务
- GitHosting
Wiki首页 | 查看所有 | 编辑 | 输出到博客 | 历史版本