How To Install Nextcloud 25 On Red Hat 8.6 With PHP 7.4
Nextcloud offers a cutting edge, on-premises content joint effort stage with continuous record altering, video visit and groupware on versatile, work area and web.
My Spesification Server Lab on virtualbox
OS : Red Hat Enterprise Linux 8.6
Hard Disk : 160 GB
RAM : 4 GB
Hostname : cloud-rhel
IP Address : 192.168.1.86/24
===================================
Change hostname to cloud-rhel
hostnamectl set-hostname cloud-rhel
Change ip address
nmtui
Follow steps change the ip address and reboot server
Restart your putty and login again
Install php 7.4
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf -y install dnf-utils
dnf module reset php -y
dnf update -y
dnf module install php:remi-7.4 -y
dnf
install httpd php php-cli php-mysqlnd php-zip php-devel php-gd
php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
php-pdo php-pecl-apcu php-pecl-apcu-devel mariadb mariadb-server unzip
php-pecl-zip -y
Download Nextcloud Latest Version
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip -d /var/www/html
mkdir /var/www/html/nextcloud/data
chown -R apache:apache /var/www/html/nextcloud/*
Check Selinux
grep enforcing /etc/selinux/config
========================================
output :
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
SELINUX=enforcing
========================================
Because selinux is active, we give apache access to selinux
chcon -t httpd_sys_rw_content_t /var/www/html/nextcloud/ -R
Configure mariadb
mysql_secure_installation
Enter and type "Y" change your password mariadb. My Password is "P@ssw0rd"
Configure mariadb
mysql -u root -p
===================================================
output :
mysql> CREATE DATABASE nextclouddb;
mysql> CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'P@ssw0rd';
mysql> GRANT ALL ON nextclouddb.* TO 'nextclouduser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit
===================================================
Configure apache
nano /etc/httpd/conf/httpd.conf
Edit "DocmentRoot"
Before
DocumentRoot "/var/www/html"
After
DocumentRoot "/var/www/html/nextcloud"
===================================================
Press ctrl + x
Create new file in the conf.d
nano /etc/httpd/conf.d/nextcloud.conf
===================================================
Copy Paste :
<VirtualHost *:80>
ServerName 192.168.1.86
ServerAdmin admin@agl.net
DocumentRoot /var/www/html/nextcloud
<directory /var/www/html/nextcloud>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
</directory>
</VirtualHost>
====================================================
Press ctrl + x
Restart apache
systemctl restart httpd
Check firewalld
systemctl status firewalld
==================================================================
output :
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-12-26 14:13:51 WIB; 17min ago
Docs: man:firewalld(1)
Main PID: 946 (firewalld)
Tasks: 2 (limit: 23031)
Memory: 39.0M
CGroup: /system.slice/firewalld.service
└─946 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid
Dec 26 14:13:51 svr-cloud2 systemd[1]: Starting firewalld - dynamic firewall daemon...
Dec 26 14:13:51 svr-cloud2 systemd[1]: Started firewalld - dynamic firewall daemon.
Dec
26 14:13:51 svr-cloud2 firewalld[946]: WARNING: AllowZoneDrifting is
enabled. This is considered an insecure configuration option. It will be
removed in>
lines 1-13/13 (END)
===================================================================
Because firewalld is active, we need to provide http service to firewalld
firewall-cmd --add-service=http --permanent
firewall-cmd --reload
Access nextcloud on your favourite browser
http://192.168.1.86
Follow Instructions

Comments
Post a Comment