This article was contributed by the folks at RackNerd – a provider of shared hosting, reseller hosting, VPS hosting, dedicated servers, DRaaS, colocation, and more. If you are looking for a VPS with full root access to set up ownCloud on, be sure to review their latest LowEndBox special offers here.
ownCloud is an excellent software that lets you set up your own file-sharing server. It works like other file hosting services such as Dropbox and Google Drive. However, you do not store your data at ownCloud’s servers. Instead, you save the data on your own private server. ownCloud is available on all the major platforms, so you can access your data from any device.
Today, we will guide you on how to install and set up ownCloud on your CentOS 8 server.
- Requirements
Before we begin, make sure that you have the root access to your server. Moreover, also make sure that your CentOS 8 server has Apache, MariaDB, and PHP 7.2 installed.
- Create a database
For the first step, we need to create a back-end database. ownCloud supports various databases, such as MySQL, SQLite, and MariaDB. Today, we will use MariaDB for our ownCloud setup.
Run the following command to start up MariaDB:
sudo mysql
Next, we need to create a new database. For this, execute this following SQL statement.
CREATE DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
- Create a database user
Now that we have created a database, we need to create a database user. Run the following SQL statement:
GRANT ALL ON owncloud.* TO ‘ownclouduser’@’localhost’ IDENTIFIED BY ‘your-password’;
Make sure to replace ‘your-password’ with a strong password.
Next, close MariaDB by running the “Exit” command.
- Download PHP extensions
ownCloud is based on PHP; therefore, we need to download and install the required PHP extensions. To do so, run the following command:
sudo dnf install php php-curl php-gd php-intl php-json php-ldap php-mbstring php-mysqlnd php-xml php-zip php-opcache
Now, restart the PHP service to load these extensions:
sudo systemctl restart php-fpm
- Download ownCloud
Once we are done with the previous steps, we are ready to download and install ownCloud. Run the following command to download ownCloud:
wget https://download.owncloud.org/community/owncloud-10.3.2.tar.bz2 -P /tmp
Then, extract the downloaded files to the “/var/www” directory:
sudo tar jxf /tmp/owncloud-10.3.2.tar.bz2 -C /var/www
Now, change the ownership to give Apache the full access to files in ownCloud’s directory.
sudo chown -R apache: /var/www/owncloud
Also, you need to update SELinux security if it’s running on your system.
sudo chcon -tR httpd_sys_rw_content_t /var/www/owncloud
- Configure Apache web server
Before we install ownCloud, we need to configure Apache. For that create a config file using the following command:
sudo nano /etc/httpd/conf.d/owncloud.conf
Next, paste the following in this config file:
Alias /owncloud “/var/www/owncloud/”
<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
Then, restart the Apache server.
sudo systemctl restart httpd
- Install ownCloud
Now, it’s time to configure ownCloud. For that, go to your server’s IP address or domain name and add “/owncloud” in front of that. So, for example, open “check.com/owncloud”.
You will now see the setup page for ownCloud. Here you will enter your credentials and the details for your database. When you are done, click the “Finish” button, and the installation will be completed.
Please leave any questions, comments or feedback below!
Related Posts:
- Have you ever visited the web’s busiest hosting forum? LowEndTalk awaits. - September 27, 2022
- Grab the deals first by subscribing to our new deal alerts - September 16, 2022
- LowEndBox is on Instagram and TikTok! - August 5, 2022
Leave a Reply