All of the following software installation issues are common to the CentOS7.1 version
CentOS7.1 Installing JDK FAQs
CentOS7.1 Installing Tomcat FAQs
Tomcat installation MySQL FAQ
I. CentOS7.1 common problems with installing JDK
Problem Demo
JDK common error only one, is installed after the end of the environment variable is not configured, when the input java-version when the command is not found
Solution:
? We need to use the VI command to add our JDK environment variables to the/etc/profile.
1. Enter the command below to open the profile file:
Vi/etc/profile
2. At the end of the file, enter the ' I ' letter into the edit state to add settings about the JDK environment (e.g.:)
3. After writing, you need to press ESC to exit edit mode, and then enter: Wq command to save the operation;
4. You also need to re-load the/etc/profile file again, or the environment variable is not effective, input source/etc/profile such a command can reload the configuration file
5. Re-enter the Java-version command to display the JDK information to prove that the JDK installation has been successful two. CentOS7.1 Installing Tomcat FAQs
Problem Demo
Installing Tomcat is actually the ability to extract Tomcat, and then start Tomcat, but you will find that starting Tomcat, these are generally not a problem, but starting Tomcat discovery, the home page cannot be accessed (effects such as):
Access Tomcat's homepage in the browser
The results of the browser are as follows:
Solution:
This is because Linux default 8080 this port is blocked by a firewall, we need to let the firewall release 8080 this port
1. You need to enter a command, this command can put 8080 this port in the release area usually ContOS7.1 enter the following command:
Firewall-cmd--zone=public--permanent--add-port=8080/tcp
You can also enter the following command:
/sbin/iptables-i input-p TCP--dport 8080-j ACCEPT
But the second command is a one-time, the next start of the Linux server this port also needs to be set again, all deprecated, the first command is recommended
2. Restart the firewall, so that the first step of the setting effect is effective, and can be guaranteed to start the server again when 8080 this port is the status of release, restart the firewall command as follows:
Service Firewalld Restart
3. Access our Tomcat server again from the browser to access (e.g.)
Three: CentOS7.1 install MySQL FAQ
MySQL installation problem is relatively more than four stages of the problem
1. First install the MySQL server
Use the following command to install the MySQL server
RPM-IVH mysql-server-5.6.22-1.el6.i686.rpm
At this time there are generally some dependencies that cannot be found (e.g.)
We need to install dependencies with the Yum command, with multiple dependencies separated by spaces, with the following commands:
Yum-y Install libaio.so.1 libc.so.6 libcrypt.so.1 libdl.so.2 libm.so.6 net-tools
If the installation depends on the package as an error, you can use the following command:
Yum install--setopt=protected_multilib=false name of the problematic dependency
For example: Assuming that the installation libcrypt.so.1 has this problem, we should write:
Yum Install--setopt=protected_multilib=false libcrypt.so.1
If all dependencies are installed, use the Install Server command again
RPM-IVH mysql-server-5.6.22-1.el6.i686.rpm
If also reported is an error, you can use
Yum install-y perl-module-install.noarch Such a command to solve
Then continue to install the MySQL server
RPM-IVH mysql-server-5.6.22-1.el6.i686.rpm
You may also see the following error, some of the Lib version incompatibility caused by the need to use the following command
Yum Remove Mysql-libs
This command removes all incompatible lib, generally above error basically contains the most common error to install MySQL server
2. Install the MySQL client
Use the following command to install the MySQL client
RPM-IVH mysql-client-5.6.22-1.el6.i686.rpm
There may also be some dependencies not installed, error such as
You need to use the Yum command to install dependencies
Yum-y Install libncurses.so.5 libtinfo.so.5
Turn on MySQL service
Service MySQL start3. About password reset issues
That's when we can log in to MySQL via mysql-uroot-p. But the question is, how much is the password????
At this time we can find in the installation of the MySQL server, in fact, prompted to give us a word
We use the VI command to open this file
Vi/root/.mysql_secret
will see randomly generated passwords, this time again using the Mysql-uroot-p command to enter, the file password input can enter MySQL
Then use the command set PASSWORD = PASSWORD (' 123456 ') to change the root user's password 4.window system wants to access our Linux MySQL service
This time will not be able to find access, because we MySQL must turn on remote access, the command to open remote access is as follows:
Grant all privileges on. To ' root ' @ '% ' of ' identified by ' 123456 ';
Refresh remote permissions for this user
Flush privileges;
Finally, we need to release the 3306 port in the firewall, which is the same as the command in Tomcat.
The first command writes Port 3306 to the release area:
Firewall-cmd--zone=public--permanent--add-port=3306/tcp
To restart the firewall:
Service Firewalld Restart
Software Installation FAQs under Linux