Server setup with owncloud

Submitted on Mon, 09/27/2021 - 14:05

Install ssh server

apt install openssh-server

 

Install apache2 web server

apt install apache2

 

Install php module for apache2 webserver

apt install libapache2-mod-php

 

Install mariadb database server

apt install mariadb-server

 

Log into mysql database server with root user using no password:

mysql -u root

 

Select mysql database

use mysql;

Note: The above command should be run in mysql prompt

 

Change root password

For older versions:

update user set authentication_string=password('pass') where user='root';

update user set plugin='MYSQL_NATIVE_PASSWORD' where user='root';

flush privileges;

Note: The above commands should be run in mysql prompt

 

For newer versions:

alter user 'root'@'localhost' identified by 'pass';

Note: The above command should be run in mysql prompt

 

Now, try logging in without the password

mysql - u root

 

This should not work from now on.

 

Log into mysql database server with root account using the new password

mysql -u root -p

 

Create a new database

create database cloud;

Note: The above command should be run in mysql prompt

 

Exit mysql server

exit

 

Install filezilla.

Copy owncloud compressed file to your home directory (example: /home/apurwa)

 

Log into the server through ssh

Go to home folder where the owncloud file is uploaded.

cd /home/apurwa

 

Move the compressed file to apache2's document root at /var/www/html

mv owncloud-complete-20210721.tar.bz2 /var/www/html/

 

Go the the document root folder

cd /var/www/html/

 

Extract the owncloud file

tar -xvf owncloud-complete-20210721.tar.bz2

 

Give full permissions to the extracted folder.

chmod -Rv 777 owncloud

 

Install all the php dependencies

apt install -y php-intl php-zip php-dom php-mysql php-intl php-mbstring php-gd php-curl

 

Restart the web server.

systemctl restart apache2

 

Go to owncloud url and provide database details.

Database username: root

Database password: pass

Database name: cloud

Database host: localhost

 

 

 

Tags

Comments

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.