{"id":91,"date":"2017-06-26T11:06:15","date_gmt":"2017-06-26T14:06:15","guid":{"rendered":"http:\/\/xaxowareti.com.br\/?p=91"},"modified":"2017-06-26T11:06:15","modified_gmt":"2017-06-26T14:06:15","slug":"how-to-install-and-configure-owncloud-on-centos-7","status":"publish","type":"post","link":"https:\/\/xaxowareti.com.br\/?p=91","title":{"rendered":"How To Install and Configure ownCloud on CentOS 7"},"content":{"rendered":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>ownCloud is a file sharing server that permits you to store your personal content, like documents and pictures, in a centralized location, much like Dropbox. The difference with ownCloud is that it is free and open-source, which allows anyone to use and examine it. It also returns the control and security of your sensitive data back to you, thus eliminating the utilization of a third-party cloud hosting service.<\/p>\n<p>In this tutorial, we will install and configure an ownCloud instance on a CentOS 7 server.<\/p>\n<div data-unique=\"prerequisites\"><\/div>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<p>In order to complete the steps in this guide, you will need the following:<\/p>\n<ul>\n<li><strong>A sudo user on your server<\/strong>: You can create a user with sudo privileges by following the <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/initial-server-setup-with-centos-7\">CentOS 7 initial server setup guide<\/a>.<\/li>\n<li><strong>A LAMP stack<\/strong>: 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. Follow <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-7\">this guide<\/a> to install and configure this software.\n<ul>\n<li>To take full advantage of all the features that ownCloud has to offer, make sure to install the following PHP modules: <code>php-gd<\/code>, <code>php-intl<\/code>, <code>php-mbstring<\/code>, <code>php-process<\/code>, and <code>php-xml<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>An SSL certificate<\/strong>: How you set this up depends on whether or not you have a domain name that resolves to your server.\n<ul>\n<li><strong>If you have a domain name&#8230;<\/strong> the easiest way to secure your site is with Let&#8217;s Encrypt, which provides free, trusted certificates. Follow the <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-secure-apache-with-let-s-encrypt-on-centos-7\">Let&#8217;s Encrypt guide for Apache<\/a> to set this up.<\/li>\n<li><strong>If you do not have a domain&#8230;<\/strong> and you are just using this configuration for testing or personal use, you can use a self-signed certificate instead. This provides the same type of encryption, but without the domain validation. Follow the <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-create-an-ssl-certificate-on-apache-for-centos-7\">self-signed SSL guide for Apache<\/a> to get set up.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div data-unique=\"step-1-\u2013-installing-owncloud\"><\/div>\n<h2 id=\"step-1-\u2013-installing-owncloud\">Step 1 \u2013 Installing ownCloud<\/h2>\n<p>The ownCloud server package does not exist within the default repositories for CentOS. However, ownCloud maintains a dedicated repository for the distro.<\/p>\n<p>To begin, import their release key with the <code>rpm<\/code> command. The key authorizes the package manager <code>yum<\/code>to trust the repository.<\/p>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\">sudo rpm &#8211;import https:\/\/download.owncloud.org\/download\/repositories\/stable\/CentOS_7\/repodata\/repomd.xml.key<\/li>\n<\/ul>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<p>Next, use the <code>curl<\/code> command to download the ownCloud repository file:<\/p>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\">sudo curl -L https:\/\/download.owncloud.org\/download\/repositories\/stable\/CentOS_7\/ce:stable.repo -o \/etc\/yum.repos.d\/ownCloud.repo<\/li>\n<\/ul>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<p>After adding the new file, use the <code>clean<\/code> command to make <code>yum<\/code> aware of the change:<\/p>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\">sudo yum clean expire-cache<\/li>\n<\/ul>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<pre class=\"code-pre \"><code><\/code><\/pre>\n<div class=\"secondary-code-label \" title=\"Output\">Output<\/div>\n<pre class=\"code-pre \"><code>Loaded plugins: fastestmirror\r\nCleaning repos: base ce_stable extras updates\r\n6 metadata files removed\r\n<\/code><\/pre>\n<p>Finally, perform the installation of ownCloud using the <code>yum<\/code> utility and the <code>install<\/code> command:<\/p>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\">sudo yum install owncloud<\/li>\n<\/ul>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<p>When prompted with <code>Is this ok [y\/d\/N]:<\/code> message, type <code>Y<\/code> and press the <code>ENTER<\/code> key to authorize the installation.<\/p>\n<pre class=\"code-pre \"><code><\/code><\/pre>\n<div class=\"secondary-code-label \" title=\"Output\">Output<\/div>\n<pre class=\"code-pre \"><code>. . .\r\nInstalled:\r\n  owncloud.noarch 0:9.1.1-1.2                                                                                               \r\n\r\nDependency Installed:\r\n  libX11.x86_64 0:1.6.3-2.el7              libX11-common.noarch 0:1.6.3-2.el7      libXau.x86_64 0:1.0.8-2.1.el7            \r\n  libXpm.x86_64 0:3.5.11-3.el7             libpng.x86_64 2:1.5.13-7.el7_2          libxcb.x86_64 0:1.11-4.el7               \r\n  libxslt.x86_64 0:1.1.28-5.el7            owncloud-deps-php5.noarch 0:9.1.1-1.2   owncloud-files.noarch 0:9.1.1-1.2        \r\n  php-gd.x86_64 0:5.4.16-36.3.el7_2        php-ldap.x86_64 0:5.4.16-36.3.el7_2     php-mbstring.x86_64 0:5.4.16-36.3.el7_2  \r\n  php-process.x86_64 0:5.4.16-36.3.el7_2   php-xml.x86_64 0:5.4.16-36.3.el7_2      t1lib.x86_64 0:5.1.2-14.el7              \r\n\r\n<span class=\"highlight\">Complete!<\/span>\r\n<\/code><\/pre>\n<p>With the ownCloud server installed, we will move on to setting up a database for it to use.<\/p>\n<div data-unique=\"step-2-\u2013-creating-a-mysql-database\"><\/div>\n<h2 id=\"step-2-\u2013-creating-a-mysql-database\">Step 2 \u2013 Creating a MySQL Database<\/h2>\n<p>To get started, log into MySQL with the administrative account:<\/p>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\">mysql -u root -p<\/li>\n<\/ul>\n<pre class=\"code-pre command\"><code><\/code><\/pre>\n<p>Enter the password you set for the MySQL root user when you installed the database server.<\/p>\n<p>ownCloud requires a separate database for storing administrative data. While you can call this database whatever you prefer, we decided on the name <code>owncloud<\/code> to keep things simple.<\/p>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\" style=\"padding: 0px !important; font-weight: 400; box-sizing: border-box; list-style: disc outside none; white-space: pre; line-height: 1.5 !important; margin: 0px !important 0px !important 3px 20px;\">CREATE DATABASE owncloud;<\/li>\n<\/ul>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<p><span class=\"note\"><strong>Note:<\/strong> Every MySQL statement must end with a semi-colon (;). Be sure to check that this is present if you are experiencing an issue.<br \/>\n<\/span><\/p>\n<p>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 <code>owncloud<\/code> in this guide.<\/p>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\" style=\"padding: 0px !important; font-weight: 400; box-sizing: border-box; list-style: disc outside none; white-space: pre; line-height: 1.5 !important; margin: 0px !important 0px !important 3px 20px;\">GRANT ALL ON owncloud.* to &#8216;owncloud&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;<span class=\"highlight\">set_database_password<\/span>&#8216;;<\/li>\n<\/ul>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<p><span class=\"warning\"><strong>Warning:<\/strong> Be sure to put an actual password where the command states: <code><span class=\"highlight\">set_database_password<\/span><\/code><br \/>\n<\/span><\/p>\n<p>With the user assigned access to the database, perform the flush-privileges operation to ensure that the running instance of MySQL knows about the recent privilege assignment:<\/p>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\" style=\"padding: 0px !important; font-weight: 400; box-sizing: border-box; list-style: disc outside none; white-space: pre; line-height: 1.5 !important; margin: 0px !important 0px !important 3px 20px;\">FLUSH PRIVILEGES;<\/li>\n<\/ul>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<p>This concludes the configuration of MySQL, therefore we will quit the session by typing:<\/p>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<ul class=\"prefixed\">\n<li class=\"line\" style=\"padding: 0px !important; font-weight: 400; box-sizing: border-box; list-style: disc outside none; white-space: pre; line-height: 1.5 !important; margin: 0px !important 0px !important 3px 20px;\">exit<\/li>\n<\/ul>\n<pre class=\"code-pre custom_prefix\"><code><\/code><\/pre>\n<p>With the ownCloud server installed and the database set up, we are ready to turn our attention to configuring the ownCloud application.<\/p>\n<div data-unique=\"step-3-\u2013-configuring-owncloud\"><\/div>\n<h2 id=\"step-3-\u2013-configuring-owncloud\">Step 3 \u2013 Configuring ownCloud<\/h2>\n<p>To access the ownCloud web interface, open a web browser and navigate to the following address:<\/p>\n<pre class=\"code-pre \"><code>https:\/\/<span class=\"highlight\">server_domain_or_IP<\/span>\/owncloud\r\n<\/code><\/pre>\n<p>If a self-signed certificate is being used, you will likely be presented with a warning because the certificate is not signed by one of your browser&#8217;s trusted authorities. This is expected and normal. We are only interested in the encryption aspect of the certificate, not the third-party validation of our host&#8217;s authenticity. Click the appropriate button or link to proceed to the ownCloud setup page.<\/p>\n<p>You should see something like this:<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/admin_page.png\" alt=\"ownCloud Admin Page\" \/><\/p>\n<p>Create an admin account by choosing a username and a password. For security purposes it is not recommended to use something like &#8220;admin&#8221; for the username.<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/admin_user.png\" alt=\"ownCloud Admin Account\" \/><\/p>\n<p>Before clicking the <strong>Finish setup<\/strong> button, click on the <strong>Storage &amp; database<\/strong> link:<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/db_configure.png\" alt=\"ownCloud Database Configure\" \/><\/p>\n<p>Leave the <strong>Data folder<\/strong> setting as-is and click the <strong>MySQL\/MariaDB<\/strong> button in the <strong>Configure the database<\/strong> section.<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/db_settings.png\" alt=\"ownCloud Database Settings\" \/><\/p>\n<p>Enter the database information that you configured in the previous step. Below is an example, which matches the database credentials that we used in this guide:<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/db_example.png\" alt=\"ownCloud Database Example\" \/><\/p>\n<p>Click the <strong>Finish setup<\/strong> button to sign into ownCloud. <strong>A safe home for all your data<\/strong> splash screen should appear:<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/welcome_screen.png\" alt=\"ownCloud Welcome Screen\" \/><\/p>\n<p>Click the <strong>x<\/strong> in the top-right corner of the splash screen to access the main interface:<\/p>\n<p class=\"growable\"><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/owncloud_install_centos_7\/main_interface.png\" alt=\"ownCloud Main Interface\" \/><\/p>\n<p>Here, you can create or upload files to your personal cloud.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction ownCloud is a file sharing server that permits you to store your personal content, like documents and pictures, in a centralized location, much like Dropbox. The difference with ownCloud is that it is free and open-source, which allows anyone to use and examine it. It also returns the control and security of your sensitive [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-dicassolucoes"],"_links":{"self":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=91"}],"version-history":[{"count":1,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}