Ubuntu Server下配置Tomcat6+MySQL5总结

Ubuntu Server下配置tomcat6+MySQL5总结均来自网络

一、网络配置

检查网络配置
$ ifconfig

配置DHCP客户端
$ sudo vi /etc/network/interfaces
加入 iface eth0 inet dhcp

配置静态IP地址
$ sudo vi /etc/network/interfaces
eth0配置如下:
auto eth0
address 192.168.0.88
netmask 255.255.255.0
gateway 192.168.0.1

让新配置生效
保存退出后,使用重启networking命令让新配置生效:
$ sudo /etc/init.d/networking restart
也可以重启网卡让新配置生效,优点是不影响其他网络接口:
$ sudo ifdown eth0
$ sudo ifup eth0

临时改变IP地址
$ sudo ifconfig eth0 192.168.1.111 netmask 255.255.255.0
当系统重启动后,后会恢复interfaces中的配置。

设置默认网关的方法也有两种:
1. 在interfaces文件中设置。
$ sudo vi /etc/network/interfaces
在eth0的相关配置下加入gateway,如:
auto eth0
iface eth0 inet static
address 192.168.1.123
netmask 255.255.255.0
gateway 192.168.1.1
----------------------------------------------------------------->

二、安装sysv-rc-conf(服务管理)
sudo apt-get install sysv-rc-conf

主要用于设置服务器自启动

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyfdgx.html