zoukankan      html  css  js  c++  java
  • 淘淘商城虚拟机的启动命令汇总

    taotao-dubbo-zookeeper-167

    1、启动zookeeper注册中心
    [root@itheima ~]# cd /usr/local/zookeeper/zookeeper-3.4.6/bin/
    [root@itheima bin]# ./zkServer.sh start
    查看zookeeper启动状态
    [root@itheima bin]# ./zkServer.sh status
    关闭zookeeper
    [root@itheima bin]# ./zkServer.sh stop

    2、启动dubbo监控中心(要先启动zookeeper注册中心)
    [root@itheima bin]# cd /usr/local/zookeeper/apache-tomcat-7.0.47/bin
    [root@itheima bin]# ./startup.sh
    查看tomcat启动日志(查看dubbo监控中心是否启动成功)
    [root@itheima apache-tomcat-7.0.47]# tail -f logs/catalina.out
    访问地址:http://192.168.25.167:8080/dubbo-admin/
    用户名:root
    密码:root

    taotao-image-server-133

    图片服务器开机自动启动

    taotao-redis-cluster-153

    1、后端启动redis单机版
    [root@itheima bin]# pwd
    /usr/local/redis/bin
    [root@itheima bin]# ./redis-server redis.conf 
    查看redis启动进程
    [root@itheima bin]# ps -aux | grep redis

    2、启动redis集群版,批量启动
    [root@itheima redis-cluster]# pwd
    /usr/local/redis-cluster
    [root@itheima redis-cluster]# ./redis_start_all.sh
    查看redis启动进程
    [root@itheima redis-cluster]# ps -aux | grep redis
    批量关闭redis
    [root@itheima redis-cluster]# ./redis_shutdown_all.sh
    批量删除redis启动文件
    [root@itheima redis-cluster]# ./redis_delete_aof_rdb_nodes.sh

    创建redis集群(创建redis集群之前需要先先搭建ruby环境)
    [root@itheima redis-cluster]# ./redis-trib.rb create --replicas 1 192.168.25.153:7001 192.168.25.153:7002 192.168.25.153:7003 192.168.25.153:7004 192.168.25.153:7005 192.168.25.153:7006

    3、连接集群
    [root@itheima redis-cluster]# ll
    总用量 60
    drwxr-xr-x. 2 root root   187 1月   3 10:52 redis01
    drwxr-xr-x. 2 root root   187 1月   3 10:52 redis02
    drwxr-xr-x. 2 root root   187 1月   3 10:52 redis03
    drwxr-xr-x. 2 root root   187 1月   3 10:52 redis04
    drwxr-xr-x. 2 root root   187 1月   3 10:52 redis05
    drwxr-xr-x. 2 root root   187 1月   3 10:52 redis06
    -rwxr--r--. 1 root root   365 1月   1 15:34 redis_delete_aof_rdb_nodes.sh
    -rwxr--r--. 1 root root   395 1月   1 15:30 redis_shutdown_all.sh
    -rwxr--r--. 1 root root   269 1月   1 15:26 redis_start_all.sh
    -rwxr-xr-x. 1 root root 48141 1月   1 15:47 redis-trib.rb
    [root@itheima redis-cluster]# cd redis01
    [root@itheima redis01]# pwd
    /usr/local/redis-cluster/redis01
    [root@itheima redis01]# ./redis-cli -h 192.168.25.153 -p 7001 –c

    4、redis的其他命令
    expire key second   设置key的过期时间
    ttl key             查看剩余时间(-2 表示不存在,-1 表示已被持久化(永不过期),正数表示剩余的时间)
    persist key         清除过期时间,也即持久化,持久化成功体提示 1,不成功提示 0
    del key             删除key  
    exists key          若key存在,返回1,否则返回0
    select 0            表示选择0号数据库。默认是0号数据库。

    redis 默认有16个库 select num 从0开始换库

    keys *              获取redis里面所有的key
    dbsize              查看当前数据库的key的数量
    flushdb             清空当前库的所有key
    flushall            清空所有库的key
    exists key          是否存在该key
    move key db         把当前库的key移到db号库中
    type key            查看key的类型

    taotao-solr-cloud-154

    1、启动solr单机版
    [root@itheima ~]# cd /usr/local/solr/tomcat/bin/
    [root@itheima bin]# ./startup.sh
    查看tomcat的启动日志
    [root@itheima tomcat]# pwd
    /usr/local/solr/tomcat
    [root@itheima tomcat]# tail -f logs/catalina.out
    关闭solr单机版
    [root@itheima bin]# ./shutdown.sh

    2、启动solr集群版
    [root@itheima solr-cloud]# pwd
    /usr/local/solr-cloud
    启动每个zookeeper实例,批量启动
    [root@itheima solr-cloud]# ./zookeeper_start_all.sh 
    启动每个tomcat实例,批量启动
    [root@itheima solr-cloud]# ./tomcat_start_all.sh
    查看每个tomcat的启动日志,批量查看
    [root@itheima solr-cloud]# ./tomcat_status_all.sh 

    taotao-activemq-168

    [root@itheima bin]# pwd
    /root/apache-activemq-5.13.0/bin
    启动消息队列服务器:
    [root@itheima bin]# ./activemq start
    查看运行端口号:
    [root@itheima bin]# ps -aux | grep activemq
    关闭消息队列服务器:
    [root@itheima bin]# ./activemq stop
    查看消息队列服务器状态:
    [root@itheima bin]# ./activemq status

    访问地址:http://192.168.25.168:8161/admin/
    用户名:admin
    密码:admin

    其他常用命令

    1、解压缩
    [root@itheima ~]# tar zxvf zookeeper-3.4.6.tar.gz
    2、不询问强制删除
    [root@itheima ~]# rm -rf zookeeper-3.4.6.tar.gz
    3、新建目录
    [root@itheima ~]# mkdir /usr/local/solr-cloud
    4、重启firewalld服务
    [root@itheima zones]# service firewalld restart
    Redirecting to /bin/systemctl restart firewalld.service
    [root@itheima zones]#
  • 相关阅读:
    2-反向调试
    1-断点调试
    gdb基础用法
    protobuf学习手册(上)
    1024 科学计数法 (20 分)
    1023 组个最小数 (20 分)
    1018 锤子剪刀布 (20 分)
    1015 德才论 (25 分)
    1020 月饼 (25 分)
    1019 数字黑洞 (20 分)
  • 原文地址:https://www.cnblogs.com/chenmingjun/p/10260858.html
Copyright © 2011-2022 走看看