Installing the JDK
1. Download jdk,jdk-7u25-linux-i586.tar.gz;
2. Place it in the/USR/LOCAL/SRC (this folder I used to put down the file specifically)
3. [[Email protected] src]# TAR-ZXVF jdk-7u25-linux-i586.tar.gz extract JDK Package
4. Move the extracted files to the/usr/java file (Java if not, you can create a new folder)
[Email protected] local]# MV jdk1.7.0_25/usr/java/
5. Configure Environment variables
[Email protected] lib]# Vim/etc/profile
Add at the end of the file
Export java_home=/usr/java/jdk1.7.0_25
Export Java_bin=/usr/java/jdk1.7.0_25/bin
Export path= $PATH: $JAVA _home/bin
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH
If this does not work, you can configure:
[Email protected]~]# gedit ~/.BASHRC
Enter at the end of the file
Export java_home=/usr/java/jdk1.7.0_25
Export Java_bin=/usr/java/jdk1.7.0_25/bin
Export path= $PATH: $JAVA _home/bin
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH
Save exit, work for it, run
[Email protected]~]# Source ~/.BASHRC
6. Exit Save
7. Then open the new terminal, enter
[[Email protected]~]# java-version
Show Results:
Java Version "1.7.0_25"
Java (TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot (TM) Client VM (build 23.25-b01, Mixed mode)
This means that the Java command is ready to run.
Installing Tomcat
: http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.29/bin/
1. Unzip the apache-tomcat-7.0.29.tar.gz
TAR-ZXVF apache-tomcat-7.0.29.tar.gz
2. Configure Tomcat
Copy the extracted files to the/OPT directory
MV Apache-tomcat-7.0.29/opt
Enter the/opt/apache-tomcat-7.0.29 directory
cd/opt/apache-tomcat-7.0.29
3. Open the Startup script file
sudo vi./bin/startup.sh
Add JDK and JRE environment variables:
Java_home=/usr/java/jdk1.7.0_25
Jre_home=/usr/java/jdk1.7.0_25/jre
Path= $PATH: $JAVA _home/bin: $JRE _home: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
tomcat_home=/opt/apache-tomcat-7.0.29
4. Start Tomcat
Enter Cd/opt/apache-tomcat-7.0.29/bin
then execute [[email protected] bin]#./startup.sh, display startup information
Using catalina_base:/opt/apache-tomcat-7.0.29
Using Catalina_home:/opt/apache-tomcat-7.0.29
Using Catalina_tmpdir:/opt/apache-tomcat-7.0.29/temp
Using jre_home:/usr
Usingclasspath:/opt/apache-tomcat-7.0.29/bin/bootstrap.jar:/opt/apache-tomcat-7.0.29/bin/tomcat-juli.jar
4. Verify that the configuration is successful
Open Browser http://localhost:9090 (port can change opt/apache-tomcat-7.0.29/conf/server.xml in Connector prot= "8080")
Build maven
1. Unzip
[Email protected] src]# TAR-ZXVF apache-maven-3.0.5-bin.tar.gz
(For example, the installation directory is:/opt/apache-maven-3.0.5)
2. Setting Environment variables
Export maven_home=/opt/apache-maven-3.0.5
Export path= $PATH: $MAVEN _home/bin
3. Make Environment variables effective
[Email protected] apache-maven-3.0.5]# Source/etc/profile
4. Verify, enter on the command line
[Email protected] apache-maven-3.0.5]# mvn-v
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:28+0800)
Maven Home:/opt/apache-maven-3.0.5
Java version:1.7.0_25, Vendor:oracle Corporation
Java Home:/usr/java/jdk1.7.0_25/jre
Default LOCALE:ZH_CN, Platform Encoding:utf-8
OS name: "Linux", Version: "2.6.18-164.el5", Arch: "I386", Family: "Unix"
5. The above information indicates that the MAVEN installation was successful
Installing Jenkins
1. Copy the Downloaded Jenkins.war (: http://mirrors.jenkins-ci.org/war/latest/) to the WebApps directory of Tomcat, i.e.
/opt/apache-tomcat-7.0.29/webapps
Execute command:
Execute in/USR/LOCAL/SRC
[[Email protected] src]# MV Jenkins.war/opt/apache-tomcat-7.0.29/webapps/jenkins (Jenkins directory requires new MkDir Jenkins)
2. Configure Environment variables
[Email protected] webapps]# Vim/etc/profile
Export Jenkins_home=/opt/apache-tomcat-7.0.29/webapps/jenkins
3. Save Exit, execute
[Email protected] apache-maven-3.0.5]# Source/etc/profile
Make settings effective
4. Then go to the Jenkins directory,
Cd/opt/apache-tomcat-7.0.29/webapps/jenkins
Performing an extract Jenkins.war package
[Email protected] jenkins]# JAR-XVF Jenkins.war
5. After successful decompression, start Tomcat
[Email protected] jenkins]#. /.. /bin/catalina.sh Run
6. Review the boot log without errors, start successfully, and then access
Http://localhost:9090/jenkins/, that is, go to the Jenkins page
7. After successful installation, perforce plug-in does not exist, need to install, there are two methods of installation
A:
jenkins--"System Management--" management plugin--"optional plug-in, and then select Perforce Plugin Click the Install button below
"Download Now"
Two kinds: Download perforce Plugin (PERFORCE.HPI) from the Internet:
http://mirrors.jenkins-ci.org/plugins/perforce/latest/
Place the downloaded PERFORCE.HPI in the Jenkins/plugins directory and restart Tomcat
Installing the P4 Client
P4:http://www.perforce.com/downloads/perforce/r11.1/bin.linux26x86_64/p4
1. Place the perforce executable file under Linux under/usr/local/bin and give it permission to execute
chmod +x P4
2. Setting Environment variables
Vim/etc/profile
Export P4port=xxx.xxx.x.xx:port #P4服务器所在的地址
Export P5clien=hostname #当前p4客户端所在的linux的hostname
Export P4user=username #P4用户名
Export P4passwd=password #P4密码
Export P4charset=utf8 #P4编码
3. Save exit and execute source/etc/profile to make the environment variable effective
Note: To be able to perform job success, you must have a P4 client on your own Jenkins, or you cannot execute the P4 command
Linux development environment builds---TOMCAT---jenkis---svn