1. Environmental preparation
Prepare a centos7 machine, turn off the protective wall, and turn off selinux. For
specific operations, refer to my previous blog: Ceph Distributed File System Cluster Construction Detailed Explanation of the two steps in the article
2. Upload the Nacos installation package nacos-server-1.1.4.tar.gz to the /usr/local directory and unzip it
解压命令
tar -zxvf nacos-server-1.1.4.tar.gz
Netdisk address of Nacos installation package nacos-server-1.1.4.tar.gz:
link: https://pan.baidu.com/s/169t6yg6rmCWMqewy9zaYnQ
extraction code: d72u
3. Enter the /usr/local/nacos/bin/ directory and execute the startup command
./startup.sh -m standalone
As shown in the figure above, it prompts that jdk is not installed, then install jdk. Please refer to my other article for
jdk installation : Install jdk on Centos server. After jdk installation is complete, re-create the /usr/local/nacos/bin/ directory and execute Start command
3. Browser visit http://192.168.1.15:8848/nacos
Note: To turn off the firewall,
enter the username nacos and the password nacos to enter the nacos management page
4. Nacos stand-alone Docker installation
4.1 First, you need to install Docker and start docker
The installation reference of docker Install Docker in Centos7.
Attention, use the docker method to install Nacos first, start the docker service first
# 查看docker服务的状态
service docker status
# 启动docker服务
service docker start
# 停止docker服务
service docker stop
4.2 Pull docker image
# 拉取docker镜像
docker pull nacos/nacos-server:1.4.1
# 启动镜像
docker run --env MODE=standalone --name nacos01 -d -p 8848:8848 nacos/nacos-server:1.4.1
# 查看镜像列表
docker images
# 查看正在运行的容器
docker ps -a