Nginx
cd /opt/module/nginx# 启动sudo sbin/nginx# 关闭sudo sbin/nginx -s stop
Canal
cd /opt/module/canal
# 启动服务端
bin/startup.sh
# 关闭
bin/stop.sh
Redis
cd /opt/module/redis
# 启动服务端
bin/redis-server redis.conf
# 启动客户端
bin/redis-cli -h hadoop102
ElasticSearch和Kibana
[atguigu@hadoop102 elasticsearch]$ cd /opt/module/elasticsearch/
[atguigu@hadoop102 elasticsearch]$ bin/elasticsearch
# 关闭
jpsall
kill -9 查看到的进程号
群起脚本es.sh
下面脚本启动单台 ElasticSearch 后,系统睡4s,其他节点再启动,是为了等待主节点启动完成后,从节点取连接。
es_home=/opt/module/elasticsearch
kibana_home=/opt/module/kibana
case $1 in
"start") {
for i in hadoop102 hadoop103 hadoop104
do
echo "==============$i=============="
ssh $i "source /etc/profile;${es_home}/bin/elasticsearch >/dev/null 2>&1 &"
sleep 4s;
done
sleep 2s;
nohup ${kibana_home}/bin/kibana > kibana.log 2>&1 &
};;
"stop") {
ps -ef | grep ${kibana_home} | grep -v grep | awk '{print $2}'| xargs kill
for i in hadoop102 hadoop103 hadoop104
do
echo "==============$i=============="
ssh $i "ps -ef|grep $es_home |grep -v grep|awk '{print \$2}'|xargs kill" >/dev/null 2>&1
done
};;
esac
