In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Download the package
Wget https://download.nextcloud.com/server/releases/nextcloud-17.0.2.zip
Unzip nextcloud-17.0.2.zip # extract the package
Mkdir / data-pv # create a total data storage directory
Mkdir / data/data/ # create a data storage directory (used to store files uploaded by users)
Mv nextcloud / data/ # Mobile Network disk Program Directory
Chown-R nginx.nginx / data/ # change all subordinate groups to nginx
two。 Install php7.2
Yum install https://mirror.webtatic.com/yum/el7/webtatic-release.rpm-y
# install the source of php package
Yum-y install php72w.x86_64 php72w-cli.x86_64 php72w-common.x86_64 php72w-gd.x86_64 php72w-ldap.x86_64 php72w-mbstring.x86_64 php72w-mysql.x86_64 php72w-pdo.x86_64 php72w-pear.noarch php72w-process.x86_64 php72w-xml.x86_64 php72w-xmlrpc.x86_64 php72w-fpm.x86_64
# install php7.2
Vim / etc/php-fpm.d/www.conf # modify php configuration
3. Install and configure nginx
Yum install nginx-y # install nginx
Vim / etc/nginx/nginx.conf # modify nignx configuration file
Server {listen 80 default_server; listen [:]: 80 default_server; server_name _; root / data/nextcloud; index index.html index.htm index.php; # Load configuration files for the default server block. Include / etc/nginx/default.d/*.conf;location / {try_files $uri $uri/ / index.php$uri;} location ~. *\. (php | php5) (. *)? $# Note this block, configure the rewritten url {fastcgi_pass 127.0.0.1 fastcgi_pass 9000; fastcgi_index index.php; fastcgi_split_path_info ^ (. +\ .php) (/. +) $; fastcgi_param PATH_INFO $fastcgi_path_info # enable pathinfo fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi.conf;}} 4. Login configuration
The browser enters the ip address
# configure as shown above, and finally click finish
PS: note
If the domain name is not on record, you may be able to access it through the domain name today, and you will be prompted for the record in two or three days (it cannot be opened through the domain name at this time)
Row the wrong crater
Error 1
# this kind of error report is to change the folder owner of nextcloud to the user started by php
Error 2
# unlimited card login error, this is because php cannot create a session folder or the folder owner is incorrect
Mkdir / var/lib/php/session-pv # create folder
Chown-R nginx.nginx / var/lib/php/ # modify owner
Error 3
# this error is caused by incorrect configuration of nginx. You can configure nginx correctly. Please refer to the above code
Error 4
# this kind of error report is that nignx has upload restrictions. Add the code "client_max_body_size 512m;" to the http section of nginx so that the upload limit can be raised to 512m.
Error 5
# configure the account database and report an error when logging in. This is because nginx does not enable pathinfo for php forwarding, and does not recognize the url path after .php / xxxx and does not forward it to php for processing. Just turn on pathinfo. The above nginx configuration is enabled. Just copy it according to it.
Error 6
# vim / data/nextcloud/config/config.php # Edit the php configuration file of nextcloud
Add certificates based on ssl access
Add the following code to the server section
Listen 443 ssl; # listen port 443, ssl do not forget to add server_name www.xxx.com.cn; ssl_certificate / etc/nginx/ssl/1.pem; ssl_certificate_key / etc/nginx/ssl/2.key; # certificate, go to Aliyun to apply for free ssl_session_timeout 5m Ssl_ciphers ECDHEluRSAtel AES128Mugashi SHA256 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; if permanent ($server_port = 80) {rewrite ^ (. *) $https://$host$1 permanent } # this code is to return the http request to the https extension-backup and restore
# data this folder is all the user information and account permissions, backup this folder can back up all the data, tested feasible.
Docker method installation
Yum install docker-y # install docker
Systemctl restart dockerk # launch docker
Docker pull rootlogin/nextcloud # removes the image of the network disk. This step depends on the network quality.
Mkdir / data/data666-pv # establish the storage data folder of the network disk
Docker run-d-- name nextcloud-p 90:80-v / data/data666:/data rootlogin/nextcloud
# create a container name as nextcloud. Map port 80 of the container to port 90 of the host. The "/ data" folder of the container is mapped to the "/ data/data666" folder of the host. The use of "rootlogin/nextcloud" for the mirror is pulled before.
# use port 90 to access and upload files
# cd to the / data/data666 folder of the host, you can see that there is already data in it. The data in this is the data generated by the nextcloud container. These files are the nextcloud user's data and account information, which can be stored persistently, and the container restart data is still not lost.
# cd to admin's account, you can see the test data we uploaded just now.
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.