日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

nfs文件共享+netstat相关 记录

發布時間:2023/12/31 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 nfs文件共享+netstat相关 记录 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

經常要創建nfs文件共享,每次都要重新找一下筆記,特記錄下來方便查找:


一般linux自帶有nfs應用,所以要使用時,只要啟用即可,啟動過程如下:


服務端:

在/etc/exports 里面加入要nfs的目錄,開放可mount的對象IP,例如:
/data/test 192.168.*(rw,sync,no_root_squash)

然后啟動相關進程:

service nfs start
service portmap start


客戶端:

service portmap start ?
mount -t nfs 192.168.101.234:/data/test /data/test ? (mount命令)


查看已經發布出來的nfs可掛接點:

服務端:showmount -e localhost

客戶端:showmount -e 服務端IP


參考頁面:

http://linux.chinaunix.net/techdoc/system/2007/03/26/953339.shtml


--------------------------------------------------------------------

netstat 的一些使用方法,記錄一下,不完全之處后面碰到再補充:

1、使用 netstat -nlt 查看端口使用情況

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address ? ? ? ? ? ? ? Foreign Address ? ? ? ? ? ? State ? ? ?
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:10050 ? ? ? ? ? ? ? 0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ? ? ?
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:27017 ? ? ? ? ? ? ? 0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ? ? ?
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:873 ? ? ? ? ? ? ? ? 0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ?


2、使用 netstat -nltp 查看端口使用情況,并反應出端口使用的程序名稱和進程號

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address ? ? ? ? ? ? ? Foreign Address ? ? ? ? ? ? State ? ? ? PID/Program name ?
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:10050 ? ? ? ? ? ? ? 0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ? ? ?2485/zabbix_agentd ?
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:27017 ? ? ? ? ? ? ? 0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ? ? ?2535/mongod ? ?

3、如果要查具體某個程序或者端口的情況,在后面加 grep 即可:

root@test03:/root#netstat -nltp|grep mysql
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:3306 ? ? ? ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ? ? ?6509/mysqld ? ? ? ?
root@test03:/root#netstat -nltp|grep 3306
tcp ? ? ? ?0 ? ? ?0 0.0.0.0:3306 ? ? ? ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? ? ? LISTEN ? ? ?6509/mysqld ? ? ? ?


4、查看端口屬于哪個程序

root@test03:/root#lsof -i:3306
COMMAND ?PID ?USER ? FD ? TYPE DEVICE SIZE NODE NAME
mysqld ?6509 mysql ? 10u ?IPv4 ?15134 ? ? ? TCP *:mysql (LISTEN)


轉載于:https://blog.51cto.com/lylyf99/1393368

總結

以上是生活随笔為你收集整理的nfs文件共享+netstat相关 记录的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。