Total Pageviews

Saturday 31 August 2024

一个wiki程序:wiki.js

 

Wiki.js | A modern and powerful wiki app built on Node.js

js.wiki

 from https://github.com/Requarks/wiki

(https://js.wiki/get-started

https://docs.requarks.io/install/requirements

https://docs.requarks.io/install)

------------------------------------------

Install on linux

  1. Download the latest version of Wiki.js:
wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz
  1. Extract the package to the final destination of your choice:
mkdir wiki
tar xzf wiki-js.tar.gz -C ./wiki
cd ./wiki
  1. Rename the sample config file to config.yml:
mv config.sample.yml config.yml
  1. Edit the config file and fill in your database and port settings (Configuration Reference):
nano config.yml
  1. For SQLite installations only: (skip this step otherwise) Fetch native bindings for SQLite3:
npm rebuild sqlite3
  1. Run Wiki.js
node server
  1. Wait until you are invited to open to the setup page in your browser.
  2. Complete the setup wizard to finish the installation.

Run as service

There are several solutions to run Wiki.js as a background service. We'll focus on systemd in this guide as it's available in nearly all linux distributions.

  1. Create a new file named wiki.service inside directory /etc/systemd/system.
nano /etc/systemd/system/wiki.service
  1. Paste the following contents (assuming your wiki is installed at /var/wiki):
[Unit]
Description=Wiki.js
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/node server
Restart=always
# Consider creating a dedicated user for Wiki.js here:
User=nobody
Environment=NODE_ENV=production
WorkingDirectory=/var/wiki

[Install]
WantedBy=multi-user.target
  1. Save the service file (CTRL+X, followed by Y).
  2. Reload systemd:
systemctl daemon-reload
  1. Run the service:
systemctl start wiki
  1. Enable the service on system boot.
systemctl enable wiki

Note: You can see the logs of the service using journalctl -u wiki

from https://docs.requarks.io/install/linux 

----------------------------------------------------

https://github.com/requarks/docs-legacy/tree/master/wiki ,旧版

 

 

 


 

No comments:

Post a Comment