In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to understand the sftp server service SftpGo, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
SftpGo is a high-performance, full-featured, easy-to-use and configurable sftp server service based on go development. Currently, it can run stably under linux and macos (windows has not been tested). Data can be persisted to mainstream databases, such as Mysql, PostgreSQL, Sqlilte.
Main components of sftpgo
Server main program: sftpgosever
Cli script: sftpcli
Data catalog
Conf Storage Service Profil
Data creates a sftp user directory
Backups stores application backup data
This is based on K8s running service, mysql5.7 for persistent storage, Tencent Cloud NFS service for data directory, configmap mount configuration file, and nginx stream provides domain name mapping tcp access.
Build image directly pull docker pull taylordang/sftpgo:v1.0 local build based on Dockerfile to view specific documents: [https://github.com/dtcka/sftpgo/tree/master/docker/sftpgo/alpine](https://github.com/dtcka/sftpgo/tree/master/docker/sftpgo/alpine) build scaffolding build script: [https://github.com/dtcka/sftpgo/blob/master/docker/rest-api-cli/Dockerfile](https:/ / github.com/dtcka/sftpgo/blob/master/docker/rest-api-cli/Dockerfile) Standard profile {"sftpd": {"bind_port": 2022 "bind_address": "0.0.0.0", "idle_timeout": 15, "max_auth_tries": 0, "umask": "0022", "banner": "," upload_mode ": 0 "actions": {"execute_on": [], "command": "," http_notification_url ":"}, "keys": [], "kex_algorithms": [] "ciphers": [], "macs": [], "login_banner_file": "", "setstat_mode": 0, "enabled_ssh_commands": ["md5sum", "sha1sum" "cd", "pwd", "scp"], "keyboard_interactive_auth_program": "", "proxy_protocol": 0, "proxy_allowed": []} "data_provider": {"driver": "mysql", "name": "sftpgo", "host": "xxxxxx", "port": 9999, "username": "sftpgo", "password": "xxxxx", "sslmode": 0 "connection_string": "," users_table ":" users "," manage_users ": 1," track_quota ": 2," pool_size ": 0," users_base_dir ":" "actions": {"execute_on": [], "command": "," http_notification_url ":"}, "external_auth_program": "", "external_auth_scope": 0 "credentials_path": "credentials", "pre_login_program": ""}, "httpd": {"bind_port": 8080, "bind_address": "0.0.0.0", "templates_path": "templates" "static_files_path": "static", "backups_path": "backups", "auth_user_file": "", "certificate_file": "", "certificate_key_file": ""}} run the application
After the above service configuration is ready, the running container will automatically generate the corresponding table in the database.
Provide services for external storage 1. Set the private network service entry apiVersion: v1kind: Servicemetadata: name: sftpgo namespace: clusterIP: xxxx externalTrafficPolicy: Cluster ports:-name: 8080-8080-tcp nodePort: 31807 port: 8080 protocol: TCP targetPort: 8080-name: 2022-2022-tcp nodePort: 30865 port: 2022 protocol: TCP targetPort: 2022 selector: k8s-app: sftpgo qcloud-app: sftpgo sessionAffinity: None type: LoadBalancerstatus: loadBalancer: ingress:-ip: xxxx2. Set up external service portals
-nginx configuration file ````apiVersion: v1 data: nginx.conf: |-user nginx; worker_processes auto; error_log / var/log/nginx/error.log warn; pid / var/run/nginx.pid; events {worker_connections 1024;} stream {server {listen 2022; private network ip:2022;} kind: ConfigMap metadata: name: tcp-config namespace: sftp
# 3. Test the service status and data directory permissions! [image.png] (https://oscimg.oschina.net/oscnet/up-bee83bd7e27b4e982526a9d3c88a450f7fe.png) test ok: data permissions UID GID needs to be set to 1003.# 4. Set the externalIps of domain name resolution to nginx to achieve domain name access! [image.png] (attached to https://oscimg.oschina.net/oscnet/up-331b767e5d7c85d5f06f1a9c01daa105227.png)---:
After reading the above, have you mastered how to understand the sftp server service SftpGo? If you want to learn more skills or 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.