0167.html 4.9 KB

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