dubbo-admin installation, operation and problem solving

Seriously, you have been dealing with Linux problems, and you will find it-really annoying!

I found hundreds of blogs, the problem points are all relatively broken, getand I feel that they are not my point.

But after torture, it will definitely be a little enlightening!

The topic of this article is to install dubbo-admin

If you want to do well, you must first sharpen your tools

Tool: VMware虚拟机, Linux centOS07系统, Xshell,Xftp

Installation required: zookeeper, dubbo-admin, unzip解压, git, maven,nodejs 

I put all the installation files and software at the bottom of the article!!!


I first think that you have prepared the tools, so now start to implement and deal with the problems encountered

I will put the explanation of some commands at the end of the article, hoping to clarify the confusion

1. Prepare the required catalog first

mkdir -p maven------>mkdir -p 相对路径或绝对路径

These commands of mine are all Xshelloperated on

XshellA simple understanding is an intermediate software that connects to Linux on Windows systems

Create a directory first: mkdir -p maven------>mkdir -p 相对路径或绝对路径

-pMy suggestion here is to add, otherwise there may be problems with the created directory ( words pI think are path)

2. XftpImport the prepared installation package into Linux

By default, everyone will do this operation, and will not be able to leave a message and private message me

Let me talk about it here, now that the corresponding folder is created, then you must import the file into the corresponding file directory

3. Start to install the decompression toolunzip

yum -y install unzip

The types of compressed packages I currently see in Linux: .tar.zgand.zip

Then the commands to decompress these two compressed packages are also different

Generally speaking, Linux comes with uncompressed .tar.zgpackages.

So I will use it laterunzip

yumIs very powerful. As for the introduction, there are a lot of online

-yIt means yes, which is easier

This network will automatically download and install

4. Start to decompress the imported installation package

Note: Because the compressed packages above are all put in their respective folders, so this time the decompression is operated in a relative path. Different commands are different. First try according to my first command. Try the following (if it doesn't work, you can leave a message to me)

Use cdthis command proficiently here -> the full name is this:change directory - 切换目录

Decompression .tar.zgcommand —>tar xvf 压缩包

If you extract the absolute path, here Try this: 1. Try tar -zxvf! This command 2 attempt tar zxvfcommand

If you want to unzip the root directory to other directories for executiontar -zxvf 压缩包 -C 目录的绝对路径

Decompression .zipcommand (provided it is installed unzip) ----->unzip 压缩包

If you want to unzip the root directory to other directories for executionunzip 压缩包 -d 目录的绝对路径

5. First install zookeeper

Remember: you will use zookeeper when you open dubbo-admin later

1. After decompressing the zookeeper installation package, add two new directories to its directory mkdir -p data, which mkdir -p logwill be added in the configuration file later, one for data and one for logs (little friends who have played with the zookeeper cluster should have some understand)

2. In the advanced datadirectory, use the pwdcommand to get the absolute path of the data and copy it

3. Start to configure the zookeeper configuration file

dataDir=/home/admin/zookeeper/apache-zookeeper-3.6.1-bin/data

logDir=/home/admin/zookeeper/apache-zookeeper-3.6.1-bin/log

4. :wqSave and exit after configuration

5. The last step is to turn on the zookeeper service---->确保自己的Linux中配置jdk

startOpen service

statusCheck status

stopClose

6. Installationnodejs

At first I couldn't package it, but later I found out that nodejs was not installed

The installation package is also placed at the bottom

Most of the decompression in Linux, and then the configuration can be used, relatively speaking, it is much simpler than Windows

This step has the most problems, and there are many installation steps on the Internet

nodejs official website

Or use yum -y install npmto install

1. Unzipnodejs

2. Get the absolute path of nodejs and configure it in Linux

3. This must be met   vim /etc/profile

4. Check whether the configuration is successful node -v

Seven. Configure maven

Maven only needs to pay attention to configure Alibaba Cloud in mirror

Linux unzip, and then configure the global can be used

1. The decompression process is omitted, which is the same as nodejs

2. Get the absolute path of maven and configure the maven environment

vim /etc/profileSo this step must be done, very important

3. Check if maven is successfully configured

mvn -v

4. Add Ali image file

<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

Note: Once the modified profile file needs to be refreshed to take effect

  1. source /etc/profile
  2. . /etc/profile
  3. 重启Linux系统

8. git

The most simple step, if they wish from githuband giteedo something or to rely on him

yum -y install git

9. Install dubbo-admin

The above work is for the installation of dubbo-admin, so it took a long time to enter the theme!

dubbo-admin can be downloaded on github, but I am really a slow downloader

git clone https://github.com/apache/dubbo-admin.git

1. As usual, unzip the installation package

2. Change the port in dubbo-admin, otherwise there will be a port conflict when it runs

server.port=xxxxThe configuration is complete, save and exit!

3. Packagingdubbo-admin `

mvn clean package -Dmaven.test.skip=true

There will definitely be many problems in this step, don't worry!!! The following interface appears, and you are more than half done

4. Start dubbo-admin

java -jar dubbo-admin-0.2.0-SNAPSHOT.jar

Visit dubbo-admin

It's over here!!!

The problems encountered are still more research and research!!!


cnpm installation method (because there are too many points for this problem)

  • First install itcnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org


Package----->All extraction codes are set to1008

virtual machine

Linux centOS7

Xshell

Xftp

maven

zookeeper

dubbo-admin

nodejs

JDK


Possible problems:

  1. When deploying and packaging, the download is extremely slow
    • Mainly pay attention to whether Ali mirroring is configured in maven
    • nodejs is not configured to environment variables
  2. Can't run dubbo-admin
    • It may be a port conflict, you must change the port number
    • You may not start zookeeper
    • Start zookeeper sure to check the status of, if you take a zookeeper cluster, the cluster will open! Because your data set myid, there must be followand leadercan be successfully turned zookeeper!

Some commonly used Linux commands

mkdir -pCreate file directory

tar zxvfCompressed file

tar zxvf-CThe path of the directory where the compressed file is decompressed

rmDelete files (you cannot delete folders)

rm -rDelete directory

rm -rfForced deletion, no prompt (use with caution)

yum -y install Installed stuff

`Yum (full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora, RedHat and SUSE.

Unzip

tar.gz format

-c : 创建压缩文件

-C : 指定解压文件存放的位置

-X : 解压

-t : 查看内容

-z : 有gzip属性的

-v : 显示所有过程

-f : 使用文件名字,切记,这个参数是最后一个参数,后面只能接文件名

Create tar.gz compressed file

tar -czvf The name of the compressed file.tar.gz

Unzip the tar.gz file

tar -zxvf unzip the name of the file

zip format

If the compressed file is .zip, you need to use the unzip command to decompress the .zip compressed package

-n : 解压缩时不要覆盖原有的文件

-d <目录> : 指定文件解压缩后所要存储的目录

-v : 执行时显示详细的信息

Unzip the zip file

unzip compressed file.zip

unzip compressed files.zip -d unzip to the specified directory

Query the software directory installed by yum

Take nodejs as an example: yum install -y nodejs

rpm -qa|grep nodejsFirst find the name of the software you installed and copy it

rpm -ql nodejs-8.11.2-1nodesource.x86_64Then execute this command to get the installation path

Guess you like

Origin blog.csdn.net/weixin_45561352/article/details/109396031