[root@a zookeeper-3.4.9]#
[root@a zookeeper-3.4.9]# cd bin
[root@a bin]# cd /etc/init.d/
[root@a init.d]# vi zookeeper
#!/bin/bash
#chkconfig:2345 20 90
#description:zookeeper
#processname:zookeeper
ZK_PATH=/opt/zookeeper
export JAVA_HOME=/opt/jdk1.8.0_121
case $1 in
start) sh $ZK_PATH/bin/zkServer.sh start;;
stop) sh $ZK_PATH/bin/zkServer.sh stop;;
status) sh $ZK_PATH/bin/zkServer.sh status;;
restart) sh $ZK_PATH/bin/zkServer.sh restart;;
*) echo “require start|stop|status|restart” ;;
esac
“zookeeper” [New] 13L, 428C written
[root@a init.d]#
[root@a init.d]# chkconfig --add zookeeper 开机自启
[root@a init.d]#
[root@a init.d]# service zookeeper start
env: /etc/init.d/zookeeper: 权限不够
[root@a init.d]# chmod 777 zookeeper
[root@a init.d]# service zookeeper start
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper-3.4.9/bin/…/conf/zoo.cfg
Starting zookeeper … STARTED
[root@a init.d]# ps -ef|grep zookeeper
dubbo安装
rar解压
[root@a opt]# unzip dubbo-admin-2.6.0.rar -d duboo
cd apache-tomcat-7.0.75/
cd conf/
vi server.xml
logs"
prefix=“localhost_access_log.” suffix=".txt"
pattern="%h %l %u %t “%r” %s %b" />
pattern="%h %l %u %t "%r" %s %b" />
<Context path="/dubbo" docBase="/opt/dubbo" debug="0" privileged="true" />
[root@a conf]# cd …
[root@a apache-tomcat-7.0.75]# cd bin
[root@a bin]# sh startup.sh
Using CATALINA_BASE: /opt/apache-tomcat-7.0.75
Using CATALINA_HOME: /opt/apache-tomcat-7.0.75
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.75/temp
Using JRE_HOME: /opt/jdk1.8.0_121
Using CLASSPATH: /opt/apache-tomcat-7.0.75/bin/bootstrap.jar:/opt/apache-tomcat-7.0.75/bin/tomcat-juli.jar
Tomcat started.
[root@a bin]#
[root@a bin]# cd /opt
[root@a opt]# mkdir data
[root@a opt]# cd zookeeper-3.4.9/
[root@a zookeeper-3.4.9]# mkdir data
mkdir: 无法创建目录"data": 文件已存在
[root@a zookeeper-3.4.9]# cd /etc/init.d/
[root@a init.d]# vi dubbo
kconfig:2345 20 90
#description:dubbo-admin
#processname:dubbo-admin
CATALANA_HOME=/opt/apache-tomcat-7.0.75
export JAVA_HOME=/opt/jdk1.8.0_152
case $1 in
start)
echo “Starting Tomcat…”
$CATALANA_HOME/bin/startup.sh
;;
stop)
echo “Stopping Tomcat…”
$CATALANA_HOME/bin/shutdown.sh
;;
restart)
echo “Stopping Tomcat…”
$CATALANA_HOME/bin/shutdown.sh
sleep 2
echo
echo “Starting Tomcat…”
“dubbo” [New] 28L, 582C written
[root@a init.d]#