Pre-conditions
First of all we need to upload the Java EE Development software from Windows through the XFTP5 tool to the Linux opt directory
Note: Here I will use the package name under the diagram to operate
Installing JDK under Linux
1. The. gz package that extracts the JDK
2. Configure Java_home at the last line of the/opt/profile file, then press ESC, enter: Wq return, save to exit operation
3.source Command Refresh Profile
4. Using console input Javac prompts to indicate successful installation
Install MySQL under Linux
1. See if MySQL installation service exists under Linux
Rpm-qa | grep MySQL
2. There is an option to uninstall the operation
rpm-e mysql_libs //Normal Delete mode
rpm-e--nodeps mysql_libs //brute force Delete mode
3. Use the Yum command to install the packages required for compiling the code, and the Yum command requires Linux networking
Yum-y install make gcc-c++ cmake bison-devel ncurses-devel
--You need to execute some C code later, so install a compile package that can run the C program.
4. Unzip the tar.gz package for MySQL under/opt/
Tar-zxvf/opt/mysql-5.6.14.tar.gz
5.cd to MySQL directory, perform some compilation preparatory instructions
CD mysql-5.6.14
cmake-dcmake_install_prefix=/usr/local/mysql , &N Bsp - DMYSQL_DATADIR=/USR/LOCAL/MYSQL/DATA-DSYSCONFDIR=/ETC- Dwith_myisam_storage_engine=1 - dwith_innobase_storage_engine=- DWITH_MEMORY_STORAGE_ENGINE=1 - DWITH_READLINE=1 - dmysql_unix_addr=/ Var/lib/mysql/mysql.sock- dmysql_tcp_port=3306 - denabled_ local_infile=1 &NBsp - dwith_partition_storage_engine=1 -DEXTRA_CHARSETS=all &NBSP ; - ddefault_charset=utf8- ddefault_collation=utf8_general_ Ci
--It doesn't matter, this is required to compile some C's underlying code, copy is OK
6. Compiling and installing
make && make install
--&& means to finish executing the make command before executing the Do install
7. Configure MySQL, set MySQL permissions
--MySQL is managed by the root user by default, we need to modify MySQL to be managed by MySQL user
See if MySQL users and groups exist
CAT/ETC/PASSWD View the list of users
Cat/etc/group viewing a list of user groups
without MySQL users and groups create a MySQL group and a MySQL user, MySQL user under the MYSQ group
Groupadd MySQL
useradd-g MySQL MySQL
Modify default installation in/usr/local/mysql file permissions,-r recursively modify all file permissions for MySQL user in MySQL directory
Chown-r Mysql:mysql/usr/local/mysql
8. Enter the/usr/local/mysql directory to initialize the MySQL configuration and execute the instructions below
Cd/usr/local/mysql
scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysql
9. Installation of Linux, in/etc directory will sometimes exist with the same name as MySQL configuration file called my.cnf, if there is execution to delete or modify its name
Rm-f/etc/my.cnf
10. Add Service, Copy Service script to INIT.D directory, and set boot start [note intended for/usr/local/mysql execution]
CP Support-files/mysql.server/etc/init.d/mysql
Chkconfig MySQL on --set the start MySQL service
Service MySQL start --Start MySQL service
Tip Success instructions to start successfully!
11. Configure the MySQL environment variable
Edit/etc/profile File
Add a/usr/local/mysql/bin path to the path variable use the source command to refresh the profile
Enter the MySQL command to log in
After the 12.mysql configuration is complete, the default password is empty and you need to set a password for it
Enter MySQL command to enter MySQL
Set Password to 123456
set password= password (' 123456 ');
enter exit to sign in again will find login failure, you need to enter the correct password
Installing Tomcat under Linux
1. Unzip the tar.gz pack of Tomcat in the/OPT directory
Tar-zxcf/opt/apache-tomcat-7.0.70.tar.gz
2. Go to Tomcat's Bin directory and execute startup.sh to start Tomcat
3. Under Linux, open Firefox, enter localhost:8080 to see if the launch was successful.
4. The firewall in Linux is accessed externally by default, which makes it impossible for us to access the 8080 port of Tomcat from other networks, only locally, so we need to open the firewall to provide 8080-port confession access.
Modifying the/etc/sysconfig/iptables configuration file
Append the 8th line configuration to the configuration file, and then save the exit:
Restarting the firewall
Access Linux under the Tomcat server via Windows Explorer
Installing Java EE Common development software under Linux