主頁 > 作業系統 > AutoWare.auto 與ROS2 親測安裝成功

AutoWare.auto 與ROS2 親測安裝成功

2022-05-21 09:12:00 作業系統

鏡像下載、域名決議、時間同步請點擊 阿里云開源鏡像站

AutoWare.auto 安裝實踐

1. 相關程式版本說明

ubuntu版本:20.04 ADE:4.4.0

Autoware.auto版本(基于ROS2):autoware.auto foxy, ros foxy

2. Docker安裝

以下操作,請確定自己已經換源了,不然下載很慢的,參考Ubuntu20.04軟體源更換 - 知乎

Ubuntu系統中,軟體源檔案地址為:/etc/apt/sources.list

1.備份原來的源,將以前的源備份一下,以防以后可以用的,

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.打開/etc/apt/sources.list檔案,在前面添加如下條目,并保存,

$ sudo vim /etc/apt/sources.list(可將vim更換為自己熟悉的編輯器)

添加阿里源

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

3.更新

更新源

$ sudo apt-get update

如出現依賴問題,解決方式如下:

$ sudo apt-get -f install

更新軟體:

$ sudo apt-get upgrade

官方安裝教程:Install Docker Engine on Ubuntu | Docker Documentation

// 卸載舊版本docker

#Uninstall old versions
$ sudo apt-get remove docker docker-engine docker.io containerd runc

#Uninstall Docker Engine
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd

// 使用docker repository安裝docker engine

#step1:在新主機上首次安裝Docker Engine之前,需要設定Docker存盤庫,之后,您可以從存盤庫安裝和更新Docker
#更新apt軟體包索引并安裝軟體包,以允許apt通過HTTPS使用存盤庫
$ sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

#Step2:Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

#Step3:Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
$ echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  
#Step4:Install Docker Engine
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io //如果沒有指定版本,默認安裝最高版本

#Step5:Verify that Docker Engine is installed correctly by running the hello-world image.
$ sudo docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

Manage Docker as a non-root user

# 創建docker用戶組
$ sudo groupadd docker
#將當前用戶加入docker用戶組
$ sudo usermod -aG docker $USER
#Log out and log back in so that your group membership is re-evaluated.
$ newgrp docker 
#Verify that you can run docker commands without sudo.
$ docker run hello-world

$ sudo chmod 666 /var/run/docker.sock
#重啟電腦或者重啟docker服務
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
$ sudo docker login registry.gitlab.com # Use token from Gitlab

3. Autoware.auto容器安裝

3.1 程式說明

基于Docker封裝的開發容器,包含以下內容:

file

3.2 ADE安裝

ADE 是模塊化的 Docker-based 工具,它確保所有的開發者構建專案時有一個共同的、一致的開發環境

官網安裝檔案:Installation — ADE 4.4.0dev documentation

#install it in “/usr/local/bin” PATH
$ cd  /usr/local/bin 
$ sudo wget https://gitlab.com/ApexAI/ade-cli/-/jobs/1859684348/artifacts/raw/dist/ade+x86_64
$ sudo mv ade+x86_64 ade
$ sudo chmod +x ade
$ which ade
/path/to/ade
# 查看ade版本號
$ ade --version
<version>
# Update ade
$ sudo ./ade update-cli     #這個地方需要一段時間
Newer version available:
  4.4.0
  4.3.0
  4.2.0
Do you want to update to version 4.4.0 [y/N]: y
?
<!-- '注意:升級ade版本可能會報錯 “PermissionError: [Errno 13] Permission denied: '/usr/local/bin/ade'”,切換root用戶再次執行,問題解決'->

3.3 Autoware容器安裝

官網安裝檔案:Installation with ADE

  1. 使用ADE安裝Autoware.auto環境,ROS2和Autoware.auto已經預編譯,安裝了二進制版本,默認安裝在/opt目錄下
$ mkdir -p ~/adehome
$ cd ~/adehome
$ touch .adehome
$ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
'注意:不要使用官網視頻課程里面的遞回回圈安裝,編譯會報錯' 
'git clone --recurse-submodules https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git'

$ cd AutowareAuto

#拉取一些其他分支到master
$ vcs import < autoware.auto.$ROS_DISTRO.repos

#切換到發布分支,如果不切換,默認使用master 分支代碼,可能包含一些正在開發的功能,建議切換穩定發布版本
$ git checkout tags/1.0.0 -b release-1.0.0

