ubuntu 18.04 reinstall configuration record

Computer: matebook 14 mx250 i5
original system: windows 10

1. Ubuntu 18.04

According to the actual situation, the storage capacity is allocated to the ubuntu system. Since the apollo driverless simulation environment is relatively large, the disk size I gave to the ubuntu system is 200G.

Super detailed! Win10 (UEFI boot mode) install Ubuntu 18.04 dual system

2. Network+google chrome+fcitx input method

The internet

East area network:
IP: 192.168.151.156
mac:00-FF-62-BE-3E-5C

google chrome

1. Download google chrome
2. Download BLUELED from github
3. Turn on BLUELED
4. Turn on google chrome
5. Log in to google account
6. Synchronize bookmarks

Configure fcitx Wubi Pinyin input method

First change to the domestic mirror source, and then execute:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fcitx-table-wbpy

For details, please refer to Ubuntu 18.04 to install fcitx input method , and then logout re-enter the ubuntu system, you will find a keyboard icon in the upper right corner, click on it to add wubypingyin input to the existing input method.

3. Install ros melodic (slightly longer)

After changing the ROS mirror source of National University of Science and Technology, install:

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update
sudo apt-get ros-melodic-desktop-full
sudo rosdep init
rosdep update
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

In addition, to install turtlebot on the melodic version of ros, refer to install turtlebot on ubuntu 18.04 + ros melodic .

由于后面使用anaconda python环境,会导致ros依赖的python版本有点问题,导致catkin_make报错。Please refer to the problem of installing the robot ros driver (catkin_make) to solve it.

4. Install nvidia mx250 graphics driver

    1. Uninstall the previously installed nvidia driver
sudo apt-get remove --purge nvidia*
    1. Disable nouveau
cd /etc/modprobe.d
sudo gedit nvidia-installer-disable-nouveau.conf

Enter the following, save and exit:

blacklist nouveau
options nouveau modeset=0
  • Regenerate the kernel initramfs
sudo update-initramfs -u
sudo update-grub
sudo reboot #重启电脑
  • Check whether nouveau is successfully disabled
 lsmod | grep nouveau
  • Install nvidia driver
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo reboot
  • Check whether the nvidia driver is installed successfully
nvidia-smi

If the following message is displayed, the installation is successful:
Insert picture description here

5. Install Anaconda2

Go to the Anaconda official website to
download the corresponding version of anaconda. Then run the following command to install, and change the following file to the corresponding downloaded file. You can refer to install anaconda2: .

bash Anaconda2-2019.10-Linux-x86_64.sh 
  • Exit the base environment and return to the system's own environment
conda config --set auto_activate_base false

or

conda deactivate 
  • Enter the conda environment
conda config --set auto_activate_base true

or

conda activate base

Other python libraries can also be installed for unmanned vehicle systems (10): C++ and python nonlinear planning (optimization) planning (chemical) tools .

问题:在安装了anaconda后,终端最左端出现了(base)字段,按照网上的解决方法:“gedit ~/.bashrc;在打开的文件最后添加conda deactivate”后,(base)字样会消失,但是conda命令不能使用。请问有没有什么可以让终端不显示(base)字样,但可以正常使用conda命令的方法呢?

Solution: Comment out the anaconda at the end of the ~/.bashrc file, and add it and export PATH="/home/XXX/anaconda2/bin:$PATH"
finally become (replace with your anaconda installation address):

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
#__conda_setup="$('/home/toby/anaconda2/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
#if [ $? -eq 0 ]; then
#    eval "$__conda_setup"
#else
#    if [ -f "/home/toby/anaconda2/etc/profile.d/conda.sh" ]; then
#        . "/home/toby/anaconda2/etc/profile.d/conda.sh"
#    else
#        export PATH="/home/toby/anaconda2/bin:$PATH"
#    fi
#fi
#unset __conda_setup
# <<< conda initialize <<<
#conda deactivate
export PATH="/home/xxx/anaconda2/bin:$PATH"

6. Install pytorch

CUDA will be installed automatically, so there is no need to install CUDA separately.

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

7. Install docker

Run one by one in order!

sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
  • test
sudo docker run hello-world #若显示如下消息,则说明安装成功

Insert picture description here

8. Install Baidu apollo driverless simulation environment

tar zxvf linux-4.4.32-apollo-1.5.0.tar.gz
cd install
sudo bash install_kernel.sh
  • Download the apollo source code to this site
sudo apt-get git
git clone https://gitee.com/qtum/apollo.git #国内镜像源下载成功率高
  • installation
sudo bash docker/scripts/dev_start.sh
sudo bash docker/scripts/dev_into.sh
bash apollo.sh build
  • Start apollo
# 启动人机交互界面(HMI)
bash scripts/bootstrap.sh
  • To access HMI, you
    can use your usual browser, such as Chrome, to open the Human-Machine Interface (HMI), the address is: http://localhost:8888.

Insert picture description here

rosbag play -l demo_2.0.bag

Insert picture description here
Insert picture description here

  • Docker image backup and recovery

Docker related commands

$ docker container ls --all (列出所有container, 即使当前不在运行的)
$ docker ps (查看正在运行的容器)
$ exit (退出当前的docker环境)
$ docker rmi <image id> (删除某个image, 比如 docker rmi 4ab4c602aa5e)

Export the image to a local file (so you can back up the downloaded image without having to download it every time you reinstall it.)

$ docker save apolloauto/apollo > apollo.tar

Import files from local files to mirror library

$ sudo docker load --input apollo.tar

8. Beautify the desktop

Common commands

xz -d Gnome-OSC-HS--2-themes.tar.xz
tar xvf Gnome-OSC-HS--2-themes.tar.xz

Ubuntu18.04 interface beautification tool gnome-tweak-tool

9. Install system backup software

How to install Systemback on Ubuntu 18.04 system

sudo add-apt-repository "deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 382003C2C8B7B4AB813E915B14E4942973C62A1B
sudo apt update
sudo apt install systemback

10 ubuntu root directory expansion

Use the software gparted, specifically refer to ubuntu 16.04 root directory disk space expansion (pro test!!)

11. Document management software Zotero

sudo add-apt-repository ppa:smathot/cogscinl
sudo apt-get update
sudo apt-get install zotero-standalone

12. Install the note-taking software boostnote

https://boostnote.io/

13. Install the synchronization software Nut Cloud

Download nuts cloud

sudo dpkg -i nautilus_nutstore_amd64.deb
sudo apt-get install -f

14. Install texlive+texmaker

sudo apt-get install texlive-full
sudo apt-get install texmaker

15. Install car_demo, an unmanned vehicle simulation ring based on ros+gazebo

Please refer to Unmanned Vehicle System (9): An unmanned driving simulation environment based on ROS and Gazebo-car_demo ,

如果catkin_make出现错误, Please refer to the problem encountered in installing the robot ros driver (catkin_make) to solve it.

Reason: When installing ros, the python pointed to is the python that comes with the system, and all dependencies are installed in the python directory that comes with the system. When anacona is installed, after the configuration, the global python is pointed to the python of anaconda. There is no dependent library of ros, so a series of errors will appear. Therefore, it is recommended that if you really want to use anaconda to completely replace python under the system, it is best to install anaconda first, and configure it to point to python under anaconda globally, and then install ros.

You can reinstall the python dependency package:


conda install setuptools
pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools
pip install empy

More
by windSeS 2019-12-28

Guess you like

Origin blog.csdn.net/u013468614/article/details/103734770