• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

autopilot env help

武飞扬头像
mrpanwei
帮助1

1. down ubuntu-20.04.6-desktop-amd64.iso

2.create boot system disks (UltraISO)

3.set BIOS boot sequence (boot from a USB flash drive)

4.install ISO,set the user name and password

5.backup and replace the original source [ /etc/apt/sources.list ]

  1.  
    deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  2.  
    deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  3.  
    deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  4.  
    deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  5.  
    ##测试版源
  6.  
    deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  7.  
    # 源码
  8.  
    deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  9.  
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  10.  
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  11.  
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  12.  
    ##测试版源
  13.  
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  14.  
    deb http://security.ubuntu.com/ubuntu xenial-security main
  15.  
    # deb-src http://security.ubuntu.com/ubuntu xenial-security main
  16.  
    deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main
  17.  
    # deb-src http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main
  18.  
    deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo focal main
  19.  
    # deb-src http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo focal main
  20.  
    deb https://librealsense.intel.com/Debian/apt-repo focal main
  21.  
    # deb-src https://librealsense.intel.com/Debian/apt-repo focal main
学新通

6.after system is installed ,open the terminal to start configuration

sudo apt-get update

7.restart  now

8.install git

sudo apt install git

9.install vim

sudo apt install vim

10.create [ .vimrc ],stored under [ ~/.vimrc ] directory,then  source ~/.vimrc

  1.  
    set encoding=utf-8
  2.  
    set nu "等同于 set number
  3.  
    set cursorline "等同于 set cul
  4.  
    set cursorcolumn "等同于 set cuc
  5.  
    set clipboard =unnamed
  6.  
    set nobackup
  7.  
    set autowrite
  8.  
    set noeb
  9.  
    set ttimeout
  10.  
    set ttimeoutlen=100
  11.  
    set confirm
  12.  
    set backspace=indent,eol,start
  13.  
    set nocompatible
  14.  
    set mouse=n
  15.  
    set showmatch
  16.  
    set tabstop=4
  17.  
    set shiftwidth=4
  18.  
    set noexpandtab
  19.  
    set laststatus=2
  20.  
     
  21.  
    map <F1> :call TitleDet()<cr>
  22.  
    function AddTitle()
  23.  
    call append(0,"/*")
  24.  
    call append(1,"# ******************************************************")
  25.  
    call append(2,"# Author : Jetaime ")
  26.  
    call append(3,"# Last modified: ".strftime("%Y-%m-%d %H:%M"))
  27.  
    call append(4,"# Email : stay2616@126.com")
  28.  
    call append(5,"# Website : www.niyouduo.com")
  29.  
    call append(6,"# Filename : ".expand("%:t"))
  30.  
    call append(7,"# Description : ")
  31.  
    call append(8,"# ******************************************************")
  32.  
    call append(9,"*/")
  33.  
    echohl WarningMsg | echo "Successful in adding copyright." | echohl None
  34.  
    endf
  35.  
     
  36.  
    function UpdateTitle()
  37.  
    normal m'
  38.  
    execute '/# Last modified/s@:.*$@\=strftime(":\t%Y-%m-%d %H:%M")@'
  39.  
    normal ''
  40.  
    normal mk
  41.  
    execute '/# Filename/s@:.*$@\=":\t".expand("%:t")@'
  42.  
    execute "noh"
  43.  
    normal 'k
  44.  
    echohl WarningMsg | echo "Successful in updating the copyright." | echohl None
  45.  
    endfunction
  46.  
     
  47.  
    function TitleDet()
  48.  
    let n=1
  49.  
    while n < 10
  50.  
    let line = getline(n)
  51.  
    if line =~ '^\#\s*\S*Last\smodified\S*.*$'
  52.  
    call UpdateTitle()
  53.  
    return
  54.  
    endif
  55.  
    let n = n 1
  56.  
    endwhile
  57.  
    call AddTitle()
  58.  
    endfunction
学新通

11. install x86 compliler (gcc/g )

sudo apt install gcc g  

12.view the compiler version [ gcc --version   /  g --version ]

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.

13.see which cross-compilers can be installed [ sudo apt-cache search aarch64 ]

14.here,we install aarch64-9

  1.  
    sudo apt install gcc-9-aarch64-linux-gnu
  2.  
    sudo apt install gcc-aarch64-linux-gnu
  1.  
    sudo apt install g -9-aarch64-linux-gnu
  2.  
    sudo apt install g -aarch64-linux-gnu

15.check computer's graphics card [ or lspci | grep -i nvidia ]

lshw -c video

*-display

description: VGA compatible controller

product: TU106 [GeForce RTX 2060]

vendor: NVIDIA Corporation

physical id: 0

bus info: pci@0000:01:00.0

version: a1

width: 64 bits

clock: 33MHz

capabilities: pm msi pciexpress vga_controller bus_master cap_list rom

configuration: driver=nouveau latency=0

resources: irq:185 memory:82000000-82ffffff memory:70000000-7fffffff memory:80000000-81ffffff ioport:4000(size=128) memory:83080000-830fffff

*-display

description: VGA compatible controller

product: UHD Graphics

vendor: Intel Corporation

physical id: 2

bus info: pci@0000:00:02.0

version: 05

width: 64 bits

clock: 33MHz

capabilities: pciexpress msi pm vga_controller bus_master cap_list rom

configuration: driver=i915 latency=0

resources: iomemory:600-5ff iomemory:400-3ff irq:186 memory:6022000000-6022ffffff memory:4000000000-400fffffff ioport:5000(size=64) memory:c0000-dffff

01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060] (rev a1)

01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)

01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1)

01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU106 USB Type-C UCSI Controller (rev a1)

16.install pip

sudo apt-get install python3-pip

17.install nvidia  graphics driver

18.check whether nouveau is disabled

lsmod | grep nouveau

if there is no output,it is successfully masked

19.forbidden nouveau

sudo vim /etc/modprobe.d/blacklist.conf

add

  1.  
    blacklist nouveau
  2.  
    options nouveau modeset=0

20.jump to the directory u downloaded and install the driver

  1.  
    sudo chmod a x NVIDIA-Linux-x86_64-535.54.03.run
  2.  
     
  3.  
    sudo ./NVIDIA-Linux-x86_64-535.54.03.run -no-x-check -no-nouveau-check -no-opengl-files

21.is successed? u will see !

nvidia-smi

Tue Jun 20 23:35:34 2023

---------------------------------------------------------------------------------------

| NVIDIA-SMI 535.54.03 Driver Version: 535.54.03 CUDA Version: 12.2 |

|----------------------------------------- ---------------------- ----------------------

| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |

| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |

| | | MIG M. |

|========================================= ====================== ======================|

| 0 NVIDIA GeForce RTX 2060 Off | 00000000:01:00.0 Off | N/A |

| N/A 56C P0 21W / 80W | 0MiB / 6144MiB | 0% Default |

| | | N/A |

----------------------------------------- ---------------------- ----------------------

---------------------------------------------------------------------------------------

22.Download Installer for Linux Ubuntu 20.04 x86_64 [ cuda11.6 ]

  1.  
    wget https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run
  2.  
     
  3.  
    sudo sh cuda_11.6.0_510.39.01_linux.run

PATH includes /usr/local/cuda-11.6/bin

- LD_LIBRARY_PATH includes /usr/local/cuda-11.6/lib64, or, add /usr/local/cuda-11.6/lib64 to /etc/ld.so.conf and run ldconfig as root

23.config cuda

vim ~/.bashrc
  1.  
    export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64:
  2.  
    export CUDA_HOME=/usr/local/cuda-11.6/bin
  3.  
    export PATH=$PATH:$LD_LIBRARY_PATH:$CUDA_HOME
nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:16:03_PST_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0

24.install  anaconda

down from Free Download | Anaconda . then install

bash Anaconda3-2023.03-1-Linux-x86_64.sh 

how to init (self)

source anaconda3/bin/activate

25.config anaconda [vim ~/.bashrc]

  1.  
    export PTAH=$PATH:/home/beta/anaconda3/bin
  2.  
    # init conda.sh
  3.  
    . /home/beta/anaconda3/etc/profile.d/conda.sh
  4.  
    alias in_base='conda activate base'
  5.  
    alias out_base='conda deactivate'

一、创建虚拟环境

conda  create  --name  env_name

conda  create  --name  env_name python=3.5 # 创建指定python版本

conda  create  --name  env_name python=3.5 numpy scipy # 创建指定python版本下包含某些包

二、激活/使用/进入某个虚拟环境

activate  env_name

三、退出当前环境

deactivate

四、复制某个虚拟环境

conda  create  --name  new_env_name  --clone  old_env_name

五、删除某个环境

conda  remove  --name  env_name  --all

六、查看当前所有环境

conda  info  --envs   或者  conda  env  list

七、查看当前虚拟环境下的所有安装包

conda  list  需进入该虚拟环境

conda  list  -n  env_name

八、安装或卸载包(进入虚拟环境之后)

conda  install  xxx

conda  install  xxx=版本号  # 指定版本号

conda  install  xxx -i 源名称或链接 # 指定下载源

25.install mysql

  1.  
    sudo apt-get update
  2.  
    sudo apt-get upgrade
  3.  
    sudo apt-get install mysql-server

26.modify username & password

sudo cat /etc/mysql/debian.cnf

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = SyHeS5GBeomdJpL4
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = SyHeS5GBeomdJpL4
socket   = /var/run/mysqld/mysqld.sock

========================================

login in with "SyHeS5GBeomdJpL4", add user info [  test  / 123456  ]

  1.  
    mysql -u debian-sys-maint -p
  2.  
     
  3.  
    -------------------------
  4.  
    input password
  5.  
    -------------------------
  6.  
     
  7.  
    use mysql;
  8.  
     
  9.  
    SELECT version();

↓  if the database version is later than 8.0 use  ↓ 

  1.  
    mysql> create user test@'localhost' identified by '123456';
  2.  
    mysql> grant all privileges on test.* to test@'localhost';
  3.  
    mysql> flush privileges;

26.install mosquitto

  1.  
    sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa
  2.  
     
  3.  
    sudo apt install mosquitto mosquitto-clients
  4.  
     
  5.  
    sudo systemctl status mosquitto

27.config mosquitto  [ test /123456 ]

sudo mosquitto_passwd -c /etc/mosquitto/passwd test

here we set password "123456"

sudo vim /etc/mosquitto/conf.d/default.conf
listener 1883
password_file /etc/mosquitto/passwd
  1.  
    sudo systemctl restart mosquitto
  2.  
     
  3.  
    sudo ln -s /usr/local/lib/libmosquitto.so.1 /usr/lib/libmosquitto.so.1
  4.  
     
  5.  
    sudo ldconfig

test  message : use Mosquitto , pub send and sub receive

  1.  
    mosquitto_sub -u test -P 123456 -t "home/beta"
  2.  
     
  3.  
     
  4.  
    mosquitto_pub -u test -P 123456 -m "this is a test message" -t "home/beta"

28.sudo apt install cmake

29.rtmp publish dependencies

  1.  
    x264
  2.  
     
  3.  
    sudo apt-get install libx264-dev
  4.  
     
  5.  
    faac
  6.  
     
  7.  
    sudo apt-get intall libfaac-dev
  8.  
     
  9.  
    librtmp
  10.  
     
  11.  
    sudo apt-get install librtmp-dev
  12.  
     
  13.  
    alsa
  14.  
     
  15.  
    sudo apt-get install libasound2-dev
学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgkefhi
系列文章
更多 icon
同类精品
更多 icon
继续加载