How to Install Hitobito on Fedora Server Latest

Hitobito is an open-source web-based software application for managing organizations, groups, and members. It is widely used by non-profit organizations, associations, and clubs to manage their members, events, and finances. This tutorial will guide you through the process of installing Hitobito on a Fedora server.

Requirements

Before proceeding with the installation, ensure that you have the following requirements:

  • A Fedora server with root access
  • A web server (like Apache or NGINX) installed and running
  • PHP version 5.6 or higher installed and running
  • MySQL (or MariaDB) installed and running
  • Composer (PHP dependency manager)

Step 1: Update the System

You should always update your system to the latest packages before installing any new software. You can do this by running the following command:

sudo dnf update

Step 2: Install Required Packages

To install Hitobito, you need to install some required packages on your Fedora server. Run the following command to install the packages:

sudo dnf install -y git unzip wget php php-cli php-mysqlnd php-pdo php-gd php-ldap php-xml php-mbstring mariadb mariadb-server

Step 3: Install Composer

Composer is a dependency manager for PHP that simplifies the installation and management of packages. Run the following command to install Composer:

sudo curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer

Step 4: Download Hitobito

To download the latest version of Hitobito, use the following command:

sudo git clone https://github.com/hitobito/hitobito.git /var/www/html/hitobito

Step 5: Install Hitobito Dependencies

Navigate to the Hitobito directory and install the dependencies using Composer:

cd /var/www/html/hitobito
sudo composer install

Step 6: Configure Database

Create a new database for Hitobito in MySQL (or MariaDB).

sudo mysql -u root -p

Type your root password and press Enter. Then, create a new database and user:

CREATE DATABASE hitobito;
GRANT ALL PRIVILEGES ON hitobito.* TO 'hitobito_user'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;

Make sure you replace password with a strong password for the user.

Rename the configuration file config/database.yml.example to config/database.yml. Then, edit the file and update the database settings:

production:
  adapter: mysql2
  database: hitobito
  username: hitobito_user
  password: password
  host: localhost
  port: 3306

Again, replace password with the password you set for the user.

Step 7: Generate Secret Key

Hitobito requires a secret key to encrypt and decrypt sensitive information. Run the following command to generate a random secret key:

cd /var/www/html/hitobito
sudo bin/rails secret # Copy the output

Edit the configuration file config/secrets.yml and replace YOUR_SECRET_TOKEN with the output from the command above:

production:
  secret_key_base: YOUR_SECRET_TOKEN

Step 8: Set Permissions

Set the correct permissions and ownership for the Hitobito directory:

sudo chown -R www-data:www-data /var/www/html/hitobito
sudo chmod -R 755 /var/www/html/hitobito

Step 9: Create Virtual Host

Create a new virtual host for Hitobito. Create a new file /etc/httpd/conf.d/hitobito.conf and paste the following content:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/html/hitobito/public
    DirectoryIndex index.php index.html
    <Directory /var/www/html/hitobito/public>
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog /var/log/httpd/hitobito_error.log
    CustomLog /var/log/httpd/hitobito_access.log combined
</VirtualHost>

Make sure to replace example.com with your domain name.

Step 10: Restart Services

Restart the web server and MariaDB services to apply the changes:

sudo systemctl restart httpd
sudo systemctl restart mariadb

Step 11: Access Hitobito

Open your web browser and navigate to http://example.com. Hitobito will appear, and you can log in using the default credentials:

After logging in, you should change the default password and start configuring Hitobito according to your needs.

Congratulations! You have successfully installed Hitobito on Fedora Server Latest.