NAT永久静态IP
DEVICE=eth0
HWADDR=00:0c:29:71:07:09
TYPE=Ethernet
UUID=fcd2e730-c29d-4335-94d9-059fcc775136
ONBOOT=yes
NM_CONTROLLED=yes
#NAT
BOOTPROTO=static
IPADDR=192.168.70.131
GATEWAY=192.168.70.2
DNS1=192.168.70.2
#HostOnly
#IPADDR=192.168.159.131
#NETMASK=255.255.255.0
#GATEWAY=192.168.159.2
把设备名称恢复为 eth0
/etc/udev/rules.d/70-persistent-net.rules
/etc/sysconfig/network-scripts/ifcfg-eth0
配置环境变量:
/etc/profile
JAVA_HOME=/opt/jdk1.8.0_121
MAVEN_HOME=/opt/apache-maven-3.5.0
CATALINA_HOME=/opt/apache-tomcat-7.0.75
PATH=/opt/jdk1.8.0_121/bin:/opt/apache-tomcat-7.0.75/bin:/opt/apache-maven-3.5.0/bin:$PATH
CLASSPATH=.:/opt/jdk1.8.0_121/lib/dt.jar:/opt/jdk1.8.0_121/lib/tools.jar
export JAVA_HOME PATH CLASSPATH CATALINA_HOME MAVEN_HOME
原文地址:https://www.cnblogs.com/sidekick/p/8343799.html
时间: 2024-10-15 23:57:40