java安装
作者:互联网
安装 java jdk
上传安装包:
jdk-8u331-linux-x64.tar.gz
解压到指定位置:
tar xf jdk-8u60-linux-x64.tar.gz -C /usr/local/
建立软连接:
ln -s /usr/local/jdk1.8.0_331/ /usr/local/jdk
添加环境变量并使其生效:
sed -i.ori '$a export JAVA_HOME=/usr/local/jdk\nexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH\nexport CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar' /etc/profile source /etc/profile
测试是否成功:
java -version
安装 Maven3.8.*
下载:
wget https://dlcdn.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.zip
解压:
unzip -d /etc/ apache-maven-3.8.5-bin.zip
配置环境变量 vim /etc/profile:
export MAVEN_HOME=/etc/apache-maven-3.8.5 export PATH=$MAVEN_HOME/bin:$PATH
刷新环境变量并验证:
source /etc/profile mvn -v
安装nacos
下载:
wget wget https://github.com/alibaba/nacos/releases/download/1.4.3/nacos-server-1.4.3.zip
解压:
unzip -d /etc/ nacos-server-1.4.3.zip
运行:
bin/startup.sh -m standalone
安装zookeeper
下载:
wget https://downloads.apache.org/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz
解压:
tar -zxvf apache-zookeeper-3.6.2-bin.tar.gz -C /etc/
重名名:
mv apache-zookeeper-3.6.2-bin/ zookeeper-3.6.2
创建data目录和logs目录
cd /etc/zookeeper-3.6.2 mkdir data mkdir logs
初始化配置文件
cd conf/ cp zoo_sample.cfg zoo.cfg
修改配置文件
vim zoo.cfg # 修改内容, 路径为本地存在名称路径 # 修改源数据文件夹 dataDir=/etc/zookeeper-3.6.2/data # 添加新日志文件夹 dataLogDir=/etc/zookeeper-3.6.2/logs
添加环境变量
export ZOOKEEPER_HOME=/etc/zookeeper-3.6.2/ export PATH=$ZOOKEEPER_HOME/bin:$PATH
刷新环境变量
source /etc/profile
bin目录下启动服务端
./zkServer.sh start
启动客户端
./zkCli.sh
标签:bin,java,zookeeper,3.6,etc,apache,HOME,安装 来源: https://www.cnblogs.com/rixian/p/16288701.html