sudo apt-get install net-tools
cd /etc/netplan
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
ens33: #网卡名
dhcp4: no #关闭ipv4动态分配ip地址
dhcp6: no #关闭ipv6动态分配ip地址
addresses: [192.168.0.128/24] #前面是ip地址,24对应的子网掩码是255.255.255.0
gateway4: 192.168.0.1 #网关
nameservers:
addresses: [114.114.114.114, 8.8.8.8] #DNS
sudo netplan apply
设置VIM显示行号和设置Tab占空
sudo vim /etc/vim/vimrc
在最后添加
set nu
set ts=4
sudo apt-get install vsftpd
sudo vi /etc/vsftpd.conf
保证下面两行的代码前没有#
local_enable=YES
write_enable=YES
sudo /etc/init.d/vsftpd restart
设置中搜索 security.workspace.trust,管理工作区信任设置,把 “Trust: Enabled” 取消掉,即关闭受限模式
sudo mkdir /usr/local/arm
sudo cp gcc-linaro-4.9.4-2017.01-i686_arm-linux-gnueabihf.tar.xz /usr/local/arm
sudo tar -vxf gcc-linaro-4.9.4-2017.01-i686_arm-linux-gnueabihf.tar.xz
sudo vi /etc/profile
在最后一行添加
export PATH=$PATH:/usr/local/arm/gcc-linaro-4.9.4-2017.01-i686_arm-linux-gnueabihf/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/arm/gcc-linaro-4.9.4-2017.01-i686_arm-linux-gnueabihf/lib
sudo apt-get install lsb-core lib32stdc++6
sudo apt-get install lib32z1
sudo apt-get install nfs-kernel-server rpcbind
sudo vi /etc/exports
/home/wsd/worspace/nfs *(rw,sync,no_root_squash)
sudo /etc/init.d/nfs-kernel-server restart
sudo vim /etc/default/nfs-kernel-server
# Number of servers to start up
RPCNFSDCOUNT="-V 2 8"
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0
# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information,
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
RPCMOUNTDOPTS="-V 2 --manage-gids"
# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""
# Options for rpc.svcgssd.
RPCSVCGSSDOPTS="--nfs-version 2,3,4 --debug --syslog"
sudo vim /etc/hosts
sudo apt-get install tftp-hpa tftpd-hpa
sudo apt-get install xinetd
mkdir ~/workspace/tftp
chmod 777 ~/workspace/tftp
sudo touch /etc/xinetd.d/tftp
sudo vim /etc/xinetd.d/tftp
server tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /home/wsd/workspace/tftp/
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
sudo vim /etc/default//tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/wsd/workspace/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-1 -c -s"
sudo service tftpd-hpa start
reboot