How to Install ownCloud on Fedora CoreOS Latest
In this tutorial, we will guide you step by step on how to install ownCloud on Fedora CoreOS latest version. OwnCloud is a self-hosted alternative to cloud storage services such as Google Drive, Dropbox or OneDrive that you can set up on your own server.
Prerequisites
- A server running Fedora CoreOS latest version
- A non-root user with sudo privileges
- A domain name that points to your server IP address
Step 1: Install required packages
SSH into your server with the non-root user you created and update the system packages by running the following command.
sudo dnf update -y
Next, we will install the required packages for ownCloud to work properly.
sudo dnf install -y php-opcache php-bcmath php-cli php-gd php-intl php-mbstring php-mysqlnd php-pdo php-pecl-apcu php-xml php-json mariadb mariadb-server httpd wget
Step 2: Configure MariaDB
Start and enable the MariaDB service and secure it by running the following command.
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql_secure_installation
When prompted, answer the questions as follows:
Enter current password for root (enter for none): Press Enter
Set root password? [Y/n]: Y
New password: Enter a strong password
Re-enter new password: Repeat the password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Create a new MariaDB database and user for ownCloud. Replace the username and password with your own.
sudo mysql -u root -p
MariaDB> CREATE DATABASE owncloud;
MariaDB> CREATE USER 'oc_user'@'localhost' IDENTIFIED BY 'your-strong-password';
MariaDB> GRANT ALL PRIVILEGES ON owncloud.* TO 'oc_user'@'localhost';
MariaDB> FLUSH PRIVILEGES;
MariaDB> EXIT;
Step 3: Download ownCloud
We will now download and extract the latest stable version of ownCloud.
sudo wget https://download.owncloud.org/community/owncloud-complete-20210805.zip
sudo unzip owncloud-complete-20210805.zip -d /var/www/html
sudo chown -R apache:apache /var/www/html/owncloud
sudo chmod -R 755 /var/www/html/owncloud
Step 4: Configure ownCloud
We will now configure ownCloud and set up the administrator account. Open your browser and navigate to your server's IP address or domain name.
Follow the steps below:
On the welcome page select "Storage & database" and enter the MariaDB connection details:
- Database user: oc_user
- Database password: your-strong-password
- Database name: owncloud
- Database host: localhost
- Table prefix: oc_
Click the "Finish setup" button and wait for ownCloud to install.
On the next page, set up the ownCloud administrator account by providing the following details:
- Your ownCloud username: admin
- Your ownCloud password: a strong password
- Repeat password: confirm your password
Finally, click on "Finish setup" to complete the installation.
Step 5: Firewall Configuration
If you have an active firewall on your server (such as Firewalld), you must open the HTTP and HTTPS ports to allow access to the ownCloud web interface.
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
Step 6: Enable HTTPD and MariaDB Services
Lastly, we need to enable and start the HTTPD and MariaDB services to run them automatically on system startup.
sudo systemctl enable httpd
sudo systemctl start httpd
sudo systemctl enable mariadb
sudo systemctl start mariadb
Congratulations! You have successfully installed and configured ownCloud on your Fedora CoreOS server. You can now access the ownCloud interface through your web browser by entering the IP address or domain name of your server.