#共享環境變數
$ cd ~
$ mv ~/.bashrc ~/adehome/.bashrc
$ ln -s ~/adehome/.bashrc

$ cd ~/adehome/AutowareAuto
#其實,有很多預先配置好的ADE環境供我們選擇,官網提供了三個ADE組態檔:AMD64/ARM64/AMD64+LGSVL
$ ls -l .aderc*

lrwxrwxrwx 1 wtcl wtcl  17 12月 23 12:14 .aderc -> .aderc-amd64-foxy
-rw-rw-r-- 1 wtcl wtcl 407 12月 23 12:25 .aderc-amd64-dashing
-rw-rw-r-- 1 wtcl wtcl 499 12月 23 12:25 .aderc-amd64-dashing-lgsvl
-rw-rw-r-- 1 wtcl wtcl 401 12月 23 12:25 .aderc-amd64-foxy
-rw-rw-r-- 1 wtcl wtcl 490 12月 23 12:25 .aderc-amd64-foxy-lgsvl
lrwxrwxrwx 1 wtcl wtcl  17 12月 23 12:14 .aderc-arm64 -> .aderc-arm64-foxy
-rw-rw-r-- 1 wtcl wtcl 407 12月 23 12:25 .aderc-arm64-dashing
-rw-rw-r-- 1 wtcl wtcl 401 12月 23 12:25 .aderc-arm64-foxy
lrwxrwxrwx 1 wtcl wtcl  23 12月 23 12:14 .aderc-lgsvl -> .aderc-amd64-foxy-lgsvl

#可以看到有好幾種可選的環境,其中.aderc-lgsvl對應的環境中包含LGSVL模擬器,然后,可以通過如下命令,切換并進入相應的ADE環境:
#二選一安裝,這個地方安裝有點慢,需要等待一會,ade --rc 命令可以加載并啟動相關的鏡像容器
$ ade --rc .aderc-amd64-foxy  start --update --enter

<!-- '注意:啟動ade報錯 
“Starting ade with the following images:
ade-foxy    | ec7293d289ad | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/ade-foxy:master   
binary-foxy | 9ffc6c658b7a | master | registry.gitlab.com/autowarefoundation/autoware.auto/autowareauto/amd64/binary-foxy:master
ade_registry.gitlab.com_autowarefoundation_autoware.auto_autowareauto_amd64_binary-foxy_master
xhost:  unable to open display "localhost:10.0"
WARNING: Could not find xhost, you won't be able to launch X applications"
解決辦法:設定本地顯示命令-- $ export DISPLAY=localhost:10.0 $ xhost +>

#What is where inside ADE?
ade$ls /opt
AutowareAuto # image: binary-foxy:master
lgsvl        # image: ade-lgsvl/foxy:2020.06
ros          # image: ade-foxy:master

ade安裝程序中可能需要訪問gitlab的令牌,需要登錄gitlab申請

In one terminal, source the setup file and then run a C++ talker:

ade$ ade enter
ade$ source ~/AutowareAuto/install/setup.bash
ade$ ros2 run demo_nodes_cpp talker
In another terminal source the setup file and then run a Python listener:

ade$ cd ~/AutowareAuto
ade$ source ~/AutowareAuto/install/setup.bash
ade$ ros2 run demo_nodes_py listener
You should see the talker saying that it’s Publishing messages and the listener saying I heard those messages. This verifies both the C++ and Python APIs are working properly. Hooray!

#docker容器 清理無用鏡像,卷
$ cd ~/adehome/AutowareAuto
$ ade start

#To assess the disk usage situation, run the following command:
$ docker system df

#Use docker system prune to remove any Docker items not used for currently running containers:
$ docker system prune -a --volumes

#Restart your system after installing the new NVIDIA driver.
ade$ exit
$ ade stop
$ ade start --update --enter

安裝完成后運行

ade $ros2 run demo_nodes_cpp talker 不作業,沒辦法,繼續使用原始碼進行編譯安裝

issue回復:colcon build failed on trajectory.hpp file not found (#67) · Issues · ApexAI / AutowareClass2020 · GitLab

  1. 使用原始碼編譯安裝Autoware.auto 和 ROS2

Autoware.auto官網安裝檔案:Installation w/o ADE

ROS2官網安裝檔案:Building ROS 2 on Ubuntu Linux — ROS 2 Documentation: Foxy documentation

#如果安裝了舊版本,先卸載
$ sudo apt-get purge ros-foxy*
$ sudo rm -rf /etc/ros
$ sudo gedit ~/.bashrc
洗掉那個東西bash
$ source ~/.bashrc
?
#安裝編譯工具包
#Apt packages
$ sudo apt install -y git cmake python3-pip
?
#Python modules
$ pip3 install -U colcon-common-extensions vcstool
?
#First, the ROS 2 core components and tools must be installed
?
#安裝ROS2核心包
?
#設定語言環境,確保語言環境支持UTF-8
$ locale  # check for UTF-8
?
#只檢查是否有可用更新,給出匯總報告和提示資訊
$ sudo apt update
?
#查看可升級的軟體的全部版本資訊
$ sudo apt list --upgradable -a
$ sudo apt install locales
$ sudo locale-gen en_US en_US.UTF-8
$ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ locale  # verify settings
?
#確保ros2倉庫可用
$ apt-cache policy | grep universe
?
#如果不可用,執行下面命令
$ sudo apt install software-properties-common
$ sudo add-apt-repository universe
?
#需要在系統中添加ROS 2 apt存盤庫,為此,請首先使用如下所示的apt授權GPG密鑰:
#Now add the ROS 2 apt repository to your system. First authorize our GPG key with apt.
$ sudo apt update
$ sudo apt install curl gnupg lsb-release
$ sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key  -o /usr/share/keyrings/ros-archive-keyring.gpg
?
#然后將存盤庫添加到源串列中 
#Then add the repository to your sources list.
$  echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
?
#Install development tools and ROS tools
sudo apt update && sudo apt install -y \
  build-essential \
  cmake \
  git \
  python3-colcon-common-extensions \
  python3-flake8 \
  python3-pip \
  python3-pytest-cov \
  python3-rosdep \
  python3-setuptools \
  python3-vcstool \
  wget
# install some pip packages needed for testing
python3 -m pip install -U \
  flake8-blind-except \
  flake8-builtins \
  flake8-class-newline \
  flake8-comprehensions \
  flake8-deprecated \
  flake8-docstrings \
  flake8-import-order \
  flake8-quotes \
  pytest-repeat \
  pytest-rerunfailures \
  pytest
  
# install Fast-RTPS dependencies
sudo apt install --no-install-recommends -y \
  libasio-dev \
  libtinyxml2-dev
# install Cyclone DDS dependencies
sudo apt install --no-install-recommends -y \
  libcunit1-dev
?
# Get ROS 2 code 
# ROS2原始碼下載,Install ROS 2 packages 
$ mkdir -p ~/ros2_foxy/src
$ cd ~/ros2_foxy
$ wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
$ vcs import src < ros2.repos
?
#Install dependencies using rosdep
$ sudo apt update
$ sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list
$ sudo rosdep init
$ rosdep update
$ rosdep install --from-paths src --reinstall --ignore-src -y --rosdistro=foxy --skip-keys "fastcdr rti-connext-dds-5.3.1 urdfdom_headers"
$ rosdep check --from-paths src --ignore-src -y --skip-keys "fastcdr  rti-connext-dds-5.3.1 urdfdom_headers"
?
'Note: If you’re using a distribution that is based on Ubuntu (like Linux Mint) but does not identify itself as such, you’ll get an error message like Unsupported OS [mint]. In this case append --os=ubuntu:focal to the above command.'
#rti-dds可以單獨安裝
#https://docs.ros.org/en/foxy/Installation/DDS-Implementations.html
?
#作業空間編譯原始碼安裝
#檢查ROS環境變數,確保沒有使用“source /opt/ros/${ROS_DISTRO}/setup.bash”設定過環境變數
$ printenv | grep -i ROS  #如果顯示空,后面編譯會有問題
PWD=/pathto/ros2_foxy
$ cd ~/ros2_foxy/
$ colcon build --symlink-install
$ colcon test
$ colcon test-result --verbose
?
?
#Demo test,In one terminal, source the setup file and then run a C++ talker:
$ source ~/ros2_foxy/install/setup.bash
$ ros2 run demo_nodes_cpp talker
?
#In another terminal source the setup file and then run a Python listener:
$ source ~/ros2_foxy/install/setup.bash
$ ros2 run demo_nodes_py listener
?
=================================================以上是ROS2 原始碼安裝,下面是安裝Autoware.auto原始碼安裝  =============================
?
$ export ROS_DISTRO = foxy
$ echo $ROS_DISTRO
?
#ROS2安裝完成后, 設定環境變數
$ source ~/ros2_foxy/install/setup.bash
?
#將ROS環境變數添加到bashrc檔案里面
$ echo "source ~/ros2_foxy/install/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
?
# Autoware.Auto project requires some ROS 2 packages in addition to the core components. The tool rosdep allows an automatic search and installation of such dependencies.
$ sudo apt update
$ sudo apt install -y python3-rosdep
$ sudo rosdep init
$ rosdep update
?
#安裝Autoware.Auto依賴的ROS2的其它包,rosdep會自動搜索安裝
$ mkdir -p ~/adehome
$ cd ~/adehome
$ touch .adehome
$ git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
$ cd AutowareAuto
$ vcs import < autoware.auto.$ROS_DISTRO.repos
$ export ROS_VERSION=2
?
#rosdep 一次安裝src下所有依賴
$ rosdep install --reinstall -y -i --from-paths src
?
// 這一步可有可不有,
//目的是切換想要安裝的autoware版本,如果不切換master將使用最新分支
#Checkout the latest release by checking out the corresponding tag or release branch.
$ git checkout tags/1.0.0 -b release-1.0.0
?
# If running tests or demos, also pull binary files with
$ git lfs pull --exclude="" --include="*"
?
#共享環境變數
$ cd ~
$ mv ~/.bashrc ~/adehome/.bashrc
$ ln -s ~/adehome/.bashrc
?
#打開一個干凈的ade容器進行編譯
$ ade stop
$ sudo ade update-cli
$ ade --rc .aderc-amd64-foxy-lgsvl start --update --enter
ade$ cd AutowareAuto
ade$ rm -rf build/ install/ log/
?
#To build all packages in Autoware.Auto, navigate into the AutowareAuto directory and run
ade$ colcon build
ade$ colcon test
ade$ colcon test-result --verbose
上述步驟中,第二步命令可以拉取一些其他分支到master,補充一些檔案,我開始沒有執行這個命令,

導致在執行colcon build,出現無法找到檔案

autoware_auto_msgs/msg/trajectory.hpp的錯誤,

如果colcon 不起作用,配置colcon 環境變數

Take the defaults file that comes with the Autoware.Auto source checkout and add it to your shell startup;

echo COLCON_DEFAULTS_FILE

$ echo "export COLCON_DEFAULTS_FILE=/path/to/AutowareAuto/tools/ade_image/colcon-defaults.yaml" >> .bashrc

或者手工匯入

$ export COLCON_DEFAULTS_FILE=/path/to/AutowareAuto/tools/ade_image/colcon-defaults.yaml

編譯完一定要source:

$ source /opt/AutowareAuto/setup.bash
或

$ source ~/AutowareAuto/install/setup.bash

------使用一個干凈的ADE環境------

我們可能遇到的很多問題都是由于代碼版本、舊的編譯檔案存在等導致,所以需要更新ade和docker容器,以及清理一些舊的build等檔案,可以通過以下操作完成:

$ ade stop
$ sudo ade update-cli
$ ade start --update --enter
ade$ cd AutowareAuto
ade$ rm -rf build/ install/ log/ src/external/
ade$ git pull
ade$ vcs import < autoware.auto.$ROS_DISTRO.repos

------ADE環境的使用------

  • 執行ade命令(如ade start、ade enter等)時,要確保當前命令列在路徑

~/adehome/AutowareAuto 中;

  • 開啟ADE環境:

$ ade start

  • 進入ADE環境(此時,會輸出一些鏡像資訊):

$ ade enter

  • 所有的鏡像掛在在/opt下面,可以查看:

ade$ ls /opt

  • 退出并停止ADE環境(使用完最好手動停止ADE環境,以關閉Docker):

ade$ exit

$ ade stop

------安裝程序中可能會出現少包,版本不兼容問題,可以使用下面命令排查------

#查找所有已安裝的軟體包
$dpkg -l——查看所有已安裝的軟體包
?
#清除所以洗掉包的殘余組態檔
$dpkg -l |grep ^rc|awk ‘{print $2}’ |tr [”"n”] [” “]|sudo xargs dpkg -P -
?
#查看需卸載的軟體包
$dpkg -l |grep 軟體名
?
#clean 命令洗掉所有的軟體安裝包,
$ sudo apt-get clean
?
#autoclean 命令洗掉不再可用的軟體安裝包,
$ sudo apt-get autoclean
?
#remove 命令移除 以及任何依賴這個包的其它包
$sudo apt-get remove 軟體名
?
#用purge 命令清除式卸載
$apt-get purge  <pakage_name>
?
#autoremove 命令洗掉不再需要的依賴軟體包,
$ sudo apt-get autoremove
?
#install 命令下載軟體包,以及所有依賴的包,同時進行包的安裝或升級
$ apt-get install 軟體名  
#libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.4 is to be installed
$ sudo apt install libc6=2.31-0ubuntu9.2 libc-bin=2.31-0ubuntu9.2
?
#reinstall 命令重新安裝軟體包,
$ apt-get --reinstall install softname1
?
#升級來自 Debian 鏡像的包串列,如果你想安裝當天的任何軟體,至少每天運行一次,而且每次修改了
$ sudo apt-get update
?
#升級所有已經安裝的包為最新可用版本,不會安裝新的或移除老的包,建議同時使用 '-u' 選項,因為這樣你就能看到哪些包將會被升級
$ apt-get upgrade -u
?
#apt-get upgrade 類似,除了 dist-upgrade 會安裝和移除包來滿足依賴關系,因此具有一定的危險性
$ apt-get dist-upgrade -u
?
#在軟體包名稱和描述中,搜索包含xxx的軟體包
$ apt-cache search
?
#顯示某個軟體包的完整的描述
$apt-cache show
?
#Dpkg方式安裝軟體源
$ dpkg -i package_name.deb
?
#移除式卸載:
$dpkg -r pkg1 pkg2 ...
?
#清除式卸載:
$dpkg -P pkg1 pkg2..
?
#將洗掉相關軟體,同時洗掉該軟體的組態檔
$ dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -p
?
#重新安裝已安裝的包
$ dpkg -l | grep ^ii | awk '{print $2}' | xargs sudo apt-get reinstall

3.4 Autoware.auto 相機車道線檢測demo 展示

1. 代碼及錄制視頻下載

代碼下載

$ cd ~/adehome/AutowareAuto/
$ ade start
$ ade enter
$ git clone https://gitee.com/knowmefly/camera-hands-on-ws.git

視頻下載:https://download.csdn.net/download/jiluonian/22771297 下載 laneVideo.h264 視頻檔案放置在 ~/adehome/camera-hands-on-ws/src/lane_detection_data_loader/resources/ 目錄下

2. 編譯安裝

$ ade enter
$ cd camera-hands-on-ws/
$ rm -rf build/ install/ log/
$ colcon build
'可能找不到opencv,安裝opencv庫'
$sudo apt install libopencv-dev python3-opencv

3.運行視頻加載、影像處理、可視化節點

  • 運行視頻加載節點
# terminal 1
$ ade enter
$ cd  camera-hands-on-ws/
$ source install/setup.bash
$ ros2 run lane_detection_data_loader lane_detection_data_loader_node
  • 運行影像處理節點
# terminal 2
$ ade enter
$ cd  camera-hands-on-ws/
$ source install/setup.bash
$ ros2 run lane_detection_projection lane_detection_projection_node
  • 運行可視化節點
# terminal 3
$ ade enter
$ cd  camera-hands-on-ws/
$ source install/setup.bash
$ ros2 run lane_detection_visualization lane_detection_visualization_node
# terminal 4
$ ade enter
$ export QT_DEBUG_PLUGINS=1
$ export DISPLAY=:0.0
$ rviz2
  • 運行rviz2報錯
'qt.qpa.xcb: could not connect to display localhost:10.0
'qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
'This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

'Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

'Aborted (core dumped)''

解決辦法:

加載插件跟蹤

$ export QT_DEBUG_PLUGINS=1

$ export DISPLAY=:0.0

在vi /etc/profile內添加export DISPLAY=xserverip:0.0 執行source /etc/profile 第二步:然后ssh終端安裝xorg并使用xclock測驗能否回傳影像:

apt-get install xorg

xclock

執行后桌面會跳出一個時鐘的圖案

file

本文轉自:https://blog.csdn.net/baiyefenglin/article/details/122921360

轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/479143.html

標籤:Linux

上一篇:linux命令_awk

下一篇:Linux安全加固學習

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • CA和證書

    1、在 CentOS7 中使用 gpg 創建 RSA 非對稱密鑰對 gpg --gen-key #Centos上生成公鑰/密鑰對(存放在家目錄.gnupg/) 2、將 CentOS7 匯出的公鑰,拷貝到 CentOS8 中,在 CentOS8 中使用 CentOS7 的公鑰加密一個檔案 gpg -a ......

    uj5u.com 2020-09-10 00:09:53 more
  • Kubernetes K8S之資源控制器Job和CronJob詳解

    Kubernetes的資源控制器Job和CronJob詳解與示例 ......

    uj5u.com 2020-09-10 00:10:45 more
  • VMware下安裝CentOS

    VMware下安裝CentOS 一、軟硬體準備 1 Centos鏡像準備 1.1 CentOS鏡像下載地址 下載地址 1.2 CentOS鏡像下載程序 點擊下載地址進入如下圖的網站,選擇需要下載的版本,這里選擇的是Centos8,點擊如圖所示。 決定選擇Centos8后,選擇想要的鏡像源進行下載,此 ......

    uj5u.com 2020-09-10 00:12:10 more
  • 如何使用Grep命令查找多個字串

    如何使用Grep 命令查找多個字串 大家好,我是良許! 今天向大家介紹一個非常有用的技巧,那就是使用 grep 命令查找多個字串。 簡單介紹一下,grep 命令可以理解為是一個功能強大的命令列工具,可以用它在一個或多個輸入檔案中搜索與正則運算式相匹配的文本,然后再將每個匹配的文本用標準輸出的格式 ......

    uj5u.com 2020-09-10 00:12:28 more
  • git配置http代理

    git配置http代理 經常遇到克隆 github 慢的問題,這里記錄一下幾種配置 git 代理的方法,解決 clone github 過慢。 目錄 git配置代理 git單獨配置github代理 git配置全域代理 配置終端環境變數 git配置代理 主要使用 git config 命令 git單獨 ......

    uj5u.com 2020-09-10 00:12:33 more
  • Linux npm install 裝包時提示Error EACCES permission denied解

    npm install 裝包時提示Error EACCES permission denied解決辦法 ......

    uj5u.com 2020-09-10 00:12:53 more
  • Centos 7下安裝nginx,使用yum install nginx,提示沒有可用的軟體包

    Centos 7下安裝nginx,使用yum install nginx,提示沒有可用的軟體包。 18 (flaskApi) [root@67 flaskDemo]# yum -y install nginx 19 已加載插件:fastestmirror, langpacks 20 Loading ......

    uj5u.com 2020-09-10 00:13:13 more
  • Linux查看服務器暴力破解ssh IP

    在公網的服務器上經常遇到別人爆破你服務器的22埠,用來挖礦或者干其他嘿嘿嘿的事情~ 這種情況下正確的做法是: 修改默認ssh的22埠 使用設定密鑰登錄或者白名單ip登錄 建議服務器密碼為復雜密碼 創建普通用戶登錄服務器(root權限過大) 建立堡壘機,實作統一管理服務器 統計爆破IP [root ......

    uj5u.com 2020-09-10 00:13:17 more
  • CentOS 7系統常見快捷鍵操作方式

    Linux系統中一些常見的快捷方式,可有效提高操作效率,在某些時刻也能避免操作失誤帶來的問題。 ......

    uj5u.com 2020-09-10 00:13:31 more
  • CentOS 7作業系統目錄結構介紹

    作業系統存在著大量的資料檔案資訊,相應檔案資訊會存在于系統相應目錄中,為了更好的管理資料資訊,會將系統進行一些目錄規劃,不同目錄存放不同的資源。 ......

    uj5u.com 2020-09-10 00:13:35 more
最新发布
  • vim的常用命令

    Vim的6種基本模式 1. 普通模式在普通模式中,用的編輯器命令,比如移動游標,洗掉文本等等。這也是Vim啟動后的默認模式。這正好和許多新用戶期待的操作方式相反(大多數編輯器默認模式為插入模式)。 2. 插入模式在這個模式中,大多數按鍵都會向文本緩沖中插入文本。大多數新用戶希望文本編輯器編輯程序中一 ......

    uj5u.com 2023-04-20 08:43:21 more
  • vim的常用命令

    Vim的6種基本模式 1. 普通模式在普通模式中,用的編輯器命令,比如移動游標,洗掉文本等等。這也是Vim啟動后的默認模式。這正好和許多新用戶期待的操作方式相反(大多數編輯器默認模式為插入模式)。 2. 插入模式在這個模式中,大多數按鍵都會向文本緩沖中插入文本。大多數新用戶希望文本編輯器編輯程序中一 ......

    uj5u.com 2023-04-20 08:42:36 more
  • docker學習

    ###Docker概述 真實專案部署環境可能非常復雜,傳統發布專案一個只需要一個jar包,運行環境需要單獨部署。而通過Docker可將jar包和相關環境(如jdk,redis,Hadoop...)等打包到docker鏡像里,將鏡像發布到Docker倉庫,部署時下載發布的鏡像,直接運行發布的鏡像即可。 ......

    uj5u.com 2023-04-19 09:26:53 more
  • 設定Windows主機的瀏覽器為wls2的默認瀏覽器

    這里以Chrome為例。 1. 準備作業 wsl是可以使用Windows主機上安裝的exe程式,出于安全考慮,默認情況下改功能是無法使用。要使用的話,終端需要以管理員權限啟動。 我這里以Windows Terminal為例,介紹如何默認使用管理員權限打開終端,具體操作如下圖所示: 2. 操作 wsl ......

    uj5u.com 2023-04-19 09:25:49 more
  • docker學習

    ###Docker概述 真實專案部署環境可能非常復雜,傳統發布專案一個只需要一個jar包,運行環境需要單獨部署。而通過Docker可將jar包和相關環境(如jdk,redis,Hadoop...)等打包到docker鏡像里,將鏡像發布到Docker倉庫,部署時下載發布的鏡像,直接運行發布的鏡像即可。 ......

    uj5u.com 2023-04-19 09:19:04 more
  • Linux學習筆記

    IP地址和主機名 IP地址 ifconfig可以用來查詢本機的IP地址,如果不能使用,可以通過install net-tools安裝。 Centos系統下ens33表示主網卡;inet后表示IP地址;lo表示本地回環網卡; 127.0.0.1表示代指本機;0.0.0.0可以用于代指本機,同時在放行設 ......

    uj5u.com 2023-04-18 06:52:01 more
  • 解決linux系統的kdump服務無法啟動的問題

    問題:專案麒麟系統服務器的kdump服務無法啟動,沒有相關日志無法定位問題。 1、查看服務狀態是關閉的,重啟系統也無法啟動 systemctl status kdump 2、修改grub引數,修改“crashkernel”為“512M(有的機器數值太大太小都會導致報錯,建議從128M開始試,或者加個 ......

    uj5u.com 2023-04-12 09:59:50 more
  • 解決linux系統的kdump服務無法啟動的問題

    問題:專案麒麟系統服務器的kdump服務無法啟動,沒有相關日志無法定位問題。 1、查看服務狀態是關閉的,重啟系統也無法啟動 systemctl status kdump 2、修改grub引數,修改“crashkernel”為“512M(有的機器數值太大太小都會導致報錯,建議從128M開始試,或者加個 ......

    uj5u.com 2023-04-12 09:59:01 more
  • 你是不是暴露了?

    作者:袁首京 原創文章,轉載時請保留此宣告,并給出原文連接。 如果您是計算機相關從業人員,那么應該經歷不止一次網路安全專項檢查了,你肯定是收到過資訊系統技術檢測報告,要求你加強風險監測,確保你提供的系統服務堅實可靠了。 沒檢測到問題還好,檢測到問題的話,有些處理起來還是挺麻煩的,尤其是線上正在運行的 ......

    uj5u.com 2023-04-05 16:52:56 more
  • 細節拉滿,80 張圖帶你一步一步推演 slab 記憶體池的設計與實作

    1. 前文回顧 在之前的幾篇記憶體管理系列文章中,筆者帶大家從宏觀角度完整地梳理了一遍 Linux 記憶體分配的整個鏈路,本文的主題依然是記憶體分配,這一次我們會從微觀的角度來探秘一下 Linux 內核中用于零散小記憶體塊分配的記憶體池 —— slab 分配器。 在本小節中,筆者還是按照以往的風格先帶大家簡單 ......

    uj5u.com 2023-04-05 16:44:11 more