If you need to develop Java EE under Linux, we need to install the following software:
First upload the software to/opt via XFTP5
20.1 Installing the JDK
(1) Extract to/opt
(2) Configuring the configuration file for environment variables Vim/etc/profile
Press g to switch to the last line, press I to edit, ESC exit, and then enter: qw!, save exit!
(3) need to log off the user, environment variables to take effect
(4) Java or javac can be used in any directory
(5) test whether the installation is successful, write a simple Hello.java
20.2 Installing Tomcat
(1) Unzip to/opt
(2) to start Tomcat, go to Tomcat's Bin directory and enter./startup.sh
If you are not telnet to Linux, and you are running at level 5, you can access it using a Linux browser.
(3) Open port 8080 so that the extranet can access the Tomcat
Yy+c Copy the 22 port line, then modify it to 8080.
Restarting the firewall
(4) test whether the installation is successful, enter http://linuxip:8080 in the browser of window
Installation of 20.3 eclipse
(1) Unzip to/opt
(2) Start Eclipse, configure JRE and server
Start Mode 1: Create a shortcut
Start Mode 2: Enter the folder after the Eclipse decompression, then execute the./eclipse
(3) write the JSP and test the success
16.4 MySQL Installation and configuration
CentOS 6.8 under compile and install MySQL5.6.14
(1) Uninstall old version
Use the following command to check if MySQL Server is installed
Rpm-qa | grep MySQL
Some words are unloaded by the following command
Now we have a query, then remove it.
RPM-E mysql-libs-5.1.73-7.el6.x86_64//Normal Delete mode
RPM-E--nodeps mysql-libs-5.1.73-7.el6.x86_64//Strong Delete mode, if you use the above command to delete, prompted to have other dependent files, then use this command can be strongly deleted
Check again and make sure there's no MySQL.
(2) Installing MySQL
Install packages required for compiling code
Yum-y install make gcc-c++ cmake bison-devel ncurses-devel
Extract
TAR-ZXVF mysql-5.6.14.tar.gz
CD mysql-5.6.14
Compiling the installation
Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/usr/local/mysql/data-dsysconfdir=/etc-dwith_ Myisam_storage_engine=1-dwith_innobase_storage_engine=1-dwith_memory_storage_engine=1-dwith_readline=1-dmysql_ Unix_addr=/var/lib/mysql/mysql.sock-dmysql_tcp_port=3306-denabled_local_infile=1-dwith_partition_storage_ Engine=1-dextra_charsets=all-ddefault_charset=utf8-ddefault_collation=utf8_general_ci
Compiling and installing
Make && make install
The whole process takes about 30 minutes ... A long wait
(3) Configuring MySQL
Set permissions
Use the following command to see if there are MySQL users and user groups
CAT/ETC/PASSWD View the list of users
Cat/etc/group viewing a list of user groups
If not, create
Groupadd MySQL
useradd-g MySQL MySQL
Modify/usr/local/mysql Permissions
Chown-r Mysql:mysql/usr/local/mysql
Initialize the configuration, go to the installation path (execute the instructions below), execute the initialization configuration script, create the system's own database and table
Cd/usr/local/mysql
scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysql [This is an instruction]
Note: When starting the MySQL service, will be in a certain order to search my.cnf, first in the/etc directory, find will search "$basedir/my.cnf", in this case is/usr/local/mysql/ MY.CNF, this is the default location for the new MySQL configuration file!
Note: After the minimum installation of the CentOS6.8 version of the operating system is complete, there will be a my.cnf in the/etc directory, which needs to be renamed to another name, such as:/etc/ My.cnf.bak, otherwise, the file will interfere with the correct configuration of the source installed MySQL, resulting in the inability to start.
Modify the name to prevent interference:
Mv/etc/my.cnf/etc/my.cnf.bak
Not in my system, just ignore it. For
Start MySQL
Add services, Copy service scripts to the INIT.D directory, and set boot boot
[Note intended to be executed under/usr/local/mysql]
CP Support-files/mysql.server/etc/init.d/mysql
Chkconfig MySQL on
Service MySQL Start--start MySQL
Execute the following command to modify the root password
Cd/usr/local/mysql/bin
./mysql-uroot
mysql> SET PASSWORD = PASSWORD (' 123456 ');
Simple to use:
show databases;
Create a database DB1
Create a table user
Add a user, if successful, the installation of our database is successful!
This is the next time you log in!
Linux (20) Building Java EE Environment