Ubuntu16.04系统搭建Petalinux2018.3开发环境备忘录

一、准备工作

ubuntu系统安装完后,先替换软件源为国内的源并更新,不然软件更新下载速度极为感人:

【1】备份原文件

cd /etc/apt
sudo mv sources.list sources.list.bak

【2】编辑修改文件

vi sources.list

将原来的默认的源地址替换为阿里源

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

【3】软件更新

sudo apt update        //更新数据
sudo apt upgrade       //更新软件

二、安装常用软件

【1】安装Vim文本编辑器(比较习惯用Vim)

sudo apt install vim -y

【2】SSH

Ubuntu安装并开启ssh服务及允许root账号登录

//安装ssh服务器端:Ubuntu默认没有安装ssh的server,需要安装
apt-get install openssh-server

//ssh客户端是默认安装的,连接其它ssh服务器用的,使用 apt install openssh-client安装

//允许远程使用root账号ssh连接本机:修改/etc/ssh/sshd_config文件
vim /etc/ssh/sshd_config

//修改如下:允许root账户登录
#PermitRootLogin prohibit-password
PermitRootLogin yes

//需要重启系统或者sshd服务
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
sudo service ssh restart

//安装ssh服务后,系统默认开启系统sshd,查看sshd状态如果不是默认启动,修改服务为enable
sudo systemctl enable ssh

此时就可以使用基于SSH协议的WinSCP软件登陆并进行文件交换,个人觉得比FTP或者share共享目录的方式更简便。

【3】Petalinux

Petalinux安装前先安装依赖库

sudo apt-get install tofrodos iproute2 gawk gcc g++ git make net-tools libncurses5-dev tftpd zlib1g:i386 libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev screen pax gzip automake

上一篇:【测试平台】【前端VUE】工具页面学习记录


下一篇:远程控制项目第一天