Linux Environment Preparation
- After installing Linux in VMware, log in with the root user
Configure the Network
Environment building of virtual machines
Click Edit to open the virtual Network editor
There are three network cards in it, VMnet0, VMnet1, VMnet8 are three different types
Set VMnet1 to 0 network segment
and configure NetworkAdapter as Host-only in virtual machine settings, that is, using NIC 1
Configure VMnet1 network segments and virtual machines in the local network for consistent
After the configuration is complete, open the cmd window and use the Ipconfig/all command to view the VMnet1 NIC
Finally shut down the Windows Firewall.
IP address settings for Linux (terminal configuration is recommended)
First, open in terminal, then enter the command Setup to enter the hardware configuration center. Select Network Configuration, click the Run tool,
Select Device Configuration–>etho to enter the IP configuration page,
Another way to configure:
Edit the Ethernet card's configuration file by command Vim/etc/sysconfig/network-scripts/ifcfg-etho to display
DEVICE:代表网卡名称HWADDR:网卡的物理地址,就是MAC地址TYPE:网卡的类型ONBOOT:开机网卡是否启动,改为yesBOOTPROTO:代表IP获取,dhcp为自动获取,static为静态网址,none,这里设置为static添加属性IPADDR=192.168.0.2NETMASK=255.255.255.0GATEWAY=192.168.0.1
Can be viewed with the cat command after modification
Restart the network via #/etc/init.d/network restart or # service network restart
Modify Host Name
命令:hostname -f 查看主机名 vim /etc/sysconfig/network 修改主机名
Configuring the host name and IP mapping relationship
vim /etc/hosts
Restart takes effect
Test communication
Ping Windows systems in a Linux system
ping 192.168.0.100(是windows中的VMnet1的ip地址)
Ping Linux Systems in Windows systems
ping 192.168.0.2
SECURECRT use
To connect quickly using the root user:
Turn off IP firewall
Installing the JDK
Upload the JDK package to the root directory via Securefx and perform a named installation
Configuring Environment variables
# vim /etc/profile在配置文件最后一行添加:JAVA_HOME=/usr/java/jdk1.7.0_79export PATH=$JAVA_HOME/bin:$PATH生效命令:# source/etc/profile查看# java -version
Linux Environment Preparation