" getnote.cf " 轻量的云笔记本 - 类notepad.cc网站的搭建
"getnote.cf" 轻量的云笔记本 - 类 notepad.cc 网站的搭建
notepad.cc 是一个简洁好用的文本分享网站,特别适用于跨设备快速传输一些文本内容。但 notepad.cc 早已关闭,而且与之相似的 notepad.live 近期似乎也无法访问了。于是我在 GitHub 上找到的 类似的开源项目 ,部署到了服务器上并绑定了域名 getnote.cf 。
如果你想使用 getnote.cf ,请先查看 说明
一、安装步骤
安装步骤其实相当简单,只要服务器已经搭建了 PHP 运行环境即可(此项目无需数据库)。
- 将源码解压至网站根目录
- 修改
index.php
文件里的$base_url
,确保_tmp
文件夹的写入权限
如何修改写入权限:使用chown
命令修改文件夹权限;或直接将_tmp
文件夹改为 "777" 权限。 - 配置好 Apache 或 Nginx 的 url rewrite
官方说明文档 中的安装步骤如下:
Installation
At the top of index.php
file, change $base_url
variable to point to your
site.
Make sure the web server is allowed to write to the _tmp
directory.
On Apache
You may need to enable mod_rewrite and set up .htaccess
files in your site configuration.
See How To Set Up mod_rewrite for Apache.
On Nginx
To enable URL rewriting, put something like this in your configuration file:
If notepad is in the root directory:
location / {
rewrite ^/([a-zA-Z0-9]+)$ /index.php?f=$1;
}
If notepad is in a subdirectory:
location ~* ^/notes/(\w+)$ {
try_files $uri /notes/index.php?f=$1;
}
二、更多事项
- 目前此项目的功能相当简单,未来我可能会作更多改进或增加不同功能
- getnote.cf 属于 .cf 免费域名,暂不保证此域名能够长久使用,本文只是分享该网站的搭建过程
- 若此域名过期,我将更新本文并在文中告知
三、参考资料
- notepad.cc 要关闭了, 有什么替代吗? - 知乎
https://www.zhihu.com/question/38519968 - 有没有类似 notepad.cc 一类的文本分享网站? - V2EX
https://www.v2ex.com/t/120675 - NotePad_Live - GitHub
https://github.com/JiaFeiX/NotePad_Live - 如何更改 linux 文件的拥有者及用户组
http://www.360doc.com/content/16/0128/08/10915971_531159754.shtml
http://blog.csdn.net/fjnjxr/article/details/52767920
https://zhidao.baidu.com/question/2074184631212597028.html