The Right Way to Install NextCloud on Almalinux 9 10
0

In this text, we discover ways to install and configure SubsequentCloud on Almalinux 9 or Rocky Linux 9 for establishing your cloud.

What Is SubsequentCloud?

Well, these but don’t know SubsequentCloud is a fork of common PersonalCloud however develop into extra common than that. It can also be a free and open-source private cloud resolution with Enterprise options as nicely. The key advantage of utilizing such open supply software program suite is it lets customers retailer their information securely within the cloud however on a server owned by them bodily or just about.  Hence, from the privateness perspective, it is a superb various to proprietary cloud options like Dropbox or Google Drive as a result of customers have full management over their information.

How Does SubsequentCloud Work?

SubsequentCloud offers two principal options: storage synchronization between customers and server-side encryption of file contents which make sure the privateness of consumer information. For syncing, SubsequentCloud additionally offers shopper functions you can simply install in your respective desktop working programs.

The file synchronization retains syncing all of the adjustments made by a consumer on a desktop and can replicate the identical on the server in addition to on all different gadgets with entry to the identical folder. Whereas, server-side encryption gives safety, which signifies that solely a consumer’s customized key can decrypt his/her information saved utilizing Nextcloud — nobody else (not even admins) can learn the encrypted contents with out the proper key being offered by the consumer themselves.

Advantages of Using SubsequentCloud

The principal benefit of utilizing Nextcloud is safety — if you happen to retailer your information with service suppliers like Google Drive or Dropbox, you don’t have management over who has entry to them or when they’re accessed.

With Nextcloud nonetheless, you all the time know who at the moment has entry to what information and after they have been final accessed (even when they solely seen the checklist of file names).

Additionally, since all data is saved in your non-public server (ie not on any firm infrastructure), you by no means have to fret about having to buy extra space for storing when your month-to-month quota is exceeded once more — one thing you’d sometimes need to do if storing with a conventional supplier like Google Drive or Dropbox, and so forth.

Lastly, since SubsequentCloud is open supply software program, it permits people or organizations to customise its performance rather more simply than different cloud storage platforms which usually present far fewer choices for personalisation than an open supply resolution would permit for instance (e.g., setting customized entry guidelines, and so forth).

In this information, we present step-by-step instructions for putting in Nextcloud on Almalinux Linux 9 | Rocky Linux 9.

Requirements

To observe this tutorial we want the next issues, through which Apache, PHP, and MySQL shall be put in by us on this information however the remainder of the necessities your server should be possessed.

Almalinux or Rocky Linux 9
• Apache, PHP  8.0, 8.1, 8.2
• MySQL 8.0+ or MariaDB 10.2/10.3/10.4/10.5
• Access to a Non-root sudo consumer at the least
• 512MB of RAM

Step 1: Run the DNF replace command

To guarantee we received’t face any issues whereas putting in the SubsequentCloud on Almalinux or Rocky Linux 9, let’s run the system replace command as soon as. This will install all the newest safety and package deal updates accessible for our Linux server OS.

sudo dnf replace

Also, install:

sudo dnf install wget nano unzip

Step 2: Disable SELinux in AlmaLinux 8

Once the replace is accomplished, additionally put SELinux in permissive mode, which suggests disabling it briefly till the subsequent reboot. This will be sure that there shall be no undesirable restrictions in putting in SubsequentCloud.

sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /and so forth/selinux/config

To verify the standing:

sestatus
Disable SELinux in Rocky Linux

Step 3: Install Apache, MySQL, and PHP

As SubsequentCloud on the server facet is a PHP-based internet software, subsequently, we have to create an online server surroundings on our Linux. The frequent functions for which can be Apache, MySQL for Databases, and PHP. So, observe the given command to install them.

1. Setup Apache Web server (httpd)

Apache is the commonest and available internet server from the default repository of any Linux distro together with AlmaLinux and Rocky Linux. Therefore, in your command terminal merely run the next instructions:

sudo dnf install httpd

Start and allow Apache providers

sudo systemctl allow --now httpd

To verify the standing:

systemctl standing httpd --no-pager -l

Also, open HTTP and HTTPS ports in your system, in order that we will entry the SubsequentCloud web page later:

sudo firewall-cmd --permanent --add-service={http,https}

Reload the Firewall

sudo firewall-cmd --reload

To affirm additional, we will verify the default Apache internet web page. For that open browser in your native system that may entry your server IP tackle or area.

Example:

http://server-ip-address

You will see one thing like under:

Default Apache Web server page Almalinux

2. Install MySQL Server on Alma or Rocky

We can use both MariaDB or MySQL Database server on Almalinux 9 or Rocky Linux to retailer the information that shall be generated by SubsequentCloud later. Here we’re putting in MySQL 8.0 which is out there to obtain from the default repository of each these RPM-based Linux distros.

sudo dnf install mysql mysql-server

Start the Server:

sudo systemctl allow --now mysqld

For the service standing:

systemctl standing mysqld --no-page -l

3. Create a Database for SubsequentCloud

Let’s additionally create a Database to make use of with SubsequentCloud on a MySQL server, listed here are the SQL instructions to observe:

sudo mysql

Login:

mysql -u root -p

Create database User:

CREATE USER 'youruser'@'localhost' IDENTIFIED BY "yourpassword";

Create DB:

CREATE DATABASE yourdb;

Give all rights of created DB to make use of:

GRANT ALL PRIVILEGES ON yourdb.* TO 'youruser'@'localhost';
FLUSH PRIVILEGES;
exit;

Note: Replace yourdb with the database identify you wish to give, whereas the youruser with the username and yourpassword with the password you wish to assign.

4. Download PHP 8.1

The default model of PHP accessible by the system repository of AlmaLinux or Rocky is PHP 8.0, nonetheless right here we’ll go for PHP 8.1. So, add the third-party Remni repository manually to get the newest variations of PHP language.

sudo dnf install epel-release
sudo dnf -y install http://rpms.remirepo.net/enterprise/remi-release-9.rpm
sudo dnf replace
sudo dnf module reset php
sudo dnf module allow php:remi-8.1
Download PHP 8.1 on Almalinux 9 1

Install PHP and its extensions required for SubsequentCloud:

Now, run the given command in your terminal to not solely install the PHP however its extensions as nicely.

sudo dnf install php php-{cli,mysqlnd,zip,devel,gd,mcrypt,mbstring,curl,xml,pear,bcmath,json,pdo,pecl-apcu,pecl-apcu-devel,ldap}
Install PHP from Remni

Don’t overlook to allow and begin the PHP-FPM service required by SubsequentCloud.

sudo systemctl allow --now php-fpm.service

Increase PHP Memory Limit:

sudo sed -i "s/memory_limit = .*/memory_limit = 512M /" /and so forth/php.ini

Restart Apache Server:

sudo systemctl restart httpd

Step 4: Download Nextcloud Server

So far, now we have created the net server surroundings together with different necessities by SubsequentCloud. Now, let’s obtain its set up information accessible within the archived format of this cloud software program from its official web site. We can use the given command to shortly have it with out visiting its obtain web page.

wget https://download.nextcloud.com/server/releases/latest.zip

Step 5: Install SubsequentCloud in Alma or Rocky Linux 9

After downloading the Nextcloud set up information, unzip the file utilizing the given command.

unzip newest.zip

Move the extracted file to /var/www/html/ listing

sudo mv nextcloud/ /var/www/html/

Create a knowledge folder to retailer uploaded information in Nextcloud

sudo mkdir /var/www/html/nextcloud/information

Now, give the Nextcloud folder’s permission to the Apache consumer:

sudo chown apache:apache -R /var/www/html/nextcloud

Step 6. Create an Apache VirtualHost file for SubsequentCloud

Let’s create an Apache configuration file for SubsequentCloud on Almalinux or Rocky, to serve the file in case you’re utilizing the area identify or a number of web sites which can be operating on the identical server.

sudo nano /and so forth/httpd/conf.d/nextcloud.conf

Paste the next strains:

Note: Don’t overlook to switch cloud.instance.com with the area identify you wish to use. If you don’t have any then depart it as it’s.

<VirtualHost *:80>

ServerIdentify cloud.instance.com
ServerAdmin [email protected]

DocumentRoot /var/www/html/nextcloud

<listing /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
</listing>

</VirtualHost>

Restart the Apache internet server and set SELinux insurance policies:

sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html(/.*)?"
sudo sudo restorecon -Rv /var/www/html
sudo systemctl restart httpd

Step 7. Access SubsequentCloud Web Interface

Once all of the above steps are accomplished you’re able to entry the net interface for establishing SubsequentCloud additional in your Rocky or AlmaLinux 9 system.

Open your browser that may entry the area or IP tackle of the server the place you might have put in SubsequentCloud. After that time to the Ip or area:

http://your-server-ip-address
or
http://your-domain.com

Create Admin consumer and enter Database Details

The first web page will ask you to create an Admin consumer and after that choose MySQL/MariaDB as Database. There enter the main points of the Database you might have created.

After that click on on the INSTALL button.

Configure Database NextCloud Web Interface

Step 8. Login to SubsequentCloud Dashboard

When you might have the Login web page, enter the main points of the Admin consumer you might have created and check in to have the SubsequentCloud Dashboard to add information.

Note: In case you overlook the Admin password then right here is the article to alter it – How to reset SubsequentCloud Admin Password utilizing the command.

Login To Cloud Dashboard
Install NextCloud on Almalinux or Rockylinux 9

Step 9. Command to Update SubsequentCloud

In the longer term, if you wish to improve your SubsequentCloud simply utilizing the command, then right here is one to observe:

Edit php.ini

sudo nano /and so forth/php.ini

Scroll to the top of the file:

--define apc.enable_cli=1

Save the file utilizing Ctrl+O, hit the Enter key, after which press Ctrl+X

Once you might have added it, run this command to verify SubsequentCloud upgrades every time accessible to install. 

sudo -u apache php --define apc.enable_cli=1 /var/www/html/nextcloud/updater/updater.phar

Step 10. Set Let’s Encrypt SSL for SubsequentCloud (optionally available)

Those who additionally wish to set an SSL certificates want to run the next instructions:

Note: Make positive in your Domain DNS “A” report is pointing to the Ip-address the place you might have put in SubsequentCloud.

sudo dnf -y install certbot mod_ssl
sudo certbot certonly --standalone -d cloud.instance.com --preferred-challenges http --agree-tos -n -m [email protected] --keep-until-expiring

Once the SSL certificates has been issued efficiently edit your present Apache Configuration:

sudo nano /and so forth/httpd/conf.d/nextcloud.conf

Delete the prevailing configuration and add the next one. And don’t overlook to switch the cloud.instance.com with the area identify you wish to use entry SubsequentCloud.

<VirtualHost *:80>
ServerIdentify information.instance.com
ServerAdmin [email protected]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>

<IfModule mod_ssl.c>

<VirtualHost *:443>

ServerIdentify cloud.instance.com
ServerAdmin [email protected]
DocumentRoot /var/www/html/nextcloud

<listing /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
</listing>

SSLEngine on
SSLCertificateFile /and so forth/letsencrypt/reside/cloud.instance.com/fullchain.pem
SSLCertificateKeyFile /and so forth/letsencrypt/reside/cloud.instance.com/privkey.pem

</VirtualHost>
</IfModule>

Save the file by urgent Ctlr+O, hit the Enter key, after which exit the identical utilizing Ctrl +X.

Restart the Web server:

sudo systemctl restart httpd

Those who wish to install SubsequentCloud Client can see our article –
Install Nextcloud Client on Debian 11 Bullseye Linux
The Right Way to Install the SubsequentCloud sync shopper on Almalinux or Rocky Linux 

FAQ:

Is Nextcloud like Google Drive?

Yes, SubsequentCloud is like Google Drive however on it, all the information is beneath your management and in your private server. Whereas on Google Drive all information and servers are beneath Google’s management. Hence, it is among the greatest private cloud options.

Which is healthier personalCloud or Nextcloud?

SubsequentCloud is a fork of personalCloud subsequently each are the identical, however, completely different when it comes to ideology. On one facet SubsequentCloud focuses on including new options, whereas Owncloud making an attempt to be a well-stable enterprise-grade file collaboration platform.

Is 2 GB RAM sufficient for Nextcloud?

Yes, 2GB of RAM is sufficient to install SubsequentCloud as a result of the suggest minimal reminiscence requirement of this private cloud software program is 512MB solely.

Which database is greatest for Nextcloud?

As per the official documentation of the SubsequentCloud MariaDB or MySQL open-source database servers are greatest to make use of, nonetheless by default it’s set to make use of SQLite.

Can I exploit Nextcloud on Windows?

Yes, we will use SubsequentCloud Server or Client on each Windows 10 and Windows 11 variations of Microsoft.

Is Nextcloud safe?

Yes, SubsequentCloud is safe as a result of it will possibly use SSL or TSL to switch information and likewise can encrypt the information utilizing a default military-grade AES-256 encryption with server-based or customized key administration. However, in case you are putting in it in your server then total safety is in your arms.

The Right Way to Install Tor Browser in AlmaLinux 8

Previous article

Enable CBR “Code Ready Builder”

Next article

You may also like

Comments

Leave a Reply

More in Almalinux