revisions. to test later

This commit is contained in:
Luke Smith 2021-06-30 16:02:27 -04:00
parent a3a3ad08aa
commit f29f26833e
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
2 changed files with 27 additions and 26 deletions

View File

@ -16,17 +16,13 @@
<h2 id="whatis">What is Nextcloud?</h2>
<p><a href="https://nextcloud.com" target="_blank">Nextcloud</a> is a free and open source solution for cloud storage. However it can also do other things, such as manage your email, notes, calender, tasks, and can even connect to the Fediverse (think Mastodon and Pleroma). Pretty much every service that Google has to offer has a much better alternative as a Nextcloud app and this is a must-have for anyone wanting to get away from Google services but still wants a traditional cloud experience (in the likes of Google Services, anyways).</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>You first need a VPS running Debian 10. Although you can use a server running any other operating system or one of your personal machines, this is what this guide will be oriented towards and you should make the necessary changes to your procedure depending on your setup. Whatever you do, do not forget to provide yourself enough storage space to fit all of the stuff you might want to store on your Nextcloud instance. To learn how to set up a VPS running Debian 10, <a href="server.html">click here</a>.</p>
<p>Also, you should have your NGINX server ready and running. For this, you can follow <a href="nginx.html">this guide</a>.</p>
<h2 id="instructions">Instructions</h2>
<p>First, we need to obtain a shell prompt by ssh-ing (remote machines or local machines) or just logging in (local machines). A traditional ssh might look like this if the domain you wished to ssh into is <code>landchad.net</code>:</p>
<code>$ ssh root@landchad.net</code>
<p>We should upgrade the system and then install packages that we might need. Run the following command:</p>
<code># apt-get full-upgrade -y && sudo apt-get install mariadb-server php-mysql php php-gd php-mbstring php-dom php-curl php-zip php-simplexml php-xml -y</code>
<pre><code>ssh root@landchad.net</code></pre>
<p>We should upgrade the system and then install packages that we might need. Run the following command:</p>
<pre><code>apt-get full-upgrade -y && sudo apt-get install mariadb-server php-mysql php php-gd php-mbstring php-dom php-curl php-zip php-simplexml php-xml -y</code></pre>
<p>Next, we need to set up our SQL database by running a Secure Installation and creating the tables that will store data that Nextcloud will need. Run the following command:</p>
<code># mysql_secure_installation</code>
<pre><code>mysql_secure_installation</code></pre>
<p>When it asks for root a password, say yes and input a new and secure password. The root password here is just for the SQL database, not for the GNU/Linux system.</p>
<p>Answer the rest of the questions as follows:</p>
<pre><code>Remove anonymous users? [Y/n]: Y
@ -35,25 +31,28 @@ Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y</code>
</pre>
<p>Next, sign into the SQL database with the new and secure password you chose before. Run the following command:</p>
<code># mysql -u root -p</code>
<pre><code>mysql -u root -p</code></pre>
<p>We need to create a database for Nextcloud. Follow the instructions below and change some of the placeholders as you wish:</p>
<code>MariaDB> CREATE DATABASE nextcloud;</code><br>
<code>MariaDB> GRANT ALL ON nextcloud.* TO '[INSERT ANY USERNAME HERE]'@'localhost' IDENTIFIED BY '[INSERT STRONG PASSWORD HERE]';</code><br>
<code>MariaDB> FLUSH PRIVILEGES;</code><br>
<code>MariaDB> EXIT;</code><br>
<pre><code>CREATE DATABASE nextcloud;
GRANT ALL ON nextcloud.* TO '<strong>username</strong>'@'localhost' IDENTIFIED BY '<strong>password</strong>';
FLUSH PRIVILEGES;
EXIT;</code></pre>
<p>Start and enable the php-fpm and the mariadb services:</p>
<code># systemctl enable php-fpm && systemctl start php-fpm && systemctl enable mariadb && systemctl start mariadb</code>
<pre><code>systemctl enable php-fpm
systemctl start php-fpm
systemctl enable mariadb
systemctl start mariadb</code></pre>
<p>Next, we need to download the latest release tarball of Nextcloud. Go to <a>https://nextcloud.com/install/#instructions-server</a> and copy the URL of the the .tar.bz2 tarball from the More Downloads dropdown menu then go to your server's shell prompt and download the tarball with wget. Here is an example:</p>
<code># wget https://download.nextcloud.com/server/releases/nextcloud-21.0.2.tar.bz2</code>
<pre><code>wget https://download.nextcloud.com/server/releases/nextcloud-21.0.2.tar.bz2</code></pre>
<p>If you already have your LandChad property set up (your web site) we can simply extract the tarball there so we don't have to do any messing around with Nginx at the moment. You may wish to have a subdomain instead, but that is out of the scope of this tutorial. Run the following command:</p>
<code># tar -xjf nextcloud*.tar.bz2 -C /var/www/html/[WHERE EVER YOUR WEBSITE IS STORED]</code>
<pre><code>tar -xjf nextcloud*.tar.bz2 -C /var/www/<strong>yourwebsitedirectory</strong></code></pre>
<p>If you have multiple Nextcloud tarballs in the current working directory you might want to manually specify which one you wish to extract.</p>
<p>Let's correct the ownership and permissions of those files. Run the following commands after you fill in the placeholders:</p>
<pre><code># chown -R www-data:www-data /var/www/html/[WHERE EVER YOUR WEBSITE IS STORED]/nextcloud
# chmod -R 755 /var/www/html/[WHERE EVER YOUR WEBSITE IS STORED]/nextcloud</code>
<pre><code>chown -R www-data:www-data /var/www/<strong>yourwebsitedirectory</strong>/nextcloud
chmod -R 755 /var/www/<strong>yourwebsitedirectory</strong>/nextcloud</code>
</pre>
<p>Now we need to head to Nextcloud's web interface. Go to your web browser and go to your website, but go to the subdirectory "nextcloud" instead. For example, if your domain is landchad.net and you have set up HTTPS then go to <code>https://landchad.net/nextcloud</code>. This will launch the configuration wizard.</p>
<ul>
<li>Choose an admin username and secure password.
<li>Leave Data folder at the default value unless it is incorrect.
@ -63,12 +62,12 @@ Reload privilege tables now? [Y/n]: Y</code>
<li>Leave "localhost" as "localhost".
<li>Click Finish
</ul>
<p>Congratulations, you have set up your own Nextcloud instance.</p>
<h2 id="whatsnext">What's Next?</h2>
<p>Now you may be wondering: What do I do now? Here are some suggestions:</p>
<ul>
<li>Rice your Nextcloud instance by changing your themeing and installing new themes and plugins in Settings in the Nextcloud Web Interface.
<li>Install the Nextcloud Client on your personal computer and sync your files to your instance.
@ -78,13 +77,13 @@ Reload privilege tables now? [Y/n]: Y</code>
<li>Write notes in Markdown inside the Nextcloud Notes web and mobile app.
<li>Set the Nextcloud Dashboard as your web browser's homepage (it is pretty nice).
</ul>
<p>Enjoy your cloud services in freedom.</p>
<hr>
<p><em>Written by <a href="https://github.com/MattMadness">Matthew "Madness" Evan</a></em></p>
<!--<span class=next><a href="<++>">Next:<++></a></span>--!>
</main>

View File

@ -64,6 +64,8 @@ pre {
margin: auto ;
}
.wide { max-width: inherit ; }
p img, li img, h1 img, h2 img, h3 img, h4 img {
vertical-align: middle ;
max-width: 1em;