Skip to content

Instantly share code, notes, and snippets.

@Howard-Chang
Last active August 22, 2018 04:24
Show Gist options
  • Save Howard-Chang/385584b2666bad2d2722219e5d01b798 to your computer and use it in GitHub Desktop.
Save Howard-Chang/385584b2666bad2d2722219e5d01b798 to your computer and use it in GitHub Desktop.
Centos Firewalld 設定
netstat -tulpn //查看有哪些port被哪些程序所佔用
firewall-cmd --zone=public --list-all //查看哪些port是public的
firewall-cmd --zone=public --add-port=5510/tcp //把tcp 5510加到public
firewall-cmd --zone=public --remove-port=5510/tcp //把tcp 5510從public中移除
LS server:
firewall-cmd --zone=public --add-port=5556/udp //把udp 5556加到public
ES server:
firewall-cmd --zone=public --add-port=9300/tcp //把tcp 9300加到public
firewall-cmd --zone=public --add-port=9200/tcp //把tcp 9200加到public
# 永久生效再加上 --permanent 然后reload防火墙
*先把firewall打開,再根據所需要的port一一加入public中即可
查看特定port被那些程序占用:
netstat -tulpn | grep :80
-----------------------網路------------------------
[Linux] 開機後自動啟動網路卡(以 eth0 為例)
分享: facebook PLURK twitter
最近發現新裝的 CentOS 開機後並不會自動啟動 eth0 的網卡
造成開機後沒有網路,必須手動
# ifup eth0
才會啟動網卡
上網搜尋了一下,開動自動啟動 eth0 網卡的方法如下
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
找到 ONBOOT 那行,將其設為 yes
ONBOOT=yes
查看logstash PID:
top | grep chrome
https://unix.stackexchange.com/questions/165214/how-to-view-a-specific-process-in-top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment