【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的服务,可以采用海外服务器作为服务的一个节点,构建分布式文件系统

目录
相关文章
|
7天前
|
弹性计算 数据库 数据安全/隐私保护
阿里云服务器真香宝典之Calibre-Web个人图书馆云端部署
在阿里云ECS(2核2G,SSD40G,3M带宽)上,安装Ubuntu 22.04,然后配置Docker和FTP。创建 `/config` 和 `/books` 目录,设置权限,开放端口,拉取 `johngong/calibre-web` Docker镜像,以`calibre-web`命名容器,映射端口,配置环境变量,挂载卷,确保重启策略。本地安装Calibre客户端,上传metadata.db到服务器。在Calibre-web服务端配置数据库,启用上传权限,修改管理员账户信息。完成配置后,开始上传电子书并进行阅读。
83 2
阿里云服务器真香宝典之Calibre-Web个人图书馆云端部署
|
23小时前
|
关系型数据库 Java 分布式数据库
PolarDB产品使用问题之部署到服务器上的Java应用(以jar包形式运行)无法连接,如何解决
PolarDB产品使用合集涵盖了从创建与管理、数据管理、性能优化与诊断、安全与合规到生态与集成、运维与支持等全方位的功能和服务,旨在帮助企业轻松构建高可用、高性能且易于管理的数据库环境,满足不同业务场景的需求。用户可以通过阿里云控制台、API、SDK等方式便捷地使用这些功能,实现数据库的高效运维与持续优化。
|
7天前
|
JavaScript 前端开发 搜索推荐
服务器端渲染技术SSR与ISR:深入解析与应用
【7月更文挑战第20天】服务器端渲染(SSR)和增量静态再生(ISR)作为现代Web开发中的两种重要渲染技术,各有其独特的优势和适用场景。在实际应用中,开发者应根据具体需求和条件选择合适的渲染模式。无论是追求极致的页面加载速度和SEO优化,还是实现内容的实时更新,SSR和ISR都能提供有效的解决方案。通过深入理解这些技术的工作原理和应用场景,开发者可以构建出更加高效、可靠和用户体验优异的Web应用。
|
9天前
|
监控 NoSQL Ubuntu
|
9天前
|
弹性计算 持续交付 Docker
阿里云云效产品使用合集之如何部署到阿里云服务器上的 Windows Server 上的 IIS
云效作为一款全面覆盖研发全生命周期管理的云端效能平台,致力于帮助企业实现高效协同、敏捷研发和持续交付。本合集收集整理了用户在使用云效过程中遇到的常见问题,问题涉及项目创建与管理、需求规划与迭代、代码托管与版本控制、自动化测试、持续集成与发布等方面。
|
9天前
|
域名解析 网络协议 安全
服务器部署后 访问出错的原因和解决办法
部署到服务器后无法访问可能是由于配置错误、权限问题或网络设置不当。解决办法包括检查服务器配置文件、确保文件路径正确、调整权限设置以及检查防火墙和端口设置。
44 0
|
7天前
|
存储 缓存 NoSQL
深入理解分布式缓存在后端系统中的应用与实践
【7月更文挑战第20天】 本文将探讨分布式缓存技术在后端系统设计中的关键角色,并揭示其如何优化性能和扩展性。文章不仅剖析了分布式缓存的基本原理和工作机制,而且提供了实际案例分析,展示了其在处理大规模数据时的优势。我们将深入了解几种流行的分布式缓存解决方案,并讨论它们在不同场景下的适用性。最后,文章将指导读者如何在真实世界的应用中实施分布式缓存,包括架构设计、性能调优以及故障排除的最佳实践。
|
10天前
|
弹性计算 Java 关系型数据库
|
19天前
|
NoSQL Java Redis
实现基于Redis的分布式锁机制
实现基于Redis的分布式锁机制
|
2天前
|
存储 缓存 NoSQL
Redis常见面试题(二):redis分布式锁、redisson、主从一致性、Redlock红锁;Redis集群、主从复制,哨兵模式,分片集群;Redis为什么这么快,I/O多路复用模型
redis分布式锁、redisson、可重入、主从一致性、WatchDog、Redlock红锁、zookeeper;Redis集群、主从复制,全量同步、增量同步;哨兵,分片集群,Redis为什么这么快,I/O多路复用模型——用户空间和内核空间、阻塞IO、非阻塞IO、IO多路复用,Redis网络模型
Redis常见面试题(二):redis分布式锁、redisson、主从一致性、Redlock红锁;Redis集群、主从复制,哨兵模式,分片集群;Redis为什么这么快,I/O多路复用模型

热门文章

最新文章