Select Page

System Configurations:

CPU : 2 Cores
RAM : 8GB
Storage : 400GB
IP Address : 120.79.44.134
SSH Username : root
Passwor : ?
OS : Ubuntu 16.04 | stretch/sid

Prerequisites:
In order to complete the steps in this guide, you will need the following:
• A LAMP stack: ownCloud requires a web server, a database, and PHP to function properly. Setting up a LAMP stack (Linux, Apache, MySQL, and PHP) server fulfills all of these requirements.

Update the repository:
# apt-get update
Install apache packages:
# apt-get install apache2

Restart the apache service:
# sudo systemctl restart apache2
Enable apache on boot startup:
# systemctl enable apache2
Allow port for apache2:
# sudo ufw allow in “Apache Full”

Install MySQL:

# apt-get install mysql-server

Note: pop up will come for password, enter desire password and confirm it.

Restart the mysql service:
# sudo systemctl restart mysql
Enable apache on boot startup:
# systemctl enable mysql

Install PHP:

# apt-get install php libapache2-mod-php php-mcrypt php-mysql php-bz2 php-curl php-gd php-imagick php-intl php-mbstring php-xml and php-zip php-cli

Step 1 – ownCloud Installation

To begin, download their release key using the curl command and import it with the apt-key utility with the add command:

# curl https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key | sudo apt-key add –

In addition to importing the key, create a file called owncloud.list in the sources.list.d directory for apt. The file will contain the address to the ownCloud repository.

# echo ‘deb https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /’ | sudo tee /etc/apt/sources.list.d/owncloud.list

After adding a new source, use the apt-get utility and the update command to make apt aware of the change:

# sudo apt-get update

Finally, perform the installation of ownCloud using the apt-get utility and the instal command:
# apt-get install owncloud-files

Step 2 – Change Document Root in apache2 for owncloud

# vim /etc/apache2/sites-enabled/000-default.conf
Replace
DocumentRoot /var/www/html
with
DocumentRoot /var/www/owncloud
# systemctl restart apache2 
Step 3 – MySQL Database Configuration

# mysql -u root -p

Enter the password you set for the MySQL root user when you installed the database server.
ownCloud requires a separate database for storing administrative data. While you can call this database whatever you prefer, we decided on the name owncloud to keep things simple.
mysql> CREATE DATABASE owncloud;
Next, create a separate MySQL user account that will interact with the newly created database. Creating one-function databases and accounts is a good idea from a management and security standpoint. As with the naming of the database, choose a username that you prefer. We elected to go with the name owncloud in this guide.
mysql> GRANT ALL ON owncloud.* to ‘owncloud’@’localhost’ IDENTIFIED BY ‘set_database_password’;
mysql> FLUSH PRIVILEGES;
mysql> exit

Step 4 – ownCloud Configuration

To access the ownCloud web interface, open a web browser and navigate to the following address:

http://120.79.44.134

Follow onscreen instruction to complete below given ownCloud Configuration:
Create an admin account
click on the Storage & database link:
Leave the Data folder setting as-is
Click the MySQL/MariaDB button in the Configure the databasesection.
Enter the database information that you configured in the previous step
Click the Finish setup button to sign into ownCloud.