streama 个人视频网站-私人家用视频网站搭建

搭建基础

1.Ubuntu 18.10./linux/centso (演示仅在Ubuntu上!)
2.服务器
最低配置(1人)
核心1cure,内存750mb,100兆带宽
推荐配置
核心2cure, 内存2gb,1g带宽
高端配置
神威·太湖之光

安装代码

更新安装模块到最新版本

sudo apt-get update
sudo apt-get upgrade

安装java8

sudo apt install openjdk-8-jre

新建安装文件夹,进入目录

mkdir /home/user
mkdir /home/user/streama
cd /home/user/streama

安装streama

wget https://github.com/streamaserver/streama/releases/download/v1.9.1/streama-1.9.1.jar

赋予权限,并且运行在80端口

chmod +x streama-1.9.1.jar
java -Dserver.port=80 -jar streama-1.9.1.jar &

等待2分钟
出现以下代码即可

Grails application running at http://localhost:8080 in environment: production

本地:http://localhost:8080
外部:域名

网站设置访问
https://github.com/streamaserver/streama

设置开机自动启动

修改开机自启服务

sudo nano /etc/systemd/system/rc-local.service

在vim环境里添加

[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
 
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
RemainAfterExit=yes
 
[Install]
WantedBy=multi-user.target
Alias=rc-local.service

创建自启文件

sudo nano /etc/rc.local

在尾行写入

#!/bin/sh -e
#
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
sudo nohup chmod +x /home/user/streama/streama-1.9.1.jar
sudo nohup java -Dserver.port=80 -jar /home/user/streama/streama-1.9.1.jar &
exit 0

添加权限,开机自启

sudo chmod +x /etc/rc.local
sudo systemctl enable rc-local

查看状态

sudo systemctl status rc-local.service

bbr,镜像未包含,需要自行安装

wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh

验证bbr

sysctl net.ipv4.tcp_congestion_control

说明

注意启动大概几分钟所以耐心等一会再打开网页

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值