docker安装ubuntu 20.04 LTS

2020-05-14  本文已影响0人  小桥流水啦啦啦

第一部分 安装ubuntu 20.04 LTS

1、拉镜像并启动运行
docker pull ubuntu
docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              16.04               005d2078bdfa        2 weeks ago         125MB
ubuntu              latest              1d622ef86b13        2 weeks ago         73.9MB


docker  ps -la
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
f63230e764fa        1d622ef86b13        "/bin/bash"         9 seconds ago       Exited (0) 7 seconds ago                       sharp_almeida

docker run -it 1d622ef86b13 /bin/bash

cat /etc/issue
Ubuntu 20.04 LTS \n \l
2、ubuntu 20.04更换阿里源
echo "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">/etc/apt/sources.list
3、更新软件列表和更新软件

update是更新软件列表,upgrade是更新软件

apt-get update
apt-get upgrade
4、安装必备软件:
apt-get install net-tools inetutils-ping openssh-server samba samba-common git vim curl

第二部分:安装yocto开发环境

1、配置环境
passwd root
useradd imhqq

apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat libsdl1.2-dev libsdl1.2-dev xterm sed cvs subversion coreutils texi2html \
docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \
libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools curl bc lzop

smbpasswd -a root

echo "[share]
   comment = share folder
   browseable = yes
   path = /home
   create mask = 0700
   directory mask = 0700
   valid users = root
   force user = root
   force group = root
   public = yes
   available = yes
   writable = yes" >/etc/samba/smb.conf

service smbd restart

2、下载repo
su
mkdir ~/bin/
cd ~/bin
git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo
cp git-repo/repo repo
chmod +x repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH

cd /usr/bin/

ls | grep python
python3
python3.8

python --version
Python 3.8.2

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
3、下载fsl-release-bsp版本:
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml

repo sync -f -j8

(完成)

上一篇下一篇

猜你喜欢

热点阅读