How to Install and Configure ownCloud with Apache on Ubuntu 18.04
ownCloud is an open-source, self-facilitated document sync and record share stage, like Dropbox, Microsoft OneDrive, and Google Drive. ownCloud is extensible through applications and has work area and portable customers for every significant stage.
In this instructional exercise, we'll tell you the best way to introduce and arrange ownCloud with Apache on a Ubuntu 18.04 machine.
Prerequisites
You'll should be signed in as a client with sudo admittance to have the option to introduce bundles and arrange framework administrations.
Creating a MySQL Database
ownCloud can utilize SQLite, Oracle 11g, PostgreSQL and MySQL information base to store all its setup.
We will utilize MySQL as an information base back-end.
On the off chance that MySQL or MariaDB isn't introduced on your Ubuntu worker you can introduce by following one of the aides beneath:
- Introduce MySQL on Ubuntu 18.04
- Introduce MariaDB on Ubuntu 18.04
Start by login into the MySQL shell by composing the accompanying order:
sudo mysql
From inside the MySQL shell, run the accompanying SQL proclamation to make an information base :
CREATE DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Next, make a MySQL client record and award admittance to the information base:
GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'change-with-strong-password';
At last, leave the mysql reassure by composing:
EXIT;
Installing PHP and Apache
ownCloud is a PHP application. PHP 7.2, which is the default PHP in Ubuntu 18.04 , is completely upheld and suggested for ownCloud.
Introduce Apache and all necessary PHP expansions utilizing the accompanying order:
sudo apt install apache2 libapache2-mod-php7.2 openssl php-imagick php7.2-common php7.2-curl php7.2-gd php7.2-imap php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-pgsql php-smbclient php-ssh2 php7.2-sqlite3 php7.2-xml php7.2-zip
Step 3: Configuring Firewall
Expecting you are utilizing UFW to deal with your firewall, you'll have to open HTTP (80) and HTTPS (443) ports. You can do that by empowering the 'Apache Full' profile which incorporates rules for the two ports:
sudo ufw allow 'Apache Full'
Downloading ownCloud
At the hour of composing this article, the most recent stable form of ownCloud is rendition 10.3.2. Prior to proceeding with the following stage, visit the ownCloud download page and check if there is another rendition of ownCloud accessible.
Utilize the accompanying wget order to download the ownCloud zip file:
wget https://download.owncloud.org/community/owncloud-10.3.2.zip -P /tmp
Once the download is finished, extricate the file to the/var/www registry:
sudo unzip /tmp/owncloud-10.3.2.zip -d /var/www
Set the right possession so the Apache webserver can have full admittance to the ownCloud's documents and indexes.
sudo chown -R www-data: /var/www/owncloud
Step 5: Configuring Apache
Open your content tool and make the accompanying Apache design document.
sudo nano /etc/apache2/conf-available/owncloud.conf
/etc/apache2/conf-available/owncloud.conf
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>
Empower the recently added design and all necessary Apache modules with:
sudo a2enconf owncloud
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
Initiate the progressions by restarting Apache administration:
sudo systemctl reload apache2
Step 6: Installing ownCloud
Since ownCloud is downloaded, and the important administrations are arranged open your program and start the ownCloud establishment by visiting your worker's space name or IP address followed by/owncloud :
http://domain_name_or_ip_address/owncloud
You will be given the ownCloud arrangement page.
Enter your ideal administrator username and secret key and the MySQL client and information base subtleties you recently made.
Snap on the Finish arrangement button. When the establishment cycle is finished, you will be diverted to the ownCloud dashboard signed in as administrator client.
Conclusion
You have figured out how to introduce and design ownCloud on your Ubuntu 18.04 machine. In the event that you have a space name related with your ownCloud worker, you should protect your Apache with a free Let's Encrypt SSL testament.
To discover more data about how to deal with your ownCloud example, visit the ownCloud documentation page.
On the off chance that you have any inquiries, it would be ideal if you leave a remark underneath.