1080*80 ad

How to Install ownCloud Server on CentOS 8

Deploying a private cloud storage solution offers enhanced control and security over your data. ownCloud is a powerful platform that allows you to host your files, calendars, contacts, and more on your own server. This guide details the steps to install and configure ownCloud Server specifically on a CentOS 8 system, providing a robust foundation for your personal or organizational cloud.

Before beginning, ensure your CentOS 8 server is updated. Access your server via SSH and run the following command to refresh packages:
sudo dnf update -y

ownCloud requires a web server, database server, and PHP with several extensions. The standard choice on CentOS 8 is Apache for the web server, MariaDB for the database, and the appropriate PHP 7.x version. Install these components by executing:
sudo dnf install httpd mariadb-server php php-mysqlnd php-gd php-json php-xml php-mbstring php-intl php-pecl-apcu php-pecl-redis redis php-pdo php-zip php-iconv -y

Once installed, start and enable the Apache and MariaDB services to launch automatically on boot:
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

Secure your MariaDB installation by running the security script:
sudo mysqlsecureinstallation
Follow the prompts, setting a strong root password, removing anonymous users, disallowing remote root login, and removing the test database.

Now, set up a database and user for ownCloud. Log into the MariaDB root account:
sudo mysql -u root -p
Enter the password you set during the security script. Inside the MariaDB prompt, create the database, user, and grant privileges. Replace owncloud_db, owncloud_user, and your_strong_password with your desired names and a secure password:
CREATE DATABASE ownclouddb CHARACTER SET utf8mb4 COLLATE utf8mb4generalci;
GRANT ALL PRIVILEGES ON owncloud
db.* TO ‘ownclouduser’@’localhost’ IDENTIFIED BY ‘yourstrong_password’;
FLUSH PRIVILEGES;
EXIT;

Next, download the latest ownCloud Server archive. Navigate to a temporary directory and use wget to get the file from the official ownCloud download page (replace the URL with the current stable version if needed, but this is a common location):
cd /tmp
wget https://download.owncloud.org/community/owncloud-latest.tar.bz2

Extract the archive to the Apache web root directory, typically /var/www/html/:
sudo tar -xjf owncloud-latest.tar.bz2 -C /var/www/html/

Change the ownership of the owncloud directory to the Apache user and group (apache:apache) to ensure the web server can access and write to the necessary files:
sudo chown -R apache:apache /var/www/html/owncloud/

Create an Apache Virtual Host configuration file for ownCloud. This allows Apache to serve the ownCloud application correctly. Create a file like /etc/httpd/conf.d/owncloud.conf:
sudo nano /etc/httpd/conf.d/owncloud.conf
Add the following configuration, adjusting ServerName to your domain or server IP:

<VirtualHost *:80>
    ServerName your_domain_or_ip
    DocumentRoot "/var/www/html/owncloud/"
    <Directory "/var/www/html/owncloud/">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog /var/log/httpd/owncloud-error.log
    CustomLog /var/log/httpd/owncloud-access.log combined
</VirtualHost>

Save and close the file.

Restart Apache to load the new configuration:
sudo systemctl restart httpd

Ensure your firewall is configured to allow HTTP (port 80) and HTTPS (port 443, which you should configure later for security) traffic:
sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload

Finally, open a web browser and navigate to your server’s domain name or IP address (e.g., http://your_domain_or_ip). The ownCloud web installer will appear.

Follow the on-screen instructions:

  1. Create an administrator account by choosing a username and a strong password.
  2. Click on “Storage & database” and select MySQL/MariaDB.
  3. Enter the database user, password, database name you created earlier, and the database host (usually localhost).
  4. Click “Finish setup”.

The installer will complete the process, and you will be directed to your new ownCloud dashboard. Your private cloud server is now operational on CentOS 8, ready for file syncing, sharing, and other cloud services. Remember to configure HTTPS for secure access after the initial setup.

Source: https://kifarunix.com/install-owncloud-server-on-centos-8/

900*80 ad

      1080*80 ad