Java环境配置
下载jdk放到/usr/local/jdk下
tar zxvf jdk1.8.tar.gz解压
配置环境变量
vim /etc/profile
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_181
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/ (1.6后不需要配)
export PATH=$PATH:$JAVA_HOME/bin
刷新环境变量使变量生效
source /etc/profile
Tomcat配置
下载解压
配置环境变量
vim /etc/profile
export TOMCAT_HOME=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
ZooKeeper配置
下载上传到 /usr/local/temp
解压
tar zxvf zookeeper.tar.gz
移动到 /usr/local/zookeeper
cp -r zookeeper-3.4.8 ../zookeeper
/usr/local/zookeeper新建data目录
cd conf
cp zoo_sample.cfg zoo.cfg
vim zoo.cfg
修改dataDir=/usr/local/zookeeper/data
放行zookeeper默认端口或者关闭防火墙
cd bin
启动:./zkServer.sh start
查看状态 ./zkServer.sh status
网友评论