打印

ubuntu系统配置与开发环境搭建

[复制链接]
201|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
软件安装:

新安装了ubuntu系统后,通常需要安装许多软件才能使用

apt-get update (同步本地软件列表与APT站点)

apt-get upgrade (升级现有到包)

apt-get install *** (安装软件包)

ubuntu虚拟机连接板子选择桥接方式;

连接网络选测NAT方式,且/etc/network/interfaces里面不能有eth0的配置信息,删除配置信息后要重新打开网卡设备才能生效

一、ROOT登录

ubuntu默认无法以root身份登录,对于习惯来rh的用户来说,使用sudo显得很麻烦

下面介绍如何通过修改配置文件,使得可以自动使用root身份登录ubuntu系统

vim /etc/lightdm/lightdm.conf

编辑内容如下:

[SeatDefaults]

autologin-guest=false

autologin-user=root

autologin-user-timeout=0

autologin-session=lightdm-autologin

greeter-session=unity-greeter

user-session=ubuntu

greeter-show-manual-login=true

allow-guest=false

重启生效^v^



二、ubuntu嵌入式开发环境搭建:

1.安装必须软件

apt-get update              (获取软件列表)

apt-get install minicom*    (串口工具)

apt-get install tftpd-hpa   (tftp服务器)

apt-get install tftp-hpa    (tftp客户端)

apt-get install xinetd      (tftp客户端)

apt-get install nfs-kernel-server (nfs服务器)

apt-get install ncurses-* (支持perl,menuconfig界面)

apt-get remove ufw          (删除防火墙,--->ufw默认关闭,但好像只有卸载掉后,网络才能联通)

2.配置相关服务

(1) minicom -s

配置minicom

(2) 配置tftp服务

<1>

vim /etc/xinetd.conf

确认此文件存在且内容如下:

# Simple configuration file for xinetd

#

# Some defaults, and include /etc/xinetd.d/

defaults

{

# Please note that you need a log_type line to be able to use log_on_success

# and log_on_failure. The default is the following :

# log_type = SYSLOG daemon info

}

includedir /etc/xinetd.d

<2>

vim /etc/default/tftpd-hpa

确认此文件存在且内容如下:

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"

TFTP_DIRECTORY="/tftpboot"

TFTP_ADDRESS="0.0.0.0:69"

TFTP_OPTIONS="-l -c -s"

<3>

vim /etc/xinetd.d/tftp

确认此文件存在且内容如下:

service tftp

    {

        socket_type = dgram

        wait = yes

        disable = no

        user = root

        protocol = udp

        server = /usr/sbin/in.tftpd

        server_args = -s /tftpboot

        #log_on_success += PID HOST DURATION

        #log_on_failure += HOST

        per_source = 11

        cps =100 2

        flags =IPv4

    }

<4>重启相关服务

/etc/init.d/tftpd-hpa restart

/etc/init.d/xinetd restart

(3) 配置nfs服务

vim /etc/exports

增加一行:

/opt/s3c2440/root_nfs *(rw,sync,no_root_squash)

重启nfs服务:

service nfs-kernel-server restart

(4) 配置网卡

vim /etc/network/interfaces

修改为:

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 192.168.0.101

gateway 192.168.0.1

netmask 255.255.255.0

关闭并重新打开eth0生效

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

377

主题

377

帖子

0

粉丝