Welcome to this cool guide which will walk you through how to install Nextcloud 26 on Rocky Linux 9| AlmaLinux 9.
NextCloud is a free and open-source collaboration and sharing software. It enables file access and storage across numerous platforms such as PCs and smartphones. NextCloud is comparable to DropBox and Google Drive but with enhanced privacy and security. It allows for the seamless collaboration of several projects, the management of your calendar, the sending and receiving of emails, and the making of video chats.
NextCloud is important in any environment as it offers the following key benefits:
- Cost-effective: This solution is cost-effective for individuals and organizations that need to store and share large amounts of data. It is significantly cheaper than other cloud storage services, and users can save money by hosting their own data rather than paying for third-party hosting services.
- Privacy and Security: It provides a higher level of privacy and security compared to other cloud storage services. All data is encrypted during transfer and storage, and users can set up two-factor authentication and other security measures to ensure that their data is protected.
- Enhanced Collaboration: It offers a centralized platform for storing and sharing files, which can enhance collaboration and productivity within an organization. Team members can access and collaborate on files in real-time, from anywhere in the world, improving the speed and efficiency of work.
- Customizable: This open-source platform, can be customized and extended as desired. There are a variety of plugins and integrations available that can enhance the functionality of the platform.
Some features of Nextcloud
Here are the nifty features of Nextcloud :
- It is also possible to log file-related operations and deny access depending on file access rules.
- There are security options such as multi-factor authentication with TOTP, WebAuthn, Oauth2, OpenID Connect, and brute-force protection.
- Nextcloud intends to add new features such as monitoring, full-text search, and Kerberos authentication, as well as audio/video conferencing, expanded federation, and minor user interface enhancements.
- Nextnts. Nextcloud may synchronize with local clients running Windows (Windows 7, 8, and macOS (10.6 or later), or different Linux distributions
This tutorial will demonstrate installing and configuring Nextcloud 26 on Rocky Linux 9|AlmaLinux 9. Simply follow the steps below very carefully to accomplish this.
Getting Started
Before we begin the installation, it is recommended that you update your system and all the available packages to the latest versions:
sudo dnf update
#1. Install LAMP Stack on Rocky Linux 9|AlmaLinux 9
For NextCloud, we need all the components of the LAMP stack i.e. Apache, PHP and MariaDB. To install the LAMP stack on a Rocky Linux 9|AlmaLinux 9 machine, go to the article at the link below.
Ensure that all the required PHP extensions are installed:
sudo dnf install php php-{common,gmp,fpm,curl,intl,pdo,mbstring,gd,xml,cli,zip,mysqli} -y
Ensure PHP-FPM is running:
sudo systemctl enable --now php-fpm
Check the status:
$ systemctl status php-fpm
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2023-04-19 20:12:41 CEST; 6s ago
Main PID: 34098 (php-fpm)
Status: "Ready to handle connections"
Tasks: 6 (limit: 23441)
Memory: 13.7M
CPU: 47ms
CGroup: /system.slice/php-fpm.service
├─34098 "php-fpm: master process (/etc/php-fpm.conf)"
├─34099 "php-fpm: pool www"
├─34100 "php-fpm: pool www"
├─34101 "php-fpm: pool www"
├─34102 "php-fpm: pool www"
└─34103 "php-fpm: pool www"
Check the installed PHP version:
$ php --version
PHP 8.0.28 (cli) (built: Feb 14 2023 11:05:44) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.28, Copyright (c) Zend Technologies
with Zend OPcache v8.0.28, Copyright (c), by Zend Technologies
#2. Build the NextCloud 26 database on Rocky Linux 9|AlmaLinux 9
Following a successful installation of the LAMP stack, we will produce NextCloud data by logging into the MariaDB database as shown below.
sudo mysql -u root -p
Use the MariaDB login information you created in the LAMP stack to log in.
then build a database as shown below.
CREATE DATABASE nextcloud_db;
CREATE USER 'nextcloud'@'%' IDENTIFIED BY 'myPassw0rd';
GRANT ALL PRIVILEGES ON nextcloud_db.* TO 'nextcloud'@'%';
FLUSH PRIVILEGES;
EXIT;
#3. Install NextCloud 26 on Rocky Linux 9|AlmaLinux 9
You can select the most recent version by going to the official website. NextCloud official release site
sudo yum install wget unzip
wget https://download.nextcloud.com/server/releases/latest.zip
Then extract the archive in the /var/www/html/ directory.
sudo unzip latest.zip -d /var/www/html/
To store the NextCloud user data, create a directory and give the Apache web server authorization
sudo mkdir -p /var/www/html/nextcloud/data
sudo chown -R apache:apache /var/www/html/nextcloud/
#4. Configure SELinux, Apache and Firewall Rules on Rocky Linux 9|AlmaLinux 9
Let us begin by configuring SELinux context on Rocky Linux 9|AlmaLinux 9.
sudo dnf -y install policycoreutils-python-utils
sudo chcon -t httpd_sys_rw_content_t /var/www/html/nextcloud/ -R
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/nextcloud(/.*)?"
sudo restorecon -Rvv /var/www/html/nextcloud
Allow port 80 through the firewall using the command below:
sudo firewall-cmd --add-port=80/tcp --zone=public --permanent
sudo firewall-cmd --reload
Modify the configuration file for Apache using your best editor;
sudo vim /etc/httpd/conf.d/nextcloud.conf
Add the below lines:
<VirtualHost *:80>
ServerName nextcloud.tutornix.com
ServerAlias www.nextcloud.tutornix.com
DocumentRoot /var/www/html/nextcloud
ErrorLog /var/www/html/nextcloud/error.log
CustomLog /var/www/html/nextcloud/requests.log combined
</VirtualHost>
Apache should be given access to the files under /var/www/html/nextcloud
sudo chown -R apache:apache /var/www/html/nextcloud/
Restart the Apache service:
sudo systemctl restart httpd
#5. Complete the Nextcloud 26 Web Installation
Complete the online installation of NextCloud by navigating to http://domain_name or http://IP_address on your browser.
On the above page, create an admin user for Nextcloud. Then configure your database by choosing MariaDB under “Storage and Database”
Provide your database details as provisioned then click Install to proceed with the Nexcloud installation.
You can also install the recommended applications, or skip this now.
You can adjust your background and what appears on the start-up page on the page below.
You may now set up and configure Nextcloud while you’re here. Navigate to the Files tab as shown below to back up, sync, and share files on Nextcloud.
Click the plus button to share files, and a whiteboard entry will appear as shown below:
#6. Configure Email Alerts on NextCloud 26
Setting transactional emails is crucial if NextCloud will be used by multiple people. Settings > Basic Settings
We have two modes, as demonstrated above: send mail and SMTP. Add the necessary information either using SMTP or send mail method.
You must enable this on SELinux as shown below.
sudo setsebool -P httpd_can_sendmail on
It’s simple to add new users. By going to settings >> users, it may be done. The users who are available and their permissions are displayed on this page. To add a user, select +New user.
Managing applications in Nextcloud
You may accentuate, alter, and limit functionalities with NextCloud. After setting up Nextcloud, you might want to switch a few features and applications on and off based on your requirements. Visit the Apps page to view the default apps.
Final Call
We have now reached the end of this instruction manual. On NextCloud, you can engage in a wide range of activities. I appreciate you reading this. This article ought to be helpful, I hope.
Other cool guides: