当前位置:   article > 正文

Ubuntu22.04安装jdk8、redis、srs

ubuntu22.04安装jdk8

jdk8

 sudo apt install openjdk-8-jre-headless
  • 1

redis

sudo apt-get install redis-server

修改配置文件
sudo vim /etc/redis/redis.conf

# 注释掉绑定地址#bind 127.0.0.1,让Redis可远程访问
# bind 127.0.0.1 ::1

#取消注释requirepass 启动密码认证,并设置访问密码
requirepass your-pass-word

#解除保护模式 同样是为了让所有访问redis
protected-mode no

将redis作为服务进行管理,从而为您提供对其操作的更多控制(可以使用 service redis restart)
supervised systemd

# 以守护进程运行Redis 
daemonize yes

重启服务来刷新配置
systemctl restart redis-server

查看redis 状态
sudo systemctl status redis
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25

srs

下载源码
git clone -b 4.0release https://gitee.com/ossrs/srs.git
编译,注意需要切换到srs/trunk目录:

cd srs/trunk
./configure
make
启动服务器:

./objs/srs -c conf/srs.conf
检查SRS是否成功启动,可以打开 http://localhost:8080/ ,或者执行命令:

# 查看SRS的状态
./etc/init.d/srs status

# 或者看SRS的日志
tail -n 30 -f ./objs/srs.log
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

修改srs.conf配置文件

# main config for srs.
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
srs_log_tank        file;
srs_log_file        ./objs/srs.log;
daemon              on;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
stats {
    network         0;
    disk            sda sdb xvda xvdb;
}
vhost __defaultVhost__ {
#    hls {
#        enabled         on;
#    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    dvr {
        enabled             on;
        dvr_apply       all;
        dvr_plan        session;
        dvr_path        ./objs/nginx/html/[app]/[stream]-[2006]-[01]-[02]-[15]_[04]_[05]_[999].flv;
#        dvr_path            ./objs/nginx/html/[app]/[stream].flv;
#        dvr_plan            segment;
#        dvr_duration        30;
#        dvr_wait_keyframe   on;
        time_jitter             full;
    }
    http_hooks {
        enabled         on;
#        on_play      http://192.168.1.102:9999/system/srs/play;
#        on_unpublish    http://192.168.1.102:9999/system/srs/unpublish;
    }

}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47

http-server端口存在远程调不通的情况,还未解决。

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号