步骤一: 先下载安装包并上传到服务器上
1.1 可以通过wget命令直接下载到服务器上
wget https://github.com/alibaba/nacos/releases/download/1.4.1/nacos-server-1.4.1.tar.gz

1.2 也可以直接去官网下载包到本地,然后再通过scp命令或其他ftp软件上传到服务器上
下载地址(我这里下载的是1.4.1版本):
https://github.com/alibaba/nacos/releases/download/1.4.1/nacos-server-1.4.1.tar.gz
如果通过官网下载慢的话,可通过以下地址进行下载安装包 , (推荐用以下方式下载安装包)
百度云下载地址:
链接: https://pan.baidu.com/s/1IZRqpvAPeQJaTYlPr4fPoA
密码: 2e9s
csdn下载地址: https://download.youkuaiyun.com/download/pingweicheng/14967823
通过scp命令上传到服务器 :
scp /Users/chengweiping/develop/nacos/nacos-server-1.4.1.tar.gz root@192.168.101.12:/root/software/
![]()
步骤二:解压nacos-server安装包到指定目录
使用tar 命令解压安装包命令如下:
tar -zxvf nacos-server-1.4.1.tar.gz -C /usr/local/

步骤三:创建nacos-server 数据库,并执行nacos-server初始化脚本
初始化脚本在nacos-server解压后的conf子目录下,本例子中的全路径是: /usr/local/nacos/conf/nacos-mysql.sql , 数据库自己先在mysql服务中提前创建好,
我创建的数据库是nacos-server (自己根据实际情况命名)
然后在nacos-server数据库中执行以下初始化脚本:
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/******************************************/
/* 数据库全名 = nacos_config */
/* 表名称 = config_info */
/******************************************/
CREATE TABLE `config_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(255) DEFAULT NULL,
`content` longtext NOT NULL COMMENT 'content',
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT

本文档详细介绍了如何在服务器上安装Nacos 1.4.1版本,包括通过wget或scp下载安装包,解压到指定目录,创建数据库并执行初始化脚本,修改启动脚本和配置文件,以及启动和验证Nacos服务的过程。
最低0.47元/天 解锁文章
5844

被折叠的 条评论
为什么被折叠?



