Linux consolidation Records (1) Java EE Development Environment construction and network configuration

Source: Internet
Author: User

It's a lot more time to operate Linux due to the recent use of Hadoop and other related tasks.

Previously, only the Java EE Project execution Environment was configured on Linux, with the provision of a JDK, deployment of Tomcat, and automatic deployment via Docker or Jenkins

Look at the process, copy and paste deletion and other basic operations, a lot of things for a long time forget, all write a demo to consolidate the Linux knowledge

Follow-up will be the mainstream of Hadoop and other major data-related environment to build and use

--------------------------------------------------------------------------------------------------------------- ------------------------------------------

This talk about the most basic Java EE environment to build VMware 12 under Centos-7-x86_64-everything

1. The virtual machine is configured as a static address and in the same network segment (try not to use DHCP, if the IP is changed, it will affect such as the network between Hadoop nodes is not through)

A is configured as a static address and the specified network segment and host are the same

Edit "Virtual Network Editor" VMnet8 "

  

  

When a virtual machine is selected, right-click Settings network adapter is set to bridge mode

  

  

After entering the system vi/etc/sysconfig/network-scripts/ifcfg-enxxxx the last point may not be the same, please confirm the change to the following similar

Type= "Ethernet" bootproto= "static" defroute= "yes" peerdns= "yes" peerroutes= "yes" ipv4_failure_fatal= "no" ipv6init= "yes" ipv6_autoconf= "yes" ipv6_defroute= "yes" ipv6_peerdns= "yes" ipv6_peerroutes= "yes" ipv6_failure_fatal= "No" ipv6_addr_gen_mode= "Stable-privacy" name= "Ens33" uuid= "0689ca28-6b38-4226-b55a-e2e5a2825556" DEVICE= "Ens33" onboot= "Yes"ipaddr=192.168.0.80netmask=255.255.255.0gateway=192.168.0.1dns1=61.139.2.69

Also shuts down the firewall and disables boot booting

Systemctl Stop Firewalld.service systemctl disable Firewalld.service

Reboot the system and verify that it is able to ping each other with the host

If the virtual machine and host are not on the same network segment, you need to increase the routing to ping the

Route-p Add 192.168.65.0 255.255.255.0 192.168.0.168

2. Configuring the JDK

The full version of the system comes with OPENJDK and is replaced with Oracle's JDK

First, the OpenJDK uninstall

#查找带有openjdk的安装项目rpm-qa | grep java# Delete rpm-e--nodeps by name xxxxx

Download the Linux version jdk to the/home directory and pass the tar--xzvf jdk-xxxx.tar.gz/jdk1.8.0

Vi/etc/profile

and add the following content,

Export Java_home=/home/jdk1.8.0export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib /tools.jarexport path= $PATH: $JAVA _home/bin export Java_homeexport pathexport CLASSPATH

Make configuration effective immediately

#立即生效source/etc/profile

Confirm the configuration is successful by java-version

In the same way, other things like Maven are consistent with the JDK configuration, which can be added to the path in/etc/profile after decompression.

Tomcat can be extracted directly via Ps-ef | grep "Tomcat" to view the running status

Linux consolidation Records (1) Java EE Development Environment construction and network configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.