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 ]
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main
# deb-src http://security.ubuntu.com/ubuntu xenial-security main
deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main
# deb-src http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main
deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo focal main
# deb-src http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo focal main
deb https://librealsense.intel.com/Debian/apt-repo focal main
# 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
set encoding=utf-8
set nu "等同于 set number
set cursorline "等同于 set cul
set cursorcolumn "等同于 set cuc
set clipboard+=unnamed
set nobackup
set autowrite
set noeb
set ttimeout
set ttimeoutlen=100
set confirm
set backspace=indent,eol,start
set nocompatible
set mouse=n
set showmatch
set tabstop=4
set shiftwidth=4
set noexpandtab
set laststatus=2
map
function AddTitle()
call append(0,"/*")
call append(1,"# ******************************************************")
call append(2,"# Author : Jetaime ")
call append(3,"# Last modified: ".strftime("%Y-%m-%d %H:%M"))
call append(4,"# Email : stay2616@126.com")
call append(5,"# Website : www.niyouduo.com")
call append(6,"# Filename : ".expand("%:t"))
call append(7,"# Description : ")
call append(8,"# ******************************************************")
call append(9,"*/")
echohl WarningMsg | echo "Successful in adding copyright." | echohl None
endf
function UpdateTitle()
normal m'
execute '/# Last modified/s@:.*$@\=strftime(":\t%Y-%m-%d %H:%M")@'
normal ''
normal mk
execute '/# Filename/s@:.*$@\=":\t".expand("%:t")@'
execute "noh"
normal 'k
echohl WarningMsg | echo "Successful in updating the copyright." | echohl None
endfunction
function TitleDet()
let n=1
while n < 10
let line = getline(n)
if line =~ '^\#\s*\S*Last\smodified\S*.*$'
call UpdateTitle()
return
endif
let n = n + 1
endwhile
call AddTitle()
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.0Copyright (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
sudo apt install gcc-9-aarch64-linux-gnu
sudo apt install gcc-aarch64-linux-gnu
sudo apt install g++-9-aarch64-linux-gnu
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
blacklist nouveau
options nouveau modeset=0
20.jump to the directory u downloaded and install the driver
sudo chmod a+x NVIDIA-Linux-x86_64-535.54.03.run
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 ]
wget https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda_11.6.0_510.39.01_linux.run
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
export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64:
export CUDA_HOME=/usr/local/cuda-11.6/bin
export PATH=$PATH:$LD_LIBRARY_PATH:$CUDA_HOME
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driverCopyright (c) 2005-2021 NVIDIA CorporationBuilt on Fri_Dec_17_18:16:03_PST_2021Cuda compilation tools, release 11.6, V11.6.55Build 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]
export PTAH=$PATH:/home/beta/anaconda3/bin
# init conda.sh
. /home/beta/anaconda3/etc/profile.d/conda.sh
alias in_base='conda activate base'
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 源名称或链接 # 指定下载源
conda uninstall xxx ———————————————— 版权声明:本文为CSDN博主「高启强668」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/zhognsc08/article/details/122735811
25.install mysql
sudo apt-get update
sudo apt-get upgrade
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 = localhostuser = debian-sys-maintpassword = SyHeS5GBeomdJpL4socket = /var/run/mysqld/mysqld.sock[mysql_upgrade]host = localhostuser = debian-sys-maintpassword = SyHeS5GBeomdJpL4socket = /var/run/mysqld/mysqld.sock
========================================
login in with "SyHeS5GBeomdJpL4", add user info [ test / 123456 ]
mysql -u debian-sys-maint -p
-------------------------
input password
-------------------------
use mysql;
SELECT version();
↓ if the database version is later than 8.0 use ↓
mysql> create user test@'localhost' identified by '123456';
mysql> grant all privileges on test.* to test@'localhost';
mysql> flush privileges;
26.install mosquitto
sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt install mosquitto mosquitto-clients
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
sudo systemctl restart mosquitto
sudo ln -s /usr/local/lib/libmosquitto.so.1 /usr/lib/libmosquitto.so.1
sudo ldconfig
test message : use Mosquitto , pub send and sub receive
mosquitto_sub -u test -P 123456 -t "home/beta"
mosquitto_pub -u test -P 123456 -m "this is a test message" -t "home/beta"
28.sudo apt install cmake
29.rtmp publish dependencies
x264
sudo apt-get install libx264-dev
faac
sudo apt-get intall libfaac-dev
librtmp
sudo apt-get install librtmp-dev
alsa
sudo apt-get install libasound2-dev
精彩文章
发表评论