同步操作将从 mirrors_leafo/lapis-chan 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Lapis-chan is an text/image board written in Lua using the Lapis web framework.
To view a complete list of features, check out the Feature Set spreadsheet.
Lapis-chan specifically requires v5.1.1.
$ wget http://downloads.sourceforge.net/project/giflib/giflib-5.1.1.tar.bz2
$ tar jxf giflib-5.1.1.tar.bz2
$ cd giflib-5.1.1
$ ./configure
$ make
$ sudo make install
$ tar xvf ngx_openresty-VERSION.tar.gz
$ cd ngx_openresty-VERSION/
$ ./configure
$ make
$ sudo make install
$ sudo apt-get install libmagickwand-dev
$ sudo apt-get install luajit
$ sudo apt-get install luarocks
$ sudo apt-get install postgresql
$ sudo apt-get install mysql-server
$ luarocks install bcrypt
$ luarocks install lapis
$ luarocks install luafilesystem
$ luarocks install luaposix
$ luarocks install magick
$ luarocks install md5
$ luarocks install --server=http://luarocks.org/dev giflib
Installing Lapis-chan is a multi-step process. Before you can run the installation script, you must first configure your server. Below are the prerequisite steps:
Lapis-chan prefers to live inside its own database, so it is highly recommended to create an empty database for Lapis-chan to install to. Lapis-chan has been tested on PostgreSQL but Lapis Models should also be compatible with MySQL.
$ psql
> CREATE DATABASE 'lapischan';
Make sure the following options within the config file are set correctly:
80
unless you are hosting multiple websites on the same serverpostgres
or mysql
localhost
or 127.0.0.1
In this file, you need to set the lua_package_path
and lua_package_cpath
to find both LuaRocks and OpenResty. LuaRocks has a simple command, OpenResty does not so you need to know where you installed it to.
$ luarocks path
Now that we have Lapis configured, you must execute the migration to fill the database with empty tables. It is recommended to perform this step every time you upgrade Lapis-chan as it will automagically update your database without damaging any data.
$ lapis migrate
In the secrets
directory, open up both the token.lua
and salt.lua
files.
The secret token should be a random string of characters between 40 and 60 characters in length. Change CHANGE_ME
to your secret token. Keep this token extremely safe, it is the backbone of security on Lapis-chan! Don't lose it, either!
The secret salt should be a random string of characters exactly two characters in length. The salt can be comprised of letters, numbers, a period (".") or a slash ("\"). Change CHANGE_ME
to your secret salt. This salt is not necessarily meant to be secure, but don't hand it out willy-nilly either. This is only used for generating insecure tripcodes.
Now we're ready to finish the installation!
$ lapis server production
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。