Environment deployment: Please complete the construction of Jenkins Environment, need to install tomcat,mysql.
Jenkins address : https://jenkins.io/download/
Step Analysis:
1. All operations using ordinary user Hindy, of course, can also use the root user directly
2. You need to list the detailed steps for configuring the environment variables and ensure that the environment variables are prioritized every time java_home
3. Modify Jenkins's access port setting to 8090
4.Mysql Port modified to 8036
5. Consider the firewall port problem
6. Finally, you need to give a visit to Jenkins and MySQL
Here's how:
1. Create a new normal user Hindy.
Useradd Hindy New User
passwd Hindy Modify the password of the Hindy user, set a convenient to remember, because the next always use
Vim/etc/sudoers setting sudo permissions to Hindy
Step 1 and Figure 2:
Figure 1
Figure 2
2.yum mode one-click Installation
sudo yum -y
install
tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat6-docs-webapp tomcat6-javadoc mysql-server java-1.7.0-openjdk
Note that I am installing the java1.7.0 version by default here, and of course it can not be set, Yum can automatically install version 1.6.
After installation, there will be a complete hint, 3
Figure 3
3. Setting the Java environment variables
sudo vim/etc/profile
Add the following section at the end, 3
Figure 3
Add content to:
#set Java Environment
Java_home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.151.x86_64
Jre_home= $JAVA _home/jre
Class_path=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Path= $PATH: $JAVA _home/bin: $JRE _home/bin
After the export java_home jre_home class_path PATH setting is complete, you need to source/etc/profile the environment variable into effect. You can then look at the echo $PATH for a result such as 4.
Figure 4
4. Change the port number of Jenkins, here is actually the port number to modify Tomcat, tomcat default port number is 8080, modified to 8090
sudo vim/usr/share/tomcat6/conf/server.xml
Change the 8080 to 8090.
such as 5,
Figure 5
Restart the Tomcat,sudo service tomcat6 restart.
Here you can open the IP address: 8090 Try it, success Interface 6.
Figure 6
5. Modify the MySQL port number to 8036 and the default port number to 3306.
sudo vim/etc/my.cnf
Increase port=8036.
Then sudo service mysqld restart, where reboot is successful.
A problem has been encountered here and a reboot failed, such as 7.
Consideration is the problem of SELinux setup, so Getenforce view, found that this is really the problem, so Setenforce 0.
Note that this method is one-time, if the shutdown is invalid, if necessary has been practical, you should go to the configuration file modification, not much to say here. Specific Operation 8.
Figure 8
6. Put Jenkins ' War package in/usr/share/tomcat6/webapps,/usr/share/tomcat6/webapps is the main program directory of Tomcat.
Add the next 9.
Figure 9
7. Open IP Address: 8090/jenkins view, 10
Figure 10
This has all been done.
Build the environment of Jenkins under the Linux environment