配置nginx播放视频

我们进入usr目录创建nginx文件夹

首先下载nginx安装包

wget http://nginx.org/download/nginx-1.6.3.tar.gz

后下载nginx_rtmp_module安装包

wget https://github.com/arut/nginx-rtmp-module/archive/master.zip

解压就完事了

tar xf nginx-1.6.3.tar.gz

unzip master.zip

如果提示

-bash: unzip: 未找到命令

yum install -y unzip zip

创建软链接

ln -s /usr/nginx/nginx-1.6.3 /usr/nginx/nginx

后配置nginx

cd nginx

使用

echo $?

如果输出0代表没有问题,但是此时输出1

以下是一些特殊变量:
$# 表示参数个数。
$0 是脚本本身的名字。
$1 是传递给该shell脚本的第一个参数。
$2 是传递给该shell脚本的第二个参数。
$@ 表示所有参数,并且所有参数都是独立的。
$$ 是脚本运行的当前进程ID号。
$? 是显示最后命令的退出状态,0表示没有错误,其他表示有错误。

安装

yum -y install pcre-devel

yum -y install openssl openssl-devel

后再执行一次,注意!!!!!这里是两个点,点点/,编辑器显示三个点!!!!!

./configure --with-http_ssl_module --add-module=…/nginx-rtmp-module-master

如果报
./configure: error: C compiler cc is not found

yum -y install gcc gcc-c++ autoconf automake make

再次执行那个

./configure --with-http_ssl_module --add-module=…/nginx-rtmp-module-master

然后好了,尾巴变成

adding module in ../nginx-rtmp-module-master
 + ngx_rtmp_module was configured
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for OpenSSL library ... found
checking for zlib library ... found
creating objs/Makefile

Configuration summary
  + using system PCRE library
  + using system OpenSSL library
  + md5: using OpenSSL library
  + sha1: using OpenSSL library
  + using system zlib library

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

echo $?

发现是0

编译nginx,后确认有无成功

make

echo $?

安装nginx,自己确认

make install

启动nginx

/usr/local/nginx/sbin/nginx

查看nginx版本

/usr/local/nginx/sbin/nginx -V

查看配置文件,可以看到他在监听80端口诶,我们关闭防火墙,访问ip地址:80可以看到欢迎来到nginx的页面

cat /usr/local/nginx/conf/nginx.conf

server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

语法检查,ok+success呢

/usr/local/nginx/sbin/nginx -t

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

拉个视频进去

cd /usr/local/nginx/html/

(平滑重启nginx???没啥用好像 …/sbin/nginx -s reload)

访问http://192.168.1.100/B961041_20191126155620000_00003.mp4

当我们reboot后发现,nginx不再启动,所以我们配置自动重启

vi /etc/rc.local

增加一行 /usr/local/nginx/sbin/nginx
设置执行权限:

cd /etc

chmod 755 rc.local

当然咯,我们可以改变ip地址,把80改成which ever you want
也可以改nginx路径,先关闭nginx,把

location / {
root html;
index index.html index.htm;
}
里面的htlm改成绝对路径,如/data/download;这种,然后./nginx启动

小贴士

1.启动、停止nginx

cd /usr/local/nginx/sbin/

./nginx

./nginx -s stop

./nginx -s quit

./nginx -s reload重新加载配置文件(不需要重启)

./nginx -s quit:此方式停止步骤是待nginx进程处理任务完毕进行停止。
./nginx -s stop:此方式相当于先查出nginx进程id再使用kill命令强制杀掉进程。

2.重启 nginx

先停止再启动(推荐):
对 nginx 进行重启相当于先停止再启动,即先执行停止命令再执行启动命令。如下:

./nginx -s quit
./nginx

3.重新加载配置文件:

当 nginx的配置文件 nginx.conf 修改后,要想让配置生效需要重启 nginx,使用-s reload 不用先停止 nginx再启动 nginx 即可将配置信息在 nginx 中生效,如下:
./nginx -s reload

即可启动成功

4.nginx在哪

whereis nginx

nginx: /usr/local/nginx
引用:

https://zhidao.baidu.com/question/436695753.html

https://blog.youkuaiyun.com/fukai8350/article/details/80634566

https://blog.youkuaiyun.com/weixin_34021089/article/details/91622151

### IntelliJ IDEA 中通义 AI 功能介绍 IntelliJ IDEA 提供了一系列强大的工具来增强开发体验,其中包括与通义 AI 相关的功能。这些功能可以帮助开发者更高效地编写代并提高生产力。 #### 安装通义插件 为了使用通义的相关特性,在 IntelliJ IDEA 中需要先安装对应的插件: 1. 打开 **Settings/Preferences** 对话框 (Ctrl+Alt+S 或 Cmd+, on macOS)。 2. 导航到 `Plugins` 页面[^1]。 3. 在 Marketplace 中搜索 "通义" 并点击安装按钮。 4. 完成安装后重启 IDE 使更改生效。 #### 配置通义服务 成功安装插件之后,还需要配置通义的服务连接信息以便正常使用其提供的各项能力: - 进入设置中的 `Tools | Qwen Coding Assistant` 菜单项[^2]。 - 填写 API Key 和其他必要的认证参数。 - 测试连接以确认配置无误。 #### 使用通义辅助编程 一旦完成上述准备工作,就可以利用通义来进行智能编支持了。具体操作如下所示: ##### 自动补全代片段 当输入部分语句时,IDE 将自动提示可能的后续逻辑,并允许一键插入完整的实现方案[^3]。 ```java // 输入 while 循环条件前半部分... while (!list.isEmpty()) { // 激活建议列表选择合适的循环体内容 } ``` ##### 解释现有代含义 选中某段复杂的表达式或函数调用,右键菜单里会有选项可以请求通义解析这段代的作用以及优化意见。 ##### 生产测试案例 对于已有的业务逻辑模块,借助于通义能够快速生成单元测试框架及初始断言集,减少手动构建的成本。 ```python def test_addition(): result = add(2, 3) assert result == 5, f"Expected 5 but got {result}" ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值