1.Linux Environment (I'm building a 64-bit version of the CentOS Linux system)
1. Download and install a VMware Workstation virtual machine, which is the platform for building a Linux system.
2. Download a CentOS installation package.
3. Open the VMware Workstation, create a new virtual machine, follow the prompts to install the installation package, set the user name and password (this is the normal account, but the password and root account root is shared), the other steps all click Next to the end, and then
Silently wait for the installation to succeed.
4. After the installation is complete, enter the password into the graphical interface, right-click to select Open in Terminal, enter the command ifconfig view the IP address.
(It is recommended to install Xshell and xftp to connect the virtual machine, so it is convenient to operate the command)
(Xshell is a terminal emulation software that can be used to operate a remote host via a Xshell connection to a remote host)
(Xftp is a file transfer software that we can remotely transfer files to a remote host via a XFTP connection to a remote host)
2.JDK Installation
1. Download a Linux version of the JDK.
2. Upload to the Linux environment with XFTP.
3. Give the JDK file the highest permissions.
Switch to top-level directory CD ~
Switch to the parent directory CD.
Switch to local path under cd/usr/local
Give JDK file maximum permissions chmod 777-r jdk1.8.0_141
4. Configuring the JDK environment variables
Switch to top-level directory CD ~
Switch to the parent directory CD.
Switch to etc path under CD/ETC
Edit Profile VI Profiles
Press the I key on the keyboard to enter edit mode and navigate to the end of the document
Configure environment variables, enter them in the file
Export java_home=/usr/local/jdk1.8.0_141 (This is the installation path for your JDK, each person's path may be different, note)
Export classpath= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOME/bin
Press and hold the ESC key of the keyboard, and then enter: Wq to save the environment variable you just set
Let the environment variable that you just set take effect the source profile
Check to see if the JDK was successfully configured to enter the command java-version the content is configured successfully
3.Tomcat Installation
1. Download a tomcat version
2. Upload the apache-tomcat-8.0.30 to the virtual machine using XFTP
3. Follow the steps to start Tomcat
Switch to top-level directory CD ~
Switch to the parent directory CD.
Switch to the bin path under Cd/usr/local/apache-tomcat-8.0.30/bin
Enter the tomcat boot command./startup.sh (maximum permissions if there are insufficient permissions)
Start successfully, enter your virtual machine's IP address plus port number on your own computer, you can access to Tomcat's homepage (the port number is generally 8080)
(If you cannot access the firewall service iptables stop, you can try to shut down)
4.mysql Installation
1. Switch to the path where you need to install MySQL cd/usr/local
2. Install online, enter the command yum install Mysql-server, wait for it to be installed, some steps need to ask whether to continue, enter Y directly
3. After the installation is complete, start the MySQL service, the command is: Service mysqld start, see below, then the installation of MySQL succeeded
4. Generally this installation of MySQL is the default for root user login, password is also default is empty, so enter the following command: Mysql-u root-p, and then enter the password entered, you can log in to the database. As shown below:
That means you've landed on the database.
6. How do I connect to a Linux server database using a local navicate? and manipulate the database:
First to create a new user, because the general database users are Linux native access, we want to access the Linux database from the outside, we will create a user with the permission%
Log in to the database in the Xshell: Mysql-u root-p and then enter, when you input the password, you can log in again, because the database default user is root, the password is empty
Switch to MySQL database use MySQL
Create a user who can access the Linux database server outside: Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option;
Refresh permissions: Flush privileges;
Then use the navicate to log on to the good! With the root user, password is 123456 specific how to use Navicate connection database, please own Baidu!
5. Project Package Deployment
1. Connect to the database
2. Import the Future.sql file
3. Put the project package Futureloan.war under the/usr/local/apache-tomcat-8.0.30/webapps path
Test environment Setup and deployment (build JDK+TOMCAT+MYSQL environment and project package deployment in a Linux environment)