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

目录
相关文章
|
6天前
|
Java 应用服务中间件 Linux
在阿里云服务器上部署Tomcat详细图文详解
本文介绍了在阿里云服务器上安装和配置JDK和Tomcat的步骤。首先,需要注册阿里云账号并进行实名认证,然后购买并设置服务器。接着,通过File Zilla连接服务器,创建Java和Tomcat的安装目录,并将JDK和Tomcat的tar.gz文件上传到服务器,解压并重命名。之后,配置JDK的环境变量,将catalina.sh复制到/etc/init.d/目录下,并修改相关配置。最后,启动Tomcat并配置安全组规则,确保可以通过公网访问。
|
6天前
|
弹性计算 Java Linux
阿里云服务器搭建部署宝塔详细流程
该内容是一个阿里云服务器和域名的配置指南。首先,需注册阿里云账号并进行企业实名认证。接着,选购服务器如2核2G1兆的Linux系统,并购买域名。完成域名备案后,进行域名解析和ICP备案。然后,通过远程连接登录服务器,重置密码,安装宝塔面板。在安全组中开启宝塔面板随机生成的端口。最后,登录宝塔面板安装LNMP环境,配置数据库如MySQL和Redis,部署JDK、Tomcat,上传前端和后端项目以实现上线。
|
7天前
|
弹性计算 JavaScript Java
阿里云服务器搭建部署宝塔详细流程
以下是内容的摘要: 本文主要介绍了在阿里云上创建和配置服务器环境的步骤,包括注册阿里云账号、实名认证、购买和设置服务器、域名的获取与备案、以及使用宝塔面板安装和配置环境。首先,用户需要注册阿里云账号并进行实名认证,选择合适的服务器配置。接着,购买服务器后,要准备并备案域名,以便通过友好的网址访问网站。在服务器上安装宝塔面板,可以方便地管理和配置LAMP/LNMP/Tomcat/Node.js等应用环境。完成这些步骤后,用户还需要在宝塔面板中安装MySQL、Redis等数据库,部署Java或Vue项目,并配置相关端口。最后,将前端项目打包上传至服务器,并设置站点,即可实现网站的上线。
|
7天前
|
应用服务中间件 Linux 开发工具
如何在阿里云服务器快速搭建部署Nginx环境
以下是内容的摘要: 本文档主要介绍了在阿里云上购买和配置服务器的步骤,包括注册阿里云账号、实名认证、选择和购买云服务器、配置安全组、使用Xshell和Xftp进行远程连接和文件传输,以及安装和配置Nginx服务器的过程。在完成这些步骤后,你将能够在服务器上部署和运行自己的网站或应用。
|
9天前
|
NoSQL 关系型数据库 MySQL
阿里云服务器部署项目流程
本文主要讲解阿里云服务器的部署,如何选择配置等
|
11天前
|
Linux 数据安全/隐私保护
Linux基础与服务器架构综合小实践
【4月更文挑战第9天】Linux基础与服务器架构综合小实践
1234 8
|
12天前
|
Java 应用服务中间件 Linux
阿里云服务器部署多个tomcat
阿里云服务器部署多个tomcat
|
弹性计算 安全 前端开发
ECS初体验——基于ECS的PHP WEB项目部署
本文内容主要是关于在ECS上搭建PHP web环境操作流程,并且会结合笔者在搭建过程中遇到的一些常见或不常见的问题给出一些比较实用的避坑建议。 ECS实例规格:云翼计划学生默认; 服务器OS:Debian 8.11 64位; WEB环境:LAMP——Linux+Apache2+Mysql5.5.62+PHP5.6.4
ECS初体验——基于ECS的PHP WEB项目部署
|
30天前
|
Ubuntu JavaScript 关系型数据库
在阿里云Ubuntu 20.04服务器中搭建一个 Ghost 博客
在阿里云Ubuntu 20.04服务器上部署Ghost博客的步骤包括创建新用户、安装Nginx、MySQL和Node.js 18.x。首先,通过`adduser`命令创建非root用户,然后安装Nginx和MySQL。接着,设置Node.js环境,下载Nodesource GPG密钥并安装Node.js 18.x。之后,使用`npm`安装Ghost-CLI,创建Ghost安装目录并进行安装。配置过程中需提供博客URL、数据库连接信息等。最后,测试访问前台首页和后台管理页面。确保DNS设置正确,并根据提示完成Ghost博客的配置。
在阿里云Ubuntu 20.04服务器中搭建一个 Ghost 博客
|
1月前
|
存储 弹性计算 数据可视化
要将ECS中的文件直接传输到阿里云网盘与相册(
【2月更文挑战第31天】要将ECS中的文件直接传输到阿里云网盘与相册(
417 4