dockerdocker

  • Linux經常使用操做node

    • 清除緩存:echo 1 > /proc/sys/vm/drop_caches
    • 殺死進程:kill -9 ps -ef |grep tomcat | awk '{print $2,$3}'
    • Centos 7 查看防火牆狀態:firewall-cmd --state
    • Centos 7 一次性關閉防火牆:systemctl stop firewalld.service
    • yum清除緩存:yum makecache
    • 查看版本:cat /etc/redhat-release
    • 查看能夠安裝的軟件版本(好比mysql):yum list | grep mysql
    • 同時安裝多個軟件(好比mysql):yum install -y mysql-server mysql mysql-devel
    • 查看軟件版本(好比mysql):rpm -qi mysql-server
    • 查看已經安裝的軟件(好比mysql):rpm -qa | grep mysql
    • 卸載軟件:rpm -e mysql  // 普通刪除模式
    • 卸載軟件:rpm -e --nodeps mysql  // 強力刪除模式,若是使用上面命令刪除時,提示有依賴的其它文件,則用該命令能夠對其進行強力刪除
    • 檢查軟件是不是開機啓動:chkconfig --list | grep mysqld
    • 設置軟件開機啓動:chkconfig mysqld on
    • 在一行前新增一行數據: sed -in-place '1i nihaxxxoya' test.sh
    • 在一行後新增一行數據: sed -in-place '1a nihaxxxoya' test.sh
    • 獲取當前登陸的用戶 echo $(whoami)
    • 查看公網ipcurl cip.cc
    • 設置免密登錄服務器 ssh-copy-id -i id_rsa.pub root@192.168.136.211
    • curl localhost:9999/api/daizhige/article -X POST -H "Content-Type:application/json" -d '"title":"comewords","content":"articleContent"'
    • tcpdump -A -s 0 'tcp port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0) and host 110.184.155.52' -vv
  • Linux經常使用操做mysql

    • 清除緩存:echo 1 > /proc/sys/vm/drop_caches
    • 殺死進程:kill -9 ps -ef |grep tomcat | awk '{print $2,$3}'
    • Centos 7 查看防火牆狀態:firewall-cmd --state
    • Centos 7 一次性關閉防火牆:systemctl stop firewalld.service
    • yum清除緩存:yum makecache
    • 查看版本:cat /etc/redhat-release
    • 查看能夠安裝的軟件版本(好比mysql):yum list | grep mysql
    • 同時安裝多個軟件(好比mysql):yum install -y mysql-server mysql mysql-devel
    • 查看軟件版本(好比mysql):rpm -qi mysql-server
    • 查看已經安裝的軟件(好比mysql):rpm -qa | grep mysql
    • 卸載軟件:rpm -e mysql  // 普通刪除模式
    • 卸載軟件:rpm -e --nodeps mysql  // 強力刪除模式,若是使用上面命令刪除時,提示有依賴的其它文件,則用該命令能夠對其進行強力刪除
    • 檢查軟件是不是開機啓動:chkconfig --list | grep mysqld
    • 設置軟件開機啓動:chkconfig mysqld on
    • 在一行前新增一行數據: sed -in-place '1i nihaxxxoya' test.sh
    • 在一行後新增一行數據: sed -in-place '1a nihaxxxoya' test.sh
    • 獲取當前登陸的用戶 echo $(whoami)
    • 查看公網ipcurl cip.cc
    • 設置免密登錄服務器 ssh-copy-id -i id_rsa.pub root@192.168.136.211
    • curl localhost:9999/api/daizhige/article -X POST -H "Content-Type:application/json" -d '"title":"comewords","content":"articleContent"'
    • tcpdump -A -s 0 'tcp port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0) and host 110.184.155.52' -vv
相關文章
相關標籤/搜索