ubuntu 16.04环境配置
Posted oucaijun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 16.04环境配置相关的知识,希望对你有一定的参考价值。
ubuntu 16:
1.源
cp /etc/apt/sources.list /etc/apt/sources.list.bkp
vi /etc/apt/sources.list
-+{
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
}
apt-get update
2.
apt-get install tftpd-hpa tftp-hpa
apt-get install openssh-server
apt-get install nfs-kernel-server nfs-common
apt-get install samba smbclient
apt install ntpdate
3. account and sshd
passwd root
{
设置root密码
}
vi /etc/ssh/sshd_config
-+{
PermitRootLogin yes
}
/etc/init.d/ssh restart
reboot
4. tftp
mkdir -p /work/tftpboot
vi /etc/default/tftpd-hpa
-+ {
TFTP_DIRECTORY="/work/tftpboot"
}
service tftpd-hpa restart
5. nfs
mkdir -p /mnt/nfs
mkdir -p /work/rootfs
vi /etc/exports
-+{
/work/rootfs *(rw,sync,no_root_squash)
}
service portmap restart
service nfs-kernel-server restart
showmount -e
mount -t nfs localhost:/work/rootfs /mnt/nfs
umount /mnt/nfs
6. samba
mkdir -p /work/share
/etc/init.d/samba status
cp /etc/samba/smb.conf /etc/samba/smb.conf.bkp
smbpasswd -a root
vi /etc/samba/smb.conf
{
[global]
workgroup = WORKGROUP
netbios name = Ubuntu 16
server string = Samba Server
security = user
encrypt passwords = yes
max connections = 0
security = user
smb passwd file = /etc/samba/smbpasswd
username map = /etc/samba/smbusers
[share]
path = /work/share
writable = yes
guest ok = yes
write list = @root
validusers = @root
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936
}
/etc/init.d/samba restart
testparm
smbclient //127.0.0.1/share
以上是关于ubuntu 16.04环境配置的主要内容,如果未能解决你的问题,请参考以下文章