How to Install wger on Fedora Server Latest
wger is a free, open-source web app that allows you to track your workouts and meals. It's a great tool for anyone looking to improve their fitness and health. In this tutorial, we will walk you through the process of installing wger on Fedora Server latest.
Prerequisites
Before we begin, ensure that you have the following prerequisites in place:
- A running instance of Fedora Server latest
- A user account with sudo privileges
- A terminal emulator such as GNOME Terminal or Konsole
Step 1: Update the System
Before installing wger, we need to ensure that the system is up-to-date. Open the terminal emulator and run the following command:
sudo dnf update
This command will update your system to the latest available packages.
Step 2: Install the Required Dependencies
wger requires several dependencies to function correctly. Run the following command to install them:
sudo dnf install python3-devel python3-pip gcc make postgresql postgresql-server postgresql-contrib postgresql-devel postgresql-libs postgresql-devel
This command will install Python3, PostgresSQL, PostgresSQL server, and several required libraries.
Step 3: Install wger
To install wger, run the following command:
sudo pip3 install wger
This command installs wger using pip3, which is the Python package manager. After the installation is complete, you can verify the installation by running:
wger --version
This command will display the installed version of wger.
Step 4: Set up the Database
To use wger, we need to set up a PostgreSQL database. Open the terminal emulator and run the following command:
sudo su postgres
This command switches to the PostgreSQL user. After running the command, you will see the prompt change to:
bash-5.1$
Next, run the following command to log in to the PostgreSQL server:
psql
This command will connect you to the PostgreSQL server using the default user.
Next, create a new user and database for wger:
CREATE USER wger WITH PASSWORD 'password';
CREATE DATABASE wger;
GRANT ALL PRIVILEGES ON DATABASE wger TO wger;
Replace "password" in the above command with a secure password of your choice.
After creating the database and user, exit the PostgreSQL shell by running:
\q
This command will end the PostgreSQL session.
Step 5: Configure wger
The final step is to configure wger to use the newly-created database. Open file /etc/wger/settings.cfg using text editor,
sudo vi /etc/wger/settings.cfg
and replace the contents of DATABASES section with:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'wger',
'USER': 'wger',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '',
}
}
Replace the value of USER and PASSWORD with the values you created in step 4.
Save and close the file.
Step 6: Start wger
To start wger, run the following command:
wger
This command will launch the wger web app.
To access the app, open a web browser and enter the following URL in the address bar:
http://localhost:8000
This will open the wger web app.
Conclusion
In this tutorial, we have shown you how to install wger on Fedora Server latest. wger is a powerful tool that can help you track your workouts and meals, and with this installation guide, you can get started using it quickly and easily.