Local Food Nodes is an open-source platform designed to help small-scale farmers, producers, and consumers connect and trade local food. This tutorial provides step-by-step instructions for installing Local Food Nodes on Fedora Server Latest.
Before you proceed with the installation, make sure that the following prerequisites are met:
Begin by updating the system packages and repositories:
sudo dnf update
Enter your password when prompted and wait for the update process to complete.
To run Local Food Nodes, you need to install some packages and extensions. Install the following dependencies:
sudo dnf install php php-cli php-common php-mysqlnd php-pdo php-json php-opcache php-mbstring php-xml php-gd php-curl php-zip
MariaDB is the open-source database server that Local Food Nodes requires. Install the MariaDB package:
sudo dnf install mariadb-server
Start and enable the MariaDB server to run on system startup:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Run the mysql_secure_installation
command to secure the MariaDB installation:
sudo mysql_secure_installation
Answer the questions as follows:
Log in to the MariaDB server with the root user and password:
sudo mysql -u root -p
Create a database for Local Food Nodes:
CREATE DATABASE localfoodnodes;
Create a user with a strong password to access the database:
CREATE USER 'localfoodnodes'@'localhost' IDENTIFIED BY 'strongpassword';
Grant the user full access to the localfoodnodes database:
GRANT ALL PRIVILEGES ON localfoodnodes.* TO 'localfoodnodes'@'localhost';
Flush the privileges and exit the MariaDB server:
FLUSH PRIVILEGES;
EXIT;
Install the Apache web server:
sudo dnf install httpd
Start and enable the Apache server:
sudo systemctl start httpd
sudo systemctl enable httpd
Configure the Apache virtual host for Local Food Nodes. Navigate to the Apache configuration directory:
cd /etc/httpd/conf.d/
Create a new virtual host file with the following command:
sudo nano localfoodnodes.conf
Add the following configuration:
<VirtualHost *:80>
ServerName localfoodnodes.example.com
DocumentRoot /var/www/html/localfoodnodes
<Directory /var/www/html/localfoodnodes>
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/localfoodnodes-error.log
CustomLog /var/log/httpd/localfoodnodes-access.log combined
</VirtualHost>
Replace localfoodnodes.example.com
with your domain name or subdomain. Save and close the file by pressing Ctrl+X
, then Y
, then Enter
.
Create a new directory for Local Food Nodes:
sudo mkdir /var/www/html/localfoodnodes
Clone the Local Food Nodes repository from GitHub:
sudo git clone https://github.com/LocalFoodNodes/localfoodnodes.git /var/www/html/localfoodnodes
Grant permission to the Apache user to access the localfoodnodes directory:
sudo chown -R apache:apache /var/www/html/localfoodnodes/
Restart the Apache server to apply the changes:
sudo systemctl restart httpd
Create a configuration file for Local Food Nodes:
sudo cp /var/www/html/localfoodnodes/.env.example /var/www/html/localfoodnodes/.env
Edit the .env file using your preferred text editor:
sudo nano /var/www/html/localfoodnodes/.env
Set the database credentials and other settings as follows:
APP_NAME=LocalFoodNodes
APP_ENV=local
APP_KEY=base64:x1mF0rf0WXWVxnyr/0aJHUQz/8tOBBogDyws1dPE0Nw=
APP_DEBUG=true
APP_URL=http://localfoodnodes.example.com
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=localfoodnodes
DB_USERNAME=localfoodnodes
DB_PASSWORD=strongpassword
MAIL_MAILER=smtp
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME="${APP_NAME}"
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
Replace localfoodnodes.example.com
with your domain name or subdomain. Save and close the file by pressing Ctrl+X
, then Y
, then Enter
.
Generate a new application key:
sudo php /var/www/html/localfoodnodes/artisan key:generate
Migrate the database schema:
sudo php /var/www/html/localfoodnodes/artisan migrate
Seed the database with sample data:
sudo php /var/www/html/localfoodnodes/artisan db:seed
Open your web browser and navigate to http://localfoodnodes.example.com
(replace localfoodnodes.example.com
with your domain name or subdomain). You should see the Local Food Nodes landing page.
Sign up for an account, and start exploring the platform's features.
Congratulations! You have successfully installed Local Food Nodes on Fedora Server Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!