Maximum PC

PICK A DATABASE

-

As well as a web server, OwnCloud also needs a database. You have two main choices here: MySQL or SQLite. SQLite is simple and lightweigh­t, and perfectly sufficient for a small home setup, and that’s what we’ve used in the instructio­ns here. There are a few reasons for using MySQL instead, however—for instance, you may want a larger setup serving several users, or you are already running MySQL on your computer, in which case, it’s more efficient to use a single database server.

It’s also recommende­d that you use MySQL if you want to use the desktop sync clients. If you want to use MySQL, it’s easiest to do this right from the start by running

$ sudo apt-get install php5-mysql when you install the rest of the PHP components. If this also installs MySQL for the first time, you are prompted for an admin password for the database— don’t forget it. When you load OwnCloud for the first time, the database options include MySQL, where you can pick a database name, along with a username and password. These are used only by OwnCloud for accessing the database— don’t use your normal login details. If you start with SQLite, and later decide to switch to MySQL, the OwnCloud command-line tool, occ, has an option to make the conversion for you: $ sudo -u www-data php occ db:convert-type --all-apps mysql oc_admin 127.0.0.1 ownclouddb

You run it as the user owning the existing database— --all-apps simply tells it to convert all apps, not just the enabled ones. The following options are the type of database to create (mysql), the username to admin that database, its IP address, and the name of the database itself. This creates a suitable database in MySQL, migrates your data, and also alters OwnCloud’s configurat­ion to use that database.

Newspapers in English

Newspapers from United States