Install ownCloud on openSUSE Tumbleweed for Banana Pi M1

just-the-cloud

There's a tutorial how to create an openSUSE Tumbleweed SD card with MATE. You can follow this tutorial without installing MATE but keep it headless. You can download the image from openSUSE-Tumbleweed-BananaPi-headless-20150928.tar.xz (username: root, password: linux) and continue this tutorial.

Here we'll see how to install ownCloud on openSUSE for Banana Pi M1.

At the end of this tutorial will be a link to the image with ownCloud. Please use an SD card minimum 2GB and re-partition the SD card or use a USB stick to save ownCloud data directory.

Let's start with the procedure.

1. Install ownCloud from the repository. Choose the repository because you can have automatic updates.

zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:community/openSUSE_Factory_ARM/isv:ownCloud:community.repo

zypper refresh

zypper install owncloud

Don't be scared because this is factory repository. This is the official from ownCloud and it's the only one that is for ARM boards.

This will install all nessesary files. It will install apache2 and mariadb. At the end, it'll ask you if you want to see info about seting up mariadb.

You just installed MySQL server for the first time.

You can start it using:
rcmysql start

During first start empty database will be created for your automatically.

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

Regarding the servers apache and mariadb. If you're the only one user for ownCloud and don't have problem with speed, then you can use sqlite. If you have more users for the instance, then it's better to use mariadb. It's the same with apache. For lighter installations, you can use lighttpd or ngnix. Here I used apache2 but about database, it's up to you. You can either use sqlite or setup a mariadb darabase.

To setup a mariadb database, follow the commands.

mysql -u root -p

CREATE DATABASE owncloudb;

GRANT ALL ON owncloudb.* TO ocuser@localhost IDENTIFIED BY 'dbpass';

2. Change the file php.ini.

nano /etc/php5/apache2/php.ini

and change the strings (you can search by pressing control+w).

post_max_size = 50G
upload_max_filesize = 25G
max_file_uploads = 200
max_input_time = 3600
max_execution_time = 3600
session.gc_maxlifetime = 3600
memory_limit = 512M

3. Start the webserver.

systemctl start apache2.service
systemctl enable apache2.service

4. Create the data directory

It is recommended to use a data directory located on another partition of your SD card or a USB stick. The image requires minimum 2GB SD card, so you won't have enough storage to save your data.

Let's say you have a USB and you mounted under /mnt/USB folder. Create a directory and also give the right permissions.

mkdir /mnt/USB/owncloud_data
chmod -R 0770 /mnt/USB/owncloud_data
chown wwwrun /mnt/USB/owncloud_data

5. Final ownCloud installation.

Open your browser to the IP of your Banana Pi

http://IP_of_Banana_Pi/owncloud

Set a username/password for administrator. Choose a username other than admin, root, administrator, superuser because of your safety.
Then you have to set the date folder (remember our example is /mnt/USB/owncloud_data)
Choose if you want mariadb or sqlite.

If it's mariadb, then you should create the database

mysql -u root -p

CREATE DATABASE owncloudb;

GRANT ALL ON owncloudb.* TO ocuser@localhost IDENTIFIED BY 'dbpass';

DATABASE: owncloudb
USER: ocuser
PASSWORD: dbpass
HOST: localhost


and you're all set.

You can download the file openSUSE-Tumbleweed-20150930-BananaPi-ownCloud-8.1.3.tar.xz and just setup ownCloud as described on fifth step.

Δεν υπάρχουν σχόλια

Από το Blogger.