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
使用者名稱: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
使用者名稱: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]#
淘淘商城虛擬機器啟動命令
在啟動虛擬機器之前修改網段編輯下點選虛擬網路編輯器,將其修改到乙個網段下 在每乙個連線下單擊屬性,修改其ip位址,使用者名稱和密碼 第一步 啟動虛擬機器zookeeper redis solr activemq images server 第二步 利用shell進行連線,連線成功後,對每一項進行啟動...
啟動虛擬機器異常
1 無法啟動虛擬機器 提示 bios裡的 virtualization technology 沒有開啟 不同電腦進入bios熱鍵不同,我的電腦 重啟 出現thinkpad logo時按f1 切換到security 下的virtualization 切換為enable,按照指令儲存退出,啟機 2 啟動...
vmware 虛擬機器 知識彙總
說明 使用vmnet8虛擬交換機,此時虛擬機器可以通過主機單向網路上的其他工作站,其他工作站不能訪問虛擬機器。其網路拓撲如圖2所示,使用nat方式,a1,a2可以訪問b,但b不可以訪問a1,a2。但a,a1,a2可以互訪。橋接 nat和host only的概念 橋接 基於鏈路層協議將兩個通訊網路互連...