连接方式:仅主机(Host-Only)网络
桥接模式,等于是虚拟了一张网卡,在局域网中是单独分配ip的
确认当前ip:ip address 或者 ifconfig (是if 千万别打成ipconfig了)
开启ssh:
参考:http://blog.sina.com.cn/s/blog_715391ef0102v3ev.html
# yuminstall ssh 安装ssh
# servicesshd start 启动ssh服务器端
#chkconfig sshd on 好像是设置开机启动
至此已经可以用 MobaXterm Personal Edition 进行登录了
CentOs6.8已经自带jdk
tomcat添加防火墙规则
执行 vi /etc/sysconfig/iptables
添加如下:-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
service iptables status可以查看到iptables服务的当前状态。
但是即使服务运行了,防火墙也不一定起作用,你还得看防火墙规则的设置 iptables -L
在此说一下关于启动和关闭防火墙的命令:
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
重启防火墙 /etc/init.d/iptables restart
查看端口:
lsof -i:port
杀进程:
kill -9 processId
查看tomcat ps -aux | grep tomcat
创建文件夹并 复制文件到该目录
mkdir -p /home/xxxx; tar zxf tcpip.tar.gz -C /home/xxxx
移动当前文件夹下的所有文件到指定路径
mv -f ./* /usr/local/mobile_apache-tomcat-7.0.76/
安装多个tomcat http://www.cnblogs.com/shihaiming/p/5896283.html