01Network - amagerard/Wiki GitHub Wiki

HOME

Return to the list of wikis

RedHat/Wikijs

1- Network 2- NodejsRedis 3- Mariadb 4- Wikijs 5- Nginx
6- Selinux 7- UpdateWikijs 8- Backup 9- GnomeShell 10 Troubleshoots

1. Network.

1.1 Prerequisites.

March 10 ,2025.  
This is  the RedHat version 9.5  
MariaDB-server-11.6.2  
php 8.4  
It's not apache but nginx  

The status of selinux is 'permissive.
vi /etc/crontab

@reboot root setenforce 0  

The 2 subnets were created by pfsense.
SRV:          192.168.60.0/24
DNS:         192.168.90.0/24

1.2 Network Setup.

This procedure is based on this example.
IP wikijs :   192.168.60.50/24
Gateway :   192.168.60.254
Ip dns1 :     192.168.90.41/24
Domain :     ol26modk.com
Servers name:
wikijs.ol26modk.com
dns1.ol26modk.com

vi /etc/hostname

wikijs  

Au prompt vous aurez : <username>@wikijs.

This file is consulted before access to the Internet.
vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4  
192.168.60.50  wikijs.ol26modk.com  wikijs  

vi /etc/sysconfig/network

 # Created by anaconda  
# # Created by anaconda  
 networking=yes  
 HOSTNAME=wikijs.ol26modk.com  

Change Network.
Example:
IP: 192.168.60.50/24
Gateway: 192.168.60.254
Name Server: 192.168.90.41
Search domain: ol26modk.com
nmcli con mod eth0 ipv4.method "manual" ipv4.addresses 192.168.60.50/24
nmcli con mod eth0 ipv4.gateway 192.168.60.254
nmcli con mod eth0 ipv4.dns 192.168.90.41
nmcli con mod eth0 ipv4.dns-search ol26modk.com

Read the new network configuration.
more /etc/NetworkManager/system-connections/eth0.nmconnection

Apply the new network configuration.

ifconfig eth0 0.0.0.0
systemctl restart NetworkManager
ifconfig eth0

Update :

RedHat may ask you to make a new subscription.
subscription-manager register --username <username> --password <password> --auto-attach --force

dnf update

Uninstall msmtp if you are using a mail server.
dnf remove msmtp

reboot

1.3 Firewall.

Take over the rules of the TemplateVM firewall.
See Firewall Configuration.
Add the rules.

ufw allow 'WWW Full'  

ufw status verbose

Status: active  
Logging: on (medium)  
Default: deny (incoming), deny (outgoing), disabled (routed)  
New profiles: skip  
  
 To                         Action      From  
--                         ------      ----  
22                         ALLOW IN    192.168.1.0/29  
80,443/tcp (WWW Full)      ALLOW IN    Anywhere  
  
80,443/tcp (WWW Full)      ALLOW OUT   Anywhere  
25/tcp (SMTP)              ALLOW OUT   Anywhere  
53 (DNS)                   ALLOW OUT   Anywhere  
67,68/udp (DHCP)           ALLOW OUT   Anywhere  
123/udp (NTP2)             ALLOW OUT   Anywhere  
465/tcp (SMTP SSL)         ALLOW OUT   Anywhere  
587/tcp (SMTP TLS)         ALLOW OUT   Anywhere  
993/tcp (IMAP SSL)         ALLOW OUT   Anywhere  
143/tcp (IMAP TLS)         ALLOW OUT   Anywhere  
22/tcp (SSH)               ALLOW OUT   Anywhere  
⚠️ **GitHub.com Fallback** ⚠️