VirtualBox 安装 linux后 一些设置

连接方式:仅主机(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 

注意,一定要添加到REJECT  语句之上,我添加到下面的时候端口依然不能访问,添加到上面就可以了。
查看  /etc/rc.d/init.d/iptables status

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








  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值