How to Install Prologic's Wiki on Ubuntu Server
Prologic's Wiki is a simple and powerful wiki engine built in Python. In this tutorial, we will walk through how to install Prologic's Wiki on an Ubuntu Server.
Prerequisites
Before we begin, make sure you have the following:
- An Ubuntu Server running version 18.04 or higher
- A sudo user for installation and configuration
- Python 3 installed on your server
Step 1 - Clone the Git repository
To start, we first need to clone the Prologic's Wiki Git repository from https://git.mills.io/prologic/wiki:
$ git clone https://git.mills.io/prologic/wiki.git
This will create a wiki directory in your current working directory.
Step 2 - Install Required Packages
Next, we need to install the required packages for Prologic's Wiki. Navigate to the wiki directory and run the following command:
$ sudo apt-get update
$ sudo apt-get install gcc python-dev libffi-dev libssl-dev python3-venv
Step 3 - Create a Python Environment
We will now create a Python virtual environment to install Prologic's Wiki. Navigate to the wiki directory and create the environment:
$ python3 -m venv env
Activate the environment by running the following command:
$ source env/bin/activate
Step 4 - Install Prologic's Wiki
Now we will install Prologic's Wiki inside the virtual environment. Navigate to the wiki directory and run:
$ pip install -r requirements.txt
This will install all the necessary dependencies for the wiki.
Step 5 - Configure the Wiki
Copy the config.sample.yml file to config.yml, and edit it as desired:
$ cp config.sample.yml config.yml
Step 6 - Run the Wiki
Finally, we can start the wiki server. Run the following command:
$ ./start.sh
This will start the wiki server and it will be available at http://localhost:5000.
Conclusion
Prologic's Wiki is now installed and running on your Ubuntu server. You can now access and manage your wiki through a web browser.
FAQ
How do I change the port?
To change the port number, simply open the config.yml file and change the port field to the desired port.
How do I run the server in the background?
To run the server in the background, you can use the nohup command:
$ nohup ./start.sh &
How do I stop the server?
To stop the server, simply press Ctrl + C in the terminal where the server is running.
How do I start the server automatically on system start-up?
You can use systemd to run the server automatically on system start-up. Create a new service file /etc/systemd/system/prologic-wiki.service with the following contents:
[Unit]
Description=Prologic's Wiki
[Service]
WorkingDirectory=/path/to/wiki
ExecStart=/path/to/wiki/start.sh
Restart=always
User=yourusername
Group=www-data
[Install]
WantedBy=multi-user.target
Change yourusername to your username, and adjust the WorkingDirectory and ExecStart paths as needed. Then, run:
$ sudo systemctl daemon-reload
$ sudo systemctl enable prologic-wiki.service
$ sudo systemctl start prologic-wiki.service
The server will now start automatically on system start-up.