Tomcat6 + mysql5 under UbuntuServer are all from network I. network Configuration Check network configuration $ ifconfig configure DHCP client $ sudovi/etc/network/interfaces add ifaceeth0inetdhcp configure static IP address $ sudovi/etc/ configure network/interfaceseth0 as follows: autoeth0address
In Ubuntu Server, Tomcat 6 and mysql5 are all from the network.
I. Network Configuration
Check Network Configuration
$ Ifconfig
Configure the DHCP Client
$ Sudo vi/etc/network/interfaces
Add iface eth0 inet dhcp
Configure static IP addresses
$ Sudo vi/etc/network/interfaces
The eth0 configuration is as follows:
Auto eth0
Address 192.168.0.88
Netmask 255.255.255.0
Gateway 192.168.0.1
Make the new configuration take effect
After saving and exiting, restart the networking command to make the new configuration take effect:
$ Sudo/etc/init. d/networking restart
You can also restart the NIC to make the new configuration take effect. The advantage is that it does not affect other network interfaces:
$ Sudo ifdown eth0
$ Sudo ifup eth0
Temporarily change IP Address
$ Sudo ifconfig eth0 192.168.1.111 netmask 255.255.255.0
After the system is restarted, the configuration in interfaces will be restored.
You can set the default gateway in either of the following ways:
1. Set it in the interfaces file.
$ Sudo vi/etc/network/interfaces
Add gateway to the eth0 configuration, for example:
Auto eth0
Iface eth0 inet static
Address 192.168.1.123
Netmask 255.255.255.0
Gateway 192.168.1.1
----------------------------------------------------------------->
Ii. Install sysv-rc-conf (Service Management)
Sudo apt-get install sysv-rc-conf
It is mainly used to set server auto-start