[Java] view plaincopyprint? /*** CentOS-6.4-minimal version of the configuration Network _ firewall _ User Group _ JDK * installed * [installation] * Virtual Machine download: https://www.virtualbox.org/wiki/Downloads * Image address: http://mirrors.163.com/centos/6.4/isos/x86_64/ (I use CentOS-6.4-x86_64-minimal.iso here) * installation process is nothing to pay attention to, all the way down the default can, in addition to selecting the time zone, pay attention to Asia/ShangHai. * after the installation and restart, the system automatically enters the multi-user status and has the network service running level. That is, the default value in the/etc/inittab file is id: 3: initdefault: * do not try to change to 5 because the minimal version does not have a graphical user interface program installed by default * I changed 3 to 5 out of curiosity, then restart CentOS and find that it will remain stuck at the position of the boot progress bar 100%. Then, change it back to 3 through the following method * http://blog.csdn.net/jadyer/article/details/7368982 (The difference in this blog post is that after you press the e key 2, enter [1], that is, a space and 1) * optional * [Nic] * by default, the eth0 Nic is not enabled for CentOS. What we do is to enable it * [root @ CentOS64 ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0 * And then modify ONBOOT = yes (now VirtualBox is configured as a bridge Nic, you can make CentOS in the Virtual Machine networking) * ipv* [IPv6] * if you want to check whether the current IP address contains an IPv6 address, run the ifconfig command. If it is found to be similar to inet6 addr: fe80: 20c: 29ff: fee4: 1d8/64 indicates that IPv6 is included * we do not yet use IPv6, while CentOS enables IPv6 by default, so we need to disable it * [root @ CentOS64 ~] # Vi/etc/modprobe. d/dist. conf * In dist. add the following lines at the end of the conf file (comment the lines if IPv6 support is to be re-enabled) * alias net-pf-10 off * alias ipv6 off * firewall * 1) disable firewall ----- service iptables stop * 2) start firewall ----- service iptables start * 3) restart firewall ----- service iptables restart * 4) view Firewall status -- service iptables status * 5) disable fire prevention permanently Wall -- chkconfig iptables OFF * 6) Enable -- chkconfig iptables ON * after installing and configuring the above steps, I started a small application written with Mina, the result shows that the application in the virtual machine cannot be accessed in the notebook, however, it is painful to ping the IP address in the VM. * therefore, run the [service iptables status] command to find that port 22 is enabled by CentOS by default (so you can connect to CentOS through SSH using tools such as xshell ), then you need to activate the port * [root @ CentOS64 ~] # Vi/etc/sysconfig/iptables * we will find that there is A line in it that writes-a input-p tcp-m state -- state NEW-m tcp -- dport 22-j ACCEPT * write "-a input-p tcp-m state -- state NEW-m tcp -- dport 8080-j ACCEPT *" under this line based on the Huludao scheme, and finally execute the [service iptables restart] command, in this case, port 8080 of the server can provide external services * Users * [users and groups] * 1) [root @ CentOS64 ~] # Groupadd Develop (add a Develop group) * 2) [root @ CentOS64 ~] # Useradd-g Develop Jadyer (create a Jadyer user and assign it to the Develop group) * 3) [root @ CentOS64 ~] # Passwd Jadyer (set or modify the Jadyer user password) * 4) [root @ CentOS64 ~] # Chown-R Jadyer. develop/app (change the owner of the/app directory to the Jadyer user and the Develop group) * developers * [JDK] * 1) copy the downloaded jdk-6u45-linux-x64.bin to the/app/java/directory * 2) run the installation Command [Jadyer @ CentOS64 ~] $./Jdk-6u45-linux-x64.bin * 3) configure the environment variable [root @ CentOS64 ~] # Vi/etc/profile * # Set Java Environment Variable * JAVA_HOME =/app/java/jdk1.6.0 _ 45 * PATH = $ PATH: $ JAVA_HOME/bin * export JAVA_HOME PATH * 4) finally, verify [Jadyer @ CentOS64 ~]. $ Java-version * optional *------------------------------------------------------------------------------------------------------------------*/