QD港服务器配置完整过程
目录
一、安装ubuntu16-server系统
二、配置软件环境
1.换源
2.安装显卡驱动:
3.安装cuda
4.安装cudnn
5.安装ffmpeg:
6.安装nginx:
7.安装opencv
8.安装python3.8
三、程序调试
1.进行某些依赖的补充:
2.补充
3.测试
一、安装ubuntu16-server系统
安装过程如下图:
二、配置软件环境
1.换源
(1)备份:
sudo cp /etc/apt/sources.list /etc/apt/sources.bak1
(2)使用编辑器打开源文件:
sudo vim /etc/apt/sources.list
(3)替换为国内镜像源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
(4)更新
sudo apt-get update
2.安装显卡驱动:
(1)下载官方驱动:根据自己的显卡型号下载相应驱动:官方驱动 | NVIDIA
(2)将下载好的文件拷贝至 /home/dell 目录下
(3)安装依赖文件:
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install make
(4)禁用nouveau:
# 打开配置文件
sudo vim /etc/modprobe.d/blacklist.conf
# 在配置文件最后加入下面两行
blacklist nouveau
options nouveau modeset=0
(5)更新:
sudo update-initramfs -u
(6)重启服务器:
sudo reboot
(7)验证nouveau是否被禁用:
lsmod | grep nouveau
若没有任何输入,则表明已被禁用。
(8)安装驱动:
# 卸载系统中存在的驱动,默认有安装的
sudo apt-get remove nvidia-*
# 给以权限
sudo chmod a+x NVIDIA-Linux-x86_64-xxx.run
# 安装
sudo ./NVIDIA-Linux-x86_64-xxx.run -no-x-check -no-nouveau-check -no-opengl-files# -no-x-check:安装驱动时关闭X服务
# -no-nouveau-check:安装驱动时禁用nouveau
# -no-opengl-files:只安装驱动文件,不安装OpenGL文件
(9)检查安装情况:
nvidia-smi
nvidia-setting
3.安装cuda
(1)查看N卡最高支持的cuda版本:
nvidia-smi
如下图所示:最高支持为11.4
(2)将cuda安装包下载到/home/dell/目录下:
cuda下载地址:https://developer.nvidia.com/cuda-toolkit-archive ,选择runfile,如下图所示:
(3)安装相应依赖:
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
(4)安装:
sudo sh cuda_10.0.130_410.48_linux.run
如果出现错误,查看错误提示,可能的解决方法(我碰见的)
sudo sh cuda_10.0.130_410.48_linux.run --override
(5)在~/.bashrc文件最后两行添加如下环境变量:
sudo vim ~/.bashrc
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
(6)进行更新:
source ~/.bashrc
(7)检查是否安装成功:
nvcc -V
4.安装cudnn
(1)下载cudnn,下载地址:cuDNN Archive | NVIDIA Developer
选择与cuda相对用的版本:
(2)解压安装包:
tar -xvf cudnn-linux-x86_64-8.x.x.x_cudaX.Y-archive.tar.xz
(3)将cudnn拷贝至cuda toolkit路径下:用复制的方式进行安装:
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
(4)用命令查看是否安装成功:
cat /usr/local/cuda-10.0/include/cudnn.h | grep CUDNN_MAJOR -A 2
5.安装ffmpeg:
sudo apt-get install ffmpeg
6.安装nginx:
(1):
sudo apt-get install nginx
(2):修改nginx配置文件:
apt-get install 安装放置的默认位置:
/usr/sbin/nginx #主程序
/etc/nginx #存放配置文件
/usr/share/nginx #存放静态文件
/var/log/nginx #存放日志
备份+创建新文档
sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
sudo vim /etc/nginx/nginx.conf
在创建的新nginx.conf文件中写入如下内容:
#user root;
worker_processes 1;#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;#pid logs/nginx.pid;events {worker_connections 1024;
}rtmp {server {listen 10000; #服务端口--默认chunk_size 4096; #数据传输块的大小--默认#设置直播的application名称是 myliveapplication mylive{live on; #live on表示开启直播模式}}server {listen 10001;chunk_size 4096;application mylive{live on;}}server {listen 10002;chunk_size 4096;application mylive{live on;}}server {listen 10003;chunk_size 4096;application mylive{live on;}}server {listen 10004;chunk_size 4096;application mylive{live on;}}server {listen 10005;chunk_size 4096;application mylive{live on;}}server {listen 10006;chunk_size 4096;application mylive{live on;}}server {listen 10007;chunk_size 4096;application mylive{live on;}}server {listen 10008;chunk_size 4096;application mylive{live on;}}
}http {include mime.types;default_type application/octet-stream;log_format main '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';#access_log logs/access.log main;sendfile on;#tcp_nopush on;#keepalive_timeout 0;keepalive_timeout 65;#gzip on;server{access_log logs/access_8001.log main;listen 8001;#server_name security-admin;root /home/dell/sec/www;location / {try_files $uri $uri/ /index.html =404;}}server {listen 80;server_name localhost;#charset koi8-r;#access_log logs/host.access.log main;location / {root html;index index.html index.htm;}#error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {# proxy_pass http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {# root html;# fastcgi_pass 127.0.0.1:9000;# fastcgi_index index.php;# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;# include fastcgi_params;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {# deny all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {# listen 8000;# listen somename:8080;# server_name somename alias another.alias;# location / {# root html;# index index.html index.htm;# }#}# HTTPS server##server {# listen 443 ssl;# server_name localhost;# ssl_certificate cert.pem;# ssl_certificate_key cert.key;# ssl_session_cache shared:SSL:1m;# ssl_session_timeout 5m;# ssl_ciphers HIGH:!aNULL:!MD5;# ssl_prefer_server_ciphers on;# location / {# root html;# index index.html index.htm;# }#}server {listen 8081;server_name localhost;location / {root html;index index.html index.htm;}location /pop/video {alias /var/video;}location /info {rtmp_stat all;rtmp_stat_stylesheet stat.xsl;}location /stat.xsl {#root html;root /home/nginx/nginx-rtmp-module-master/nginx-rtmp-module-master/;}}
}
7.安装opencv
(1)安装依赖:
sudo apt-get install build-essential -y
sudo apt-get install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev -y
(2)下载opencv源码:
wget https://github.com/Itseez/opencv/archive/3.4.15.zip
(3)解压:
sudo unzip 3.4.15.zip
(4)开始编译安装
cd opencv-3.4.15/
sudo mkdir build
cd build
sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
sudo make
sudo make install
(5)配置opencv环境:
(a)首先江opencv的库添加到路径,从而让系统可以找到:
sudo vim /etc/ld.so.conf.d/opencv.conf
(b)执行此命令后打开的可能是一个空白的文件,不用管,只需要在文件末尾添加:
/usr/local/lib
(c)执行下列命令使配置路径生效:
sudo ldconfig
(d)配置bash:
sudo vim /etc/bash.bashrc
在末尾加上:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH
(e)保存,执行如下命令使得配置生效:
source /etc/bash.bashrc
参考链接:ubuntu16 安装 opencv(亲测有效) - it610.com
8.安装python3.8
(1)首先检查是否安装:
python3 --version
如果没有的话:
sudo apt-get install python3.8
(2)安装pip3:
sudo apt-get install python3-pip
(3)安装python-opencv:
sudo pip3 install opencv-python
三、程序调试
1.进行某些依赖的补充:
(1)修改配置文件:
sudo vim /etc/ld.so.conf
将配置文件的内容改为如下:
include /etc/ld.so.conf.d/*.conf
/home/SST/lib/
/home/SST/lib/HVNetSDKCom/
/usr/local/cuda/lib64/usr/local/lib
/usr/loacal/lib
/home/dell/libgdiplus_build/lib
(1)将SST文件(14服务器的)拷贝至 /dell 目录下:
(2)进入SST目录下:
cd /home/SST
(3)使用命令查看可执行文件sst_main缺少的依赖:
ldd sst_main
(4)将14服务器上的包拷贝至本台服务器
(5)使用命令更新ld.so.conf文件:
sudo /sbin/ldconfig /etc/ld.so.conf
(6)重复(3)(4)(5)命令,直至ldd中无缺少依赖
2.补充
执行下列命令:
cd /home/SST/FIFO
sudo mkfifo fifo
sudo mkfifo fifo1
sudo mkfifo fifo2
sudo mkfifo fifo3
sudo mkfifo fifo4
sudo mkfifo fifo5
sudo mkfifo fifo6
sudo mkfifo fifo7
sudo mkfifo fifo8
3.测试
cd /home/SST/FIFO
python3 run_now.py
QD港服务器配置完整过程相关推荐
- Qt最新版5.14在Windows环境静态编译安装和部署的完整过程 VS 2019-Qt static link build Windows 32 bit/64 bit
文章目录 为什么要静态编译(static link) 1.源码下载/source code download 2. 编译工具下载/compiler download 编译环境选择:MinGW/MSVC ...
- Qt最新版5.13在Windows环境静态编译安装和部署的完整过程(VS 2017/VS 2019)
文章目录 为什么要静态编译 1.源码下载 2. 编译工具下载 ActivePerl Python Ruby 编译环境选择 3.编译 1.修改源码里的qtbase\mkspecs\common\msvc ...
- Qt最新版5.12在Windows环境静态编译安装和部署的完整过程(VS2017)
文章目录 为什么要静态编译 1.源码下载 2. 编译工具下载 ActivePerl Python Ruby 编译环境选择 3.编译 1.修改源码里的qtbase\mkspecs\common\msvc ...
- 【组合数学】递推方程 ( 无重根递推方程求解实例 | 无重根下递推方程求解完整过程 )
文章目录 一.斐波那契数列求解 二.无重根下递推方程求解完整过程 一.斐波那契数列求解 1 . 斐波那契数列示例 : ( 1 ) 斐波那契数列 : 1,1,2,3,5,8,13,⋯1 , 1 , 2 ...
- StartSSL免费SSL证书申请和账户注册完整过程
HTTPS就等于HTTP加上TLS(SSL),HTTPS协议的目标主要有三个: 数据保密性.保证内容在传输过程中不会被第三方查看到.就像快递员传递包裹时都进行了封装,别人无法知道里面装了什么东西. 数 ...
- Ubuntu上snmp安装、配置、启动及远程测试完整过程
0.说明 关于一个完整的教程,还是那句话,国内的要么不完整,要么就太旧了,而且思路也不清晰,所以这里写一篇完整的给大家分享一下. 虽然对于Linux主机的监控可以通过执行特定的命令来完成,但是相比之后 ...
- caffe学习笔记18-image1000test200数据集分类与检索完整过程
image1000test200数据集分类与检索完整过程: 1.准备数据:数据集图片分10个类,每个类有100个train图片(train文件夹下,一共1000),20个test图片(val文件夹下, ...
- 虚拟机安装windows ghost版本系统记录完整过程
重点 1.磁盘一定要分成2个 2.直接安装第一个盘 就是进入CD后选1 自动安装 https://blog.csdn.net/hanzl1/article/details/79298787 虚拟 ...
- OpenCV训练SVM模型并预测的完整过程
1 批量读取一个文件夹中的所有照片 1.当文件中的图片命名有一定规则时: for (int i = 1; i < 100; i++) //100{stringstream ss;string s ...
最新文章
- Q 版老黄带着硬核技术再登场,有点可爱,很有东西
- 关于类黄酮和类胡萝卜素
- append有时加载不出来_关于艾拉浏览器看漫画,有时加载慢的解决方法,你知道了吗...
- 右击硬盘分区第一项出现Auto的解决办法
- linux mysql 主从数据库_【Linux】【MySQL】MySQL主从数据库
- Android性能检测--traceview工具各个参数的意思
- linux 读写信号量学习
- Bootloader解锁加锁 Android刷机
- win10怎么安装ie11
- 程序员面试的注意事项(一):面试的流程
- OPA2134UA IC AUDIO 2 CIRCUIT 8SOIC
- 转轮密码机的加解密算法实现
- C#开发工控上位机编程 csdn_C#串口编程示例
- 苹果 watchOS 3.2 首个测试版:剧场模式、SiriKit
- 通达信软件接口是什么?能看得到五档报价吗?
- 把USB打印机映射到LPT端口
- 高防CDN有什么特点?
- 数据共享-spark中共享变量深度解析
- 3.Single Image Dehazing via MSCNN-HE 论文阅读
- no remote repository