Ubuntu下基本开发环境配置

    xiaoxiao2025-06-23  7

    1. 安装配置vim     -->apt-get update     -->apt-get install vim     配置-->编辑~ gedit ./.vimrc     set nocompatible       不使用vi默认键盘布局        set number               显示行号     set autoindent          自动对齐     set smartindent         智能对齐     set showmatch          括号匹配模式     set ruler                 显示状态行     set incsearch            查询时非常方便,如要查找book单词,当输入到/b时,会自动找到   第一个b开头的单词,当输入到/bo时,会自动找到第一个bo开头的单词,依次类推,进行查找时,使用此设置会快速找到答案,当你找要匹配的单词时,别忘记回车.     set tabstop=4           tab键为4个空格     set shiftwidth=4     换行时行间交错使用4个空格     set softtabstop=4  设置(软)制表符宽度为4     set cindent              C语言格式对齐     set nobackup            不要备份文件      2. 修改root权限,用root登陆     -->sudo  -s     -->普通用户密码     -->gedit /etc/lightdm/lightdm.conf         [SeatDefaults]         greeter-session=unity-greeter         user-session=ubuntu         greeter-show-manual-login=true #手工输入登陆系统的用户名和密码         allow-guest=false   #不允许guest登录     -->sudo passwd root     -->root用户密码     重启Ubuntu          鼠标无法在Ubuntu和windows间正常切换sudo apt-get install xserver-xorg-input-vmmouse      2. 安装配置samba服务(windows和linux间通信)     -->apt-get install samba samba-common     -->useradd smb     -->smbpasswd -a smb     -->vim /etc/samba/smb.conf     添加”security = user“         [shared]             comment = Shared Directory             path = /home (共享目录)             browsable = yes             writable = yes             public = yes             valid users = smb     -->chmod 777 /home     -->service smbd restart 3. 安装配置nfs服务(linux和linux间通信)     -->apt-get install nfs-kernel-server nfs-common     -->vim /etc/export     添加“/nfs * (rw,sync,no_root_squash)”     -->/etc/init.d/portmap restart     -->/etc/init.d/nfs-kernel-server restart     -->mkdir /nfs     -->chmod 777 /nfs     -->mount -t nfs -o nolock,intr,rsize=1024,wsize=1024 192.168.1.123:/nfs /mnt/nfs(开发板挂载主机目录)     -->umount /mnt/nfs(不要在/mnt/nfs下执行)      4. 安装配置tftp服务     -->apt-get install xinetd tftp-hpa tftpd-hpa     -->vim /etc/xinetd.d/tftp     添加:         service tftp         {             disable       = no             socket_type   = dgram             protocol      = udp             wait          = yes             user          = root             server        = /usr/sbin/in.tftpd             server_args   = -s /tftpboot             source        = 11             cps           = 100 2             flags         = IPv4         }     -->mkdir /tftpboot     -->chmod 777 /tftpboot     -->vim /etc/default/tftpd-hpa     修改:         TFTP_USERNAME   = "tftp"         TFTP_DIRECTORY  = "/tftpboot"         TFTP_ADDRESS    = "0.0.0.0:69"         TFTP_OPTIONS    = "-l -c -s"     -->service tftpd-hpa restart     
    转载请注明原文地址: https://ju.6miu.com/read-1300238.html
    最新回复(0)