In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to use Nestcloud in raspberry pie. I hope you will learn something after reading this article. Let's discuss it together.
Necessary preparatory work
If you want to use Nextcloud easily, you need some necessary preparatory work. First, you need a domain name that points to Nextcloud. For convenience, nextcloud.pi-nas.com will be used in this article. If you are running on a home network, you need to configure the DNS service for the domain name (dynamic domain name resolution service) and enable port 80 and port 443 forwarding in the router (if you need to use https, you need to enable port 443 forwarding, if only the http,80 port is sufficient).
You can use ddclient to automatically update DNS in raspberry pie.
Install Nextcloud
To run Nextcloud in the raspberry pie (see the step settings in *), first install some of the following dependent packages with the command apt.
Sudo apt install unzip wget php apache2 mysql-server php-zip php-mysql php-dom php-mbstring php-gd php-curl
Second, download Nextcloud. Use wget to download the version of raspberry pie. In this article, we connect two disk drives to the raspberry pie, one for storing current data and the other for backup. Here Nextcloud is installed on the data storage disk to ensure that the data is automatically backed up every night.
Sudo mkdir-p / nas/data/nextcloudsudo chown pi / nas/data/nextcloudcd / nas/data/wget https://download.nextcloud.com/server/releases/nextcloud-14.0.0.zip-O / nas/data/nextcloud.zipunzip nextcloud.zipsudo ln-s / nas/data/nextcloud / var/www/nextcloudsudo chown-R www-data:www-data / nas/data/nextcloud
As of this writing, the Nextcloud * * version has been updated to version 14.0.0 as shown in the above code. Nextcloud is in a rapid iterative update, so you can install a newer version in your raspberry pie.
Configuration database
As mentioned above, the Nextcloud installation is complete. When you installed the dependency package, you installed the MySQL database to store some important data about Nextcloud (for example, information about users you created that can access Nextcloud). If you prefer to use the Pstgres database, the above dependency package needs to be adjusted.
Start MySQL with root privileges:
Sudo mysql
This opens the SQL prompt interface, where you can insert the following instruction-- replace the placeholder with the database connection password-- to create a database for Nextcloud.
CREATE USER nextcloud IDENTIFIED BY'; CREATE DATABASE nextcloud;GRANT ALL ON nextcloud.* TO nextcloud
Press Ctrl+D or enter quit to exit the SQL prompt interface.
Web server configuration
Nextcloud can be configured to adapt to the environment in which the Nginx server or other Web server is running. But in this article, I decided to run the Apache server in my raspberry pie NAS (if you have other server options that work better, share it with me, too).
First create a virtual host for your Nextcloud domain name, create a configuration file / etc/apache2/sites-available/001-netxcloud.conf, and enter the following parameters. Change ServerName to your domain name.
ServerName nextcloud.pi-nas.comServerAdmin admin@pi-nas.comDocumentRoot / var/www/nextcloud/ AllowOverride None
Use the following command to start the virtual host.
A2ensite 001-nextcloudsudo systemctl reload apache2
You should now be able to access the web server by entering a domain name in your browser. Here I recommend using the HTTPS protocol instead of the HTTP protocol to access Nextcloud. A simple and free way is to use Certbot to download the Let's Encrypt certificate, and then set up scheduled tasks to automatically refresh. This avoids the trouble of self-signed certificates and so on. Refer to how to install Certbot in raspberry pie. When configuring Certbot, you can even configure to automatically transfer HTTP to HTTPS, such as accessing http://nextcloud.pi-nas.com to automatically jump to https://nextcloud.pi-nas.com. Note that if your raspberry pie NAS runs under your home router, don't forget to set up port 443 and port 80 forwarding on the router.
Configure Nextcloud
* one step, access Nextcloud through the browser to configure it. Enter the domain name address in the browser and insert the database settings information above. Here, you can create a Nextcloud administrator user. By default, the data storage directory is in the Nextcloud directory, so you don't need to modify the backup strategy we set in the second article.
The page then jumps to the Nextcloud login screen and logs in with the administrator user you just created.
After reading this article, I believe you have a certain understanding of "how to use Nestcloud in raspberry pie". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.