How to Install Django-Wiki on Fedora Server Latest
In this tutorial, we will explain how to install Django-Wiki on Fedora Server latest version.
Prerequisites
Before getting started, please ensure that you have:
- A Fedora Server installed and configured.
- Python 2.7 or higher.
- pip installed.
Step 1: Install Required Dependencies
Django-Wiki requires some dependencies to be installed before installation. Run the following command to install the required dependencies:
sudo dnf install python2-devel python2-pip python2-setuptools python2-wheel python2-pillow \
python2-django python2-dateutil python2-docutils python2-jinja2 \
python2-unidecode python2-six python2-misaka python2-pygments
This will install all the required packages.
Step 2: Install Django-Wiki
Start by checking out the Django-Wiki source code from GitHub. Clone the repository with the following command:
git clone https://github.com/django-wiki/django-wiki.gitGo to the cloned directory:
cd django-wikiInstall Django-Wiki:
sudo python2 setup.py install
Step 3: Configure the Database
Django-Wiki requires a database, so you need to configure it before using Django-Wiki.
Create a new database, and user with privileges:
mysql -u root -p mysql> CREATE DATABASE django_wiki; mysql> GRANT ALL ON django_wiki.* TO django_wiki_user@localhost IDENTIFIED BY 'password'; mysql> FLUSH PRIVILEGES; mysql> \qGo to the Django-wiki directory:
cd django-wikiOpen the 'settings.py' file:
nano django_wiki/settings.pyEdit the database settings by changing the following lines:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }Replace with:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'django_wiki', 'USER': 'django_wiki_user', 'PASSWORD': 'password', 'HOST': 'localhost', 'PORT': '' } }Save and exit the file.
Step 4: Run Django-Wiki
Start the server:
sudo python2 manage.py runserverVisit http://localhost:8000/ in your web browser to see the Django-Wiki homepage.
Congratulations! You have successfully installed Django-Wiki on Fedora Server.