Warning: Not for the faint of heart! This process will be streamlined over time. The eventual goal is to have native GUI apps and one-click web hosting. For now, it will take some elbow grease.
Most of the dependencies are included. You might need to install Git to clone the repository, or you can use GitHub's ZIP download.
Additional dependencies:
Ubuntu / Debian / Linux Mint: sudo apt-get install gcc g++ gobjc cmake automake autoconf libtool pkg-config
Fedora / RedHat: sudo yum install gcc gcc-c++ gcc-objc cmake automake autoconf libtool
OS X: Install the developer tools from the App Store and cmake from Homebrew. [TODO]
Windows: untested, probably needs work
You can substitute Clang for GCC if you prefer.
A semi-recent version of Node.js or io.js is required for the Node example scripts including sln-pipe.
./configure && makesudo make installstronglink /repo-dir
Right now there is no configuration interface whatsoever (not even a config file). That means you need to edit the code and recompile to change any settings.
- Port number: set
SERVER_PORTinsrc/blog/main.c - Server access: set
SERVER_ADDRESSinsrc/blog/main.c - Database backend: use
DB=xx makewherexxis empty (for MDB),leveldb,rocksdb, orhyper - Guest access: set
repo->pub_modefrom0toSLN_RDONLYorSLN_RDWR - Number of results per page:
RESULTS_MAXinsrc/blog/Blog.c - Repo name: by default the name of the directory, but override
reponameinsrc/blog/main.c - Internal algorithm:
SLN_INTERNAL_ALGOinsrc/StrongLink.h(only change for new repos!) - Number of bcrypt rounds:
BCRYPT_ROUNDSinsrc/util/pass.c(default 13)
StrongLink supports several database backends including MDB (the default), LevelDB, RocksDB, and HyperLevelDB. MDB is the smallest and most stable, and it has the best read performance (making it good for public-facing sites). LevelDB has better write performance and compression (so the database storage can take 1/5th the space).
RocksDB is not recommended but might be useful for specialized applications since it has a lot of tuning options. HyperLevelDB is not recommended since it's generally worse than LevelDB.
The backend can be chosen at build time by setting the DB environment variable (see above). This might become a runtime option in the future.
It's not too difficult to add support for any transactional (ACID) key-value store. Embedded, write-optimized stores and distributed stores are the most interesting.
Clients (for example the Node example scripts) are configured through a JSON file located at ~/.config/stronglink/client.json. That config file looks something like this:
{
"repos": {
"main": {
"url": "http://localhost:8000/",
"session": "[...]"
}
}
}Currently there is no interface for managing session keys. The only way to get one is by logging into the blog interface using a web browser or a tool like cURL and checking the cookie that is sent back.
You can set up any number of repositories and the names (like "main" above) are up to you.
If you need any help installing, configuring or using StrongLink, feel free to open a GitHub issue, even if it's not a "bug" per se. Updates or corrections on the documentation are also welcome.