Linux-使用笔记

1、查看应用程序占用端口查看端口

root@gmt-NF8480M5:/home/sandra/kms# netstat -tupln | grep -e kurento
tcp6       0      0 :::8888                 :::*                    LISTEN      38861/kurento-media 

2、查看ubuntu 版本

root@gmt-PowerEdge-R620:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

3、挂载NTFS文件系统

1、安装并启动nfs-kernel-server

~#apt-get install nfs-kernel-server
~#apt-get install nfs-common
~#vi /etc/export
~#/home/wanli/work/hi3559a *(rw,sync,no_root_squash)
~#service nfs-kernel-server restart

2、目标机挂载

~#mount -t nfs -o nolock -o tcp -o rsize=32768,wsize=32768 192.168.16.102:/home/wanli/work/hi3559a /mnt

4、ffmpeg rtmp 推流

ffmpeg -thread_queue_size 1024 -i  "rtsp://admin:[email protected]:554/Streaming/Unicast/channels/101" -vcodec copy -codec copy -f hls -hls_time 10 "/usr/share/nginx/html/hls/cam01.m3u8"
ffmpeg -thread_queue_size 1024 -i  "rtsp://admin:[email protected]:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1" -vcodec copy -codec copy -f hls -hls_time 10 "/usr/share/nginx/html/hls/cam01.m3u8"  

5、Makefile 中 = ,:=,?=,+= 表达式的意思

= 是最基本的赋值
:= 是覆盖之前的值
?= 是如果没有被赋值过就赋予等号后面的值
+= 是添加等号后面的值

6、跟踪Makefile输出调试信息

   $(info [message])
   $(info $(variable name))
   $(info [message] $(variable name) ...)
   $(info $(variable name) [message] ...)

7、ssh超时时间设置

修改/etc/ssh/sshd_config 文件

vim /etc/ssh/sshd_config

#ClientAliveInterval 0
#ClientAliveCountMax 3

修改为

ClientAliveInterval 30
ClientAliveCountMax 86400

1、客户端每隔多少秒向服务发送一个心跳数据
2、客户端多少秒没有相应,服务器自动断掉连接

重启 ssh 服务

root@gmt-NF8480M5:/# service sshd restart
发布了23 篇原创文章 · 获赞 0 · 访问量 1628

猜你喜欢

转载自blog.csdn.net/flyhelloword/article/details/104384315