How to install NextCloud File Sharing on AlmaLinux 8

Learn how you can install NextCloud File Sharing on AlmaLinux 8! NextCloud is an open source software, a Dropbox alternative that enables secure storage, collaboration, and sharing within your own cloud server. When you compare to using hosted solutions like Dropbox, Google Drive or Microsoft OneDrive, hosting your own file sharing server such as NextCloud gives you full access and control over all your data.

Summary

Create a Database for NextCloud

  1. First, login to your database after you have installed LAMP stack within your cloud server:
    mysql -u root -p
  2. Then, create a database called “nextcloud-db” for NextCloud:
    CREATE DATABASE nextcloud-db;
  3. Next, create a user called “nextcloud-user”, grant full access to the database and use a strong password to replace Strong-Password-Here:
    GRANT ALL ON nextcloud-db.* TO 'nextcloud-user'@'localhost' IDENTIFIED BY 'Strong-Password-Here';
  4. You may wish to flush privileges using the following command:
    FLUSH PRIVILEGES;
  5. Finally, exit your database
    EXIT;

Install NextCloud

  1. You will now need to install additional PHP modules for NextCloud to work smoothly:
    sudo dnf install php-curl php-gd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip php-opcache
  2. Next, download NextCloud to your cloud server:
    wget https://download.nextcloud.com/server/releases/nextcloud-21.0.2.zip
  3. Extract the contents within the zip file into the folder /var/www/html/
    unzip nextcloud-21.0.2.zip -d /var/www/html/
  4. After that, create a directory to store the user data
    mkdir -p /var/www/html/nextcloud/data
  5. You can then enable permission for Apache server to access to NextCloud files
    chown -R apache:apache /var/www/html/nextcloud/
  6. You should also allow permission for NextCloud in SELinux
    chcon -t httpd_sys_rw_content_t /var/www/html/nextcloud/ -R
  7. Do take note that Port 80 should have been enabled during the LAMP stack installation process. Otherwise refer to the tutorial for the command.
  8. Finally, you can now access to NextCloud from your browser at http://expertvm-server-ip-address/nextcloud

Conclusions

This tutorial shows you how to install NextCloud File Sharing on AlmaLinux 8. Enjoy hosting secure file sharing and enterprise collaboration within your own server environment!

Important Information

NextCloud performs live indexing and Full Text Search on all the files that are hosted within the cloud server. You are discouraged from using our Storage VPS to host NextCloud, for the best user experience. We recommend you to consider either our Scalable VPS or Dedicated Servers to host NextCloud, and do consider the Daily Backup add-on during check out process, for the best data protection.

Related Post