0167.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Installing ownCloud on Linux (Debian 10)</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Linux,ownCloud,PHP,Apache,Self-Hosted,Cloud Solution,HowTo,Tutorial,i12bretro,Web Based Tools">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Installing ownCloud on Linux (Debian 10)">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Installing ownCloud on Linux (Debian 10)</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Log into the Debian device</li>
  26. <li>Run the following commands in a terminal:
  27. <div class="codeBlock"># update repositories and install any available software updates<br />
  28. sudo apt-get update<br />
  29. sudo apt-get upgrade<br />
  30. # install Apache HTTPD and MySQL<br />
  31. sudo apt-get install apache2 mariadb-server mariadb-client<br />
  32. # install PHP components<br />
  33. sudo apt-get install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-intl php7.3-json php7.3-gd php7.3-mbstring php7.3-mysql php7.3-xml php7.3-zip<br />
  34. # configure the MySQL database<br />
  35. sudo su<br />
  36. mysql_secure_installation</div>
  37. </li>
  38. <li>Press Enter to login as root</li>
  39. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  40. <li>Type Y and press Enter to remove anonymous users</li>
  41. <li>Type Y and press Enter to disallow root login remotely</li>
  42. <li>Type Y and press Enter to remove the test database</li>
  43. <li>Type Y and press Enter to reload privilege tables</li>
  44. <li>Run the following command to login into MySQL:
  45. <div class="codeBlock">mysql -u root -p</div>
  46. </li>
  47. <li>Authenticate with the root password set earlier</li>
  48. <li>Run the following commands to create the Owncloud database and database user
  49. <div class="codeBlock">MariaDB [(none)]&gt; CREATE DATABASE ownclouddb;<br />
  50. MariaDB [(none)]&gt; GRANT ALL ON ownclouddb.* to &#39;ownclouduser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;ownCl0ud!!&#39;;<br />
  51. MariaDB [(none)]&gt; FLUSH PRIVILEGES;<br />
  52. MariaDB [(none)]&gt; EXIT;<br />
  53. exit</div>
  54. </li>
  55. <li>Continue with the following commands to download and extract Owncloud in the Apache webroot
  56. <div class="codeBlock"># download latest owncloud version<br />
  57. sudo wget https://download.owncloud.org/community/owncloud-latest.tar.bz2<br />
  58. # extract owncloud-latest.tar.bz2<br />
  59. sudo mkdir /var/www/owncloud<br />
  60. sudo tar -xvf owncloud-latest.tar.bz2 --directory /var/www<br />
  61. # set the owner of the new owncloud directory to www-data<br />
  62. sudo chown -R www-data:www-data /var/www/owncloud<br />
  63. # create a new owncloud.conf file to configure the site<br />
  64. sudo nano /etc/apache2/sites-available/owncloud.conf</div>
  65. </li>
  66. <li>Paste the following configuration into owncloud.conf
  67. <p>Alias /owncloud &quot;/var/www/owncloud/&quot;<br />
  68. &lt;Directory /var/www/owncloud/&gt;<br />
  69. Options +FollowSymlinks<br />
  70. AllowOverride All<br />
  71. <br />
  72. &lt;IfModule mod_dav.c&gt;<br />
  73. Dav off<br />
  74. &lt;/IfModule&gt;<br />
  75. <br />
  76. SetEnv HOME /var/www/owncloud<br />
  77. SetEnv HTTP_HOME /var/www/owncloud<br />
  78. &lt;/Directory&gt;</p>
  79. </li>
  80. <li>Press CTRL+O, Enter, CTRL+X to write the changes to owncloud.conf</li>
  81. <li>Continue with the following commands to enable the site and restart Apache:
  82. <div class="codeBlock"># enable the Ownload site and required PHP modules<br />
  83. sudo a2ensite owncloud<br />
  84. sudo a2enmod rewrite headers env mime unique_id dav<br />
  85. # restart apache2 service for the changes to take effect<br />
  86. sudo systemctl restart apache2</div>
  87. </li>
  88. <li>Open a web browser and navigate to http://DNSorIP/owncloud</li>
  89. <li>The Owncloud setup screen should be displayed</li>
  90. <li>Enter a username and password</li>
  91. <li>Click the storage &amp; database link to expand the section</li>
  92. <li>Select MySQL and fill out the database connetion information as follows
  93. <p>username: ownclouduser<br />
  94. password: ownCl0ud!!<br />
  95. database name: ownclouddb<br />
  96. database host: localhost</p>
  97. </li>
  98. <li>Click Finish Setup</li>
  99. <li>After a few moments of setup Owncloud will be up and running</li>
  100. </ol>
  101. </div>
  102. </div>
  103. </body>
  104. </html>