In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to install FastDFS V6.07 environment on Ubuntu20", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "how to install FastDFS V6.07 environment on Ubuntu20" this article.
The installation environment is still done using the KVM virtual machine. The development environment can be deployed on a standalone basis with FastDFS. The build environment uses distributed deployment to improve performance and reliability. Stand-alone mode is to install tracker and storage on the same machine. Although the IP is the same, you can cluster on a single machine by using different port. Distributed deployment is to install different Tracker and Storage nodes on different machines.
1. Build a Ubuntu20 virtual machine to install FastDFS.
Virtual machine settin
As in previous articles, set up the FastDFS server configuration in the virt-infra-ansible/inventory directory. Because this is for prototype verification, the hard disk configuration here is only 20g. The purpose of setting mac for each virtual machine is to bind and DNS the IP.
Because the compilation environment is required to install FastDFS, let the virtual machine perform the necessary installation in advance through virt_infra_disk_cmd:
Apt-y install git gcc gathers + make automake autoconf libtool pcre2-utils libpcre2-dev libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssh-dev wget vim
So the content of fastDfsServers.yml is as follows:
FastDfsServers: hosts: dfsServer0: ansible_python_interpreter: / usr/bin/python3 virt_infra_networks:-name: br0 type: bridge mac: "52 name 54 name: name: bridge mac:" 52 : 54 vars: virt_infra_state: running virt_infra_distro: ubuntu virt_infra_distro_image: ubuntu virt_infra_distro_image: focal-server-cloudimg-amd64.img virt_infra_autostart: yes: dfsServer2: ansible_python_interpreter: / usr/bin/python3 virt_infra_networks:-name: br0 type: bridge mac: "52 Ansible_python_interpreter: / usr/bin/python3 virt_infra_timezone: "Asia/Shanghai" virt_infra_root_password: password virt_infra_disk_size: 20 virt_infra_ram: 4094 virt_infra_ram_max: 8192 virt_infra_cpus: 4 virt_infra_cpus_max: 8 virt_infra_networks:-name: br0 type: bridge virt_infra_disk_cmd:-apt update -apt install-y net-tools-apt-get-y install git gcc gathers + make automake autoconf libtool pcre2-utils libpcre2-dev zlib1g zlib1g-dev openssl libssh-dev wget vim
One click to create a virtual machine
The virtual machine is still created according to the old routine. Log in to KVM HOST and execute:
Cd virt-infra-ansibleansible-playbook. / virt-infra.yml-- limit kvmhost,fastDfsServers
Set DHCP service binding mac and IP, set DNS service binding IP and domain name
Because here is the direct use of DHCP services provided by wireless routing, in order to bind MAC, IP directly log in to the wireless gateway through the Web page.
As mentioned in the previous article, the CoreDNS service is already installed in our environment, so we can set up domain names for fastDFS servers. The virt-infra-ansible tool writes IP to the hosts file after the virtual machine is successfully created, so you can view the IP of the virtual machine you just created through the hosts file on KVM HOST.
We installed the repositoryServer of the CoreDNS docker service before logging in
Cd / home/devops/dockerSrvStorage/corednsvi hostsfile
Add the mapping of IP to machine name / domain name.
192.168.0.116 dfsServer0 dfsTracker192.168.0.104 dfsServer1 dfsStorage0192.168.0.117 dfsServer2 dfsStorage1
two。 Install FastDFS
Https://github.com/happyfish200/fastdfs/wiki is easy to install according to the official installation guide.
Create a folder / home/fastdfs to hold files and logs managed by fastdfs.
Use the directory / usr/local/src to save the source code that needs to be compiled.
Here checkout v6.07 version of fastDFS is installed, and the other steps are basically the same as the official documentation.
Cd / usr/local/srcgit clone https://github.com/happyfish200/fastdfs.git-- depth 1cd fastdfs/git fetch-- all-- tagsgit checkout tags/V6.07-b V6.07git pull./make.sh & &. / make.sh install
3. Start FastDFS
Start the tracke and storage services:
/ etc/init.d/fdfs_trackerd start/etc/init.d/fdfs_storaged start
View the status of the fastDFS service:
/ usr/bin/fdfs_monitor / etc/fdfs/storage.conf
Set Boot self-boot
Vi / lib/systemd/system/rc-local.service and add the following: [Install] WantedBy=multi-user.targetAlias=rc-local.servic
Create / etc/rc.local, add the executable permission chmod + x / etc/rc.local, and add the following:
#! / bin/sh/etc/init.d/fdfs_trackerd start/etc/init.d/fdfs_storaged start
4. Test fastDFS
Modify the configuration in / etc/fdfs/client.conf as follows:
Base_path=/home/fastdfstracker_server=dfsServer0
Test upload
Fdfs_upload_file / etc/fdfs/client.conf / usr/local/src/nginx-1.15.4.tar.gz above are all the contents of the article "how to install FastDFS V6.07 Environment on Ubuntu20". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.