搭建局域网共享服务器
由于前段时间停电,导致windows7的共享服务器无法启动,重新安装几次都提示失败(瘦客户机,和普通PC不一样,不好折腾),遂装个linux系统作为服务器来用。记录重要步骤如下:
- 使用ultra iso来刻录光盘镜像(ubuntu选择raw模式,debian选择hdd模式)
- 设置bios从U盘启动电脑,开始安装;
- 如果提示hd0错误,则进入live系统,重新挂载硬盘,修复grub;
- 进入debian后,由于瘦机有2个显示口,一个DP,一个VGA,会显示不出菜单,此时按win+P键,切换到指定的显示器即可(感叹下,真高级!真没想到debian如此智能了);
- 切换源到163(不喜华为):vi /etc/apt/sources.list
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
- 安装samba: apt-get install samba
- 修改samba的配置文件:
[global]
security = user
map to guest = Bad User[share]
path = /mnt/doc/share
public = yes
writable = yes
valid users = pxy
create mask = 777
force create mode = 777
自动挂载,在/etc/fstab里加入一行:
/dev/sda5 /mnt/doc ntfs default 0 1
结论:debian9+xfcs的系统非常流畅,可以作为日常办公来用了,搭建服务器也很方便。