【IPFS】IPFS部署分布式项目到应用服务器的实践

简介: 前言上一篇文章主要做了本地开发机的环境安装和demo运行,算是对IPFS有了一些认识,具体查看http://blog.csdn.net/diandianxiyu_geek/article/details/77171820,这次部署在对外网开放的服务器上,解决遇到的小问题和体会分布式部署到节点。

前言

上一篇文章主要做了本地开发机的环境安装和demo运行,算是对IPFS有了一些认识,具体查看http://blog.csdn.net/diandianxiyu_geek/article/details/77171820,这次部署在对外网开放的服务器上,解决遇到的小问题和体会分布式部署到节点。

服务器环境


//查看nginx版本
[root@xxxxxxxxxxxx ~]# nginx -v
nginx version: nginx/1.9.7

//查看php版本
[root@xxxxxxxxxxxxxxxxxx ~]# php -v
PHP 7.0.0 (cli) (built: Dec 10 2015 10:56:28) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

//查看mysql版本
[root@xxxxxxxxx ~]# mysql --help | grep Distrib 
mysql  Ver 14.14 Distrib 5.6.28, for Linux (x86_64) using  EditLine wrapper

实践

为了保证安装过程中失误造成不必要的损失,最好备份下服务器磁盘快照~

[root@xxxxxxxxx ipfs_zip]# wget https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
--2017-08-15 10:09:35--  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Resolving dist.ipfs.io (dist.ipfs.io)... 147.135.130.181, 217.182.195.23
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8580949 (8.2M) [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz0% [                                       ] 32,223      --.-K/s   in 0s      

2017-08-15 10:09:37 (132 MB/s) - Connection closed at byte 32223. Retrying.

--2017-08-15 10:09:38--  (try: 2)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8548726 (8.2M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz0% [                                       ] 64,389      --.-K/s   in 0s      

2017-08-15 10:09:39 (122 MB/s) - Connection closed at byte 64389. Retrying.

--2017-08-15 10:09:41--  (try: 3)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8516560 (8.1M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz1% [                                       ] 96,555      --.-K/s   in 0s      

2017-08-15 10:09:43 (119 MB/s) - Connection closed at byte 96555. Retrying.

--2017-08-15 10:09:46--  (try: 4)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8484394 (8.1M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz1% [                                       ] 128,721     --.-K/s   in 0s      

2017-08-15 10:09:47 (108 MB/s) - Connection closed at byte 128721. Retrying.

--2017-08-15 10:09:51--  (try: 5)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8452228 (8.1M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz1% [                                       ] 160,886     --.-K/s   in 0s      

2017-08-15 10:09:53 (111 MB/s) - Connection closed at byte 160886. Retrying.

--2017-08-15 10:09:58--  (try: 6)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8420063 (8.0M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz2% [                                       ] 193,051     --.-K/s   in 0s      

2017-08-15 10:09:59 (111 MB/s) - Connection closed at byte 193051. Retrying.

--2017-08-15 10:10:05--  (try: 7)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8387898 (8.0M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz2% [>                                      ] 225,216     --.-K/s   in 0s      

2017-08-15 10:10:07 (129 MB/s) - Connection closed at byte 225216. Retrying.

--2017-08-15 10:10:14--  (try: 8)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8355733 (8.0M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz2% [+                                      ] 257,381     --.-K/s   in 0s      

2017-08-15 10:10:15 (118 MB/s) - Connection closed at byte 257381. Retrying.

--2017-08-15 10:10:23--  (try: 9)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8323568 (7.9M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz3% [+                                      ] 289,546     --.-K/s   in 0s      

2017-08-15 10:10:25 (108 MB/s) - Connection closed at byte 289546. Retrying.

--2017-08-15 10:10:34--  (try:10)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8291403 (7.9M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz3% [+                                      ] 321,711     --.-K/s   in 0s      

2017-08-15 10:10:35 (115 MB/s) - Connection closed at byte 321711. Retrying.

--2017-08-15 10:10:45--  (try:11)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8259238 (7.9M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz4% [+                                      ] 353,876     --.-K/s   in 0s      

2017-08-15 10:10:46 (121 MB/s) - Connection closed at byte 353876. Retrying.

--2017-08-15 10:10:56--  (try:12)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8227073 (7.8M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz4% [+                                      ] 386,041     --.-K/s   in 0s      

2017-08-15 10:10:58 (131 MB/s) - Connection closed at byte 386041. Retrying.

--2017-08-15 10:11:08--  (try:13)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8194908 (7.8M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz4% [+                                      ] 418,206     --.-K/s   in 0s      

2017-08-15 10:11:09 (112 MB/s) - Connection closed at byte 418206. Retrying.

--2017-08-15 10:11:19--  (try:14)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8162743 (7.8M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz5% [+>                                     ] 450,371     --.-K/s   in 0s      

2017-08-15 10:11:21 (121 MB/s) - Connection closed at byte 450371. Retrying.

--2017-08-15 10:11:31--  (try:15)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8130578 (7.8M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz5% [++                                     ] 482,536     --.-K/s   in 0s      

2017-08-15 10:11:32 (125 MB/s) - Connection closed at byte 482536. Retrying.

--2017-08-15 10:11:42--  (try:16)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8098413 (7.7M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz5% [++                                     ] 514,701     --.-K/s   in 0s      

2017-08-15 10:11:44 (120 MB/s) - Connection closed at byte 514701. Retrying.

--2017-08-15 10:11:54--  (try:17)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8066248 (7.7M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz6% [++                                     ] 546,866     --.-K/s   in 0s      

2017-08-15 10:11:56 (124 MB/s) - Connection closed at byte 546866. Retrying.

--2017-08-15 10:12:06--  (try:18)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8034083 (7.7M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz6% [++                                     ] 579,031     --.-K/s   in 0.004s  

2017-08-15 10:12:07 (8.42 MB/s) - Connection closed at byte 579031. Retrying.

--2017-08-15 10:12:17--  (try:19)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 8001918 (7.6M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz7% [++                                     ] 611,196     --.-K/s   in 0s      

2017-08-15 10:12:19 (114 MB/s) - Connection closed at byte 611196. Retrying.

--2017-08-15 10:12:29--  (try:20)  https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-amd64.tar.gz
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 8580949 (8.2M), 7969753 (7.6M) remaining [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.10_linux-amd64.tar.gz7% [++                                     ] 643,361     --.-K/s   in 0s      

2017-08-15 10:12:30 (128 MB/s) - Connection closed at byte 643361. Giving up.

Giving up了,官方安装包下载不下来,所以先下载在电脑上,再上传到服务器上。。。。。。

需要下载的文件

[root@xxxxxxxxxxxxxxxx ipfs_zip]# tar xvfz go-ipfs_v0.4.10_linux-amd64.tar.gz   //解压
go-ipfs/build-log
go-ipfs/install.sh
go-ipfs/ipfs
go-ipfs/LICENSE
go-ipfs/README.md
[root@xxxxxxx ipfs_zip]# mv go-ipfs/ipfs /usr/local/bin/ipfs   //移动执行文件
[root@xxxxxxxxx ipfs_zip]# ipfs help //执行命令,说明安装成功
USAGE
  ipfs - Global p2p merkle-dag filesystem.

  ipfs [--config=<config> | -c] [--debug=<debug> | -D] [--help=<help>] [-h=<h>] [--local=<local> | -L] [--api=<api>] <command> ...

SUBCOMMANDS
  BASIC COMMANDS
    init          Initialize ipfs local configuration
    add <path>    Add a file to IPFS
    cat <ref>     Show IPFS object data
    get <ref>     Download IPFS objects
    ls <ref>      List links from an object
    refs <ref>    List hashes of links from an object

  DATA STRUCTURE COMMANDS
    block         Interact with raw blocks in the datastore
    object        Interact with raw dag nodes
    files         Interact with objects as if they were a unix filesystem
    dag           Interact with IPLD documents (experimental)

  ADVANCED COMMANDS
    daemon        Start a long-running daemon process
    mount         Mount an IPFS read-only mountpoint
    resolve       Resolve any type of name
    name          Publish and resolve IPNS names
    key           Create and list IPNS name keypairs
    dns           Resolve DNS links
    pin           Pin objects to local storage
    repo          Manipulate the IPFS repository
    stats         Various operational stats
    p2p           Libp2p stream mounting
    filestore     Manage the filestore (experimental)

  NETWORK COMMANDS
    id            Show info about IPFS peers
    bootstrap     Add or remove bootstrap peers
    swarm         Manage connections to the p2p network
    dht           Query the DHT for values or peers
    ping          Measure the latency of a connection
    diag          Print diagnostics

  TOOL COMMANDS
    config        Manage configuration
    version       Show ipfs version information
    update        Download and apply go-ipfs updates
    commands      List all available commands

  Use 'ipfs <command> --help' to learn more about each command.

  ipfs uses a repository in the local file system. By default, the repo is located
  at ~/.ipfs. To change the repo location, set the $IPFS_PATH environment variable:

    export IPFS_PATH=/path/to/ipfsrepo

  EXIT STATUS

  The CLI will exit with one of the following values:

  0     Successful execution.
  1     Failed executions.


至此,安装完成。


[root@xxxxxxxxxx ipfs_zip]# ipfs init
initializing IPFS node at /root/.ipfs
generating 2048-bit RSA keypair...done
peer identity: QmdSkEjtdHsifEySmGZ9EGG3vpmSa4zNWG5oavuTvuyvPN
to get started, enter:

    ipfs cat /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme


[root@xxxxxxxx ipfs_zip]# ipfs cat /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme
Hello and Welcome to IPFS!

██╗██████╗ ███████╗███████╗
██║██╔══██╗██╔════╝██╔════╝
██║██████╔╝█████╗  ███████╗
██║██╔═══╝ ██╔══╝  ╚════██║
██║██║     ██║     ███████║
╚═╝╚═╝     ╚═╝     ╚══════╝

If you're seeing this, you have successfully installed
IPFS and are now interfacing with the ipfs merkledag!

 -------------------------------------------------------
| Warning:                                              |
|   This is alpha software. Use at your own discretion! |
|   Much is missing or lacking polish. There are bugs.  |
|   Not yet secure. Read the security notes for more.   |
 -------------------------------------------------------

Check out some of the other files in this directory:

  ./about
  ./help
  ./quick-start     <-- usage examples
  ./readme          <-- this file
  ./security-notes

[root@xxxxxxxxxx ipfs_zip]# ipfs cat  /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/quick-start
# 0.1 - Quick Start

This is a set of short examples with minimal explanation. It is meant as
a "quick start". Soon, we'll write a longer tour :-)


Add a file to ipfs:

  echo "hello world" >hello
  ipfs add hello


View it:

  ipfs cat <the-hash-you-got-here>


Try a directory:

  mkdir foo
  mkdir foo/bar
  echo "baz" > foo/baz
  echo "baz" > foo/bar/baz
  ipfs add -r foo


View things:

  ipfs ls <the-hash-here>
  ipfs ls <the-hash-here>/bar
  ipfs cat <the-hash-here>/baz
  ipfs cat <the-hash-here>/bar/baz
  ipfs cat <the-hash-here>/bar
  ipfs ls <the-hash-here>/baz


References:

  ipfs refs <the-hash-here>
  ipfs refs -r <the-hash-here>
  ipfs refs --help


Get:

  ipfs get <the-hash-here> -o foo2
  diff foo foo2


Objects:

  ipfs object get <the-hash-here>
  ipfs object get <the-hash-here>/foo2
  ipfs object --help


Pin + GC:

  ipfs pin add <the-hash-here>
  ipfs repo gc
  ipfs ls <the-hash-here>
  ipfs pin rm <the-hash-here>
  ipfs repo gc


Daemon:

  ipfs daemon  (in another terminal)
  ipfs id


Network:

  (must be online)
  ipfs swarm peers
  ipfs id
  ipfs cat <hash-of-remote-object>


Mount:

  (warning: fuse is finicky!)
  ipfs mount
  cd /ipfs/<the-hash-here>
  ls


Tool:

  ipfs version
  ipfs update
  ipfs commands
  ipfs config --help
  open http://localhost:5001/webui


Browse:

  webui:

    http://localhost:5001/webui

  video:

    http://localhost:8080/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXse

  images:

    http://localhost:8080/ipfs/QmZpc3HvfjEXvLWGQPWbHk3AjD5j8NEN4gmFN8Jmrd5g83/cs

  markdown renderer app:

    http://localhost:8080/ipfs/QmX7M9CiYXjVeFnkfVGf3y5ixTZ2ACeSGyL1vBJY1HvQPp/mdown


[root@xxxxx ipfs_zip]# ipfs daemon //启动
Initializing daemon...
Swarm listening on /ip4/10.144.176.230/tcp/4001
Swarm listening on /ip4/115.28.190.53/tcp/4001
Swarm listening on /ip4/115.28.190.53/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Error: serveHTTPGateway: manet.Listen(/ip4/127.0.0.1/tcp/8080) failed: listen tcp4 127.0.0.1:8080: bind: address already in use //端口占用,解决:修改配置文件,更改端口

[root@iZ2851te7e5Z ipfs_zip]# ipfs config //查看配置文件的命令
Error: Argument 'key' is required //报错暂时不管

USAGE
  ipfs config <key> [<value>] - Get and set ipfs config values.

  ipfs config [--bool] [--json] [--] <key> [<value>]

  'ipfs config' controls configuration variables. It works like 'git config'.
  The configuration values are stored in a config file inside your ipfs
  repository.

SUBCOMMANDS
  ipfs config edit           - Open the config file for editing in $EDITOR.
  ipfs config replace <file> - Replace the config with <file>.
  ipfs config show           - Output config file contents.

Use 'ipfs config --help' for more information about this command.

[root@xxxxxxxxx ipfs_zip]# ipfs config edit //修改配置文件
Error: ENV variable $EDITOR not set //没有设置默认编辑器
[root@xxxxxxxxxx ipfs_zip]# export EDITOR=vi  //修改默认编辑器
[root@xxxxxxxxxx ipfs_zip]# ipfs config edit //再次修改配置文件

修改配置文件中的AddressesGateway中的端口,这里改成了8081.

[root@iZ2851te7e5Z ipfs_zip]# ipfs daemon
Initializing daemon...
Swarm listening on /ip4/10.144.176.230/tcp/4001
Swarm listening on /ip4/115.28.190.53/tcp/4001
Swarm listening on /ip4/115.28.190.53/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8081
Daemon is ready

//运行成功

把上面的提示的地址换成自己服务器的IP,还是不能访问,原因在于配置问题。

[root@xxxxxxxxxx ipfs_zip]# ipfs config edit //再次修改配置文件

修改配置文件中的AddressesGateway`中的127.0.0.1改成0.0.0.0`.

还会出现的问题,dial tcp xxxxxx:8081: i/o timeout

问题总结

目前在服务器上出现以下问题:

  • 官网的安装包下载失败,一直在超时
  • 服务器运行ipfs后,没有打开过页面,一直出现IO的超时

可能造成这样的原因

  • IPFS官网以及官方提供的节点被阿里云墙了

解决思路:如果需要使用IPFS的服务,可以采用海外服务器作为服务的一个节点,构建分布式文件系统

目录
相关文章
|
1月前
|
Java Linux Apache
在CentOS服务器上编译并部署NiFi源码
部署Apache NiFi在CentOS上是一个涉及细节的过程,需要注意Java环境、源码编译、配置调整等多个方面。遵循上述步骤,可以在CentOS服务器上成功部署和配置Apache NiFi,从而高效地处理和分发数据。
157 17
|
1月前
|
弹性计算 人工智能 前端开发
在阿里云ECS上部署n8n自动化工作流:U2实例实战
本文介绍如何在阿里云ECS的u2i/u2a实例上部署开源工作流自动化平台n8n,利用Docker快速搭建并配置定时任务,实现如每日抓取MuleRun新AI Agent并推送通知等自动化流程。内容涵盖环境准备、安全组设置、实战案例与优化建议,助力高效构建低维护成本的自动化系统。
404 5
|
2月前
|
弹性计算 安全 Linux
使用阿里云服务器安装Z-Blog博客网站流程,新手一键部署教程
本教程教你如何在阿里云99元服务器上,通过宝塔Linux面板一键部署Z-Blog博客。基于CentOS 7.9系统,从远程连接、安装宝塔面板、开放端口到部署Z-Blog全流程详解,操作简单,新手也能轻松搭建个人博客网站。
413 13
|
3月前
|
存储 负载均衡 NoSQL
【赵渝强老师】Redis Cluster分布式集群
Redis Cluster是Redis的分布式存储解决方案,通过哈希槽(slot)实现数据分片,支持水平扩展,具备高可用性和负载均衡能力,适用于大规模数据场景。
317 2
|
3月前
|
存储 缓存 NoSQL
【📕分布式锁通关指南 12】源码剖析redisson如何利用Redis数据结构实现Semaphore和CountDownLatch
本文解析 Redisson 如何通过 Redis 实现分布式信号量(RSemaphore)与倒数闩(RCountDownLatch),利用 Lua 脚本与原子操作保障分布式环境下的同步控制,帮助开发者更好地理解其原理与应用。
254 6
|
4月前
|
存储 缓存 NoSQL
Redis核心数据结构与分布式锁实现详解
Redis 是高性能键值数据库,支持多种数据结构,如字符串、列表、集合、哈希、有序集合等,广泛用于缓存、消息队列和实时数据处理。本文详解其核心数据结构及分布式锁实现,帮助开发者提升系统性能与并发控制能力。
|
8月前
|
数据采集 存储 数据可视化
分布式爬虫框架Scrapy-Redis实战指南
本文介绍如何使用Scrapy-Redis构建分布式爬虫系统,采集携程平台上热门城市的酒店价格与评价信息。通过代理IP、Cookie和User-Agent设置规避反爬策略,实现高效数据抓取。结合价格动态趋势分析,助力酒店业优化市场策略、提升服务质量。技术架构涵盖Scrapy-Redis核心调度、代理中间件及数据解析存储,提供完整的技术路线图与代码示例。
865 0
分布式爬虫框架Scrapy-Redis实战指南
|
2月前
|
NoSQL Java 调度
分布式锁与分布式锁使用 Redis 和 Spring Boot 进行调度锁(不带 ShedLock)
分布式锁是分布式系统中用于同步多节点访问共享资源的机制,防止并发操作带来的冲突。本文介绍了基于Spring Boot和Redis实现分布式锁的技术方案,涵盖锁的获取与释放、Redis配置、服务调度及多实例运行等内容,通过Docker Compose搭建环境,验证了锁的有效性与互斥特性。
206 0
分布式锁与分布式锁使用 Redis 和 Spring Boot 进行调度锁(不带 ShedLock)

热门文章

最新文章

下一篇
oss云网关配置