安装
virtualbox,ubuntu16.04
环境搭建
1.主机与虚拟机网络ping通
a.设置为桥接
b.ip固定
sudo gedit /etc/network/interfaces
编辑文件(注意检察你的getway是否正确。):
auto eth0
iface eth0 inet static
address 192.168.8.119
netmask 255.255.255.0
gateway 192.168.8.1
配置完成之后重启网络:
sudo /etc/init.d/networking restart
c.对于同网端无法ping通windows的解决方案,windows7 防火墙 允许’文件和打印共享(回显请求-ICMPv4-In)’
2.网络远程登录(putty)
sudo apt-get update
sudo apt-get install openssh-server
ps -e | grep ssh
sudo /etc/init.d/ssh start
3.支持 ftp (cuteftp)
sudo apt-get install vsftpd
vi /etc/vsftpd
-#write_enable=YES
+write_enable=YES
-#local_enable=YES
+#local_enable=YES
/etc/init.d/vsftpd restart
4.支持ssh secure shell
问题:登录出现 server responed “Algorithm negotiation failed” 解决办法
vi /etc/ssh/sshd_config
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org
sudo service ssh restart
注意传输文件的路径
5.支持samba
linux端:
下载:
apt-get install samba
apt-get install cifs-utils
apt-get install samba-common
配置:
vi /etc/samba/smb.conf
29 workgroup = WORKGROUP
+30 display charset = UTF-8
+31 unix charset = UTF-8
+32 dos charset = cp936
+262 [share]
+263 path = /home/kj/samba_share
+264 available = yes
+265 browseable = yes
+266 public = yes
+267 writable = yes
+268 valid users = kj
+269 create mask = 0700
+270 directory mask = 0700
+271 force user = nobody
+272 force group = nogroup
testparm
建立共享路径
mkdir samba_share
chmod 777 samba_share
设置密码
touch /etc/samba/smbpasswd
smbpasswd -a kj
重起服务
/etc/init.d/samba restart
windows7 端
\192.168.1.130
6.支持git
apt-get install git
git config –global user.name “kj”
git config –global user.email “kj@github.com”
git config –list
7.支持svn