1. Install JDK, configure JDK path, Python path
(Current user's profile) Vi. Bash_profile
Export java_home= $HOME/local/jdk1.8. 0_111export tomcat_home= $HOME/local/apache-tomcat-7.0.72PATH = $HOME/local/apache-ant-1.9.7/bin: $JAVA _home/bin: $HOME/local/python/bin: $HOME/local/mysql-5.1.58/bin:$ PATH: $HOME/Binld_library_path= $JAVA _home/lib: $HOME/local/python/lib:export CLASSPATH=.: $JAVA _ Home/lib/dt.jar: $JAVA _home/lib/tools.jarexport pathexport ld_library_path
2. Install Tomcat, if not the root user, enter the Tomcat/bin directory and modify the Sh file permissions
chmod 777 *.sh
3. Install Jenkins to put Jenkins.war into the Tomcat/webapps directory, and also because Jenkins is only used internally, modify the login security restrictions
VI. jenkins/config.xml
<?XML version= ' 1.0 ' encoding= ' UTF-8 '?><Hudson> <disabledadministrativemonitors/> <version>1.609.3</version> <numexecutors>3</numexecutors> <Mode>NORMAL</Mode> <usesecurity>True</usesecurity> <Authorizationstrategyclass= "Hudson.security.authorizationstrategy$unsecured"/> <Securityrealmclass= "Hudson.security.securityrealm$none"/> <Disablerememberme>False</Disablerememberme> <Projectnamingstrategyclass= "Jenkins.model.projectnamingstrategy$defaultprojectnamingstrategy"/> <Workspacedir>${item_rootdir}/workspace</Workspacedir> <Buildsdir>${item_rootdir}/builds</Buildsdir> <JDKs/> <Viewstabbarclass= "Hudson.views.DefaultViewsTabBar"/> <Myviewstabbarclass= "Hudson.views.DefaultMyViewsTabBar"/> <Clouds/> <Quietperiod>5</Quietperiod> <Scmcheckoutretrycount>0</Scmcheckoutretrycount> < views> <Hudson.model.AllView> <ownerclass= "Hudson"Reference=".. /.. /.."/> <name>All</name> <filterexecutors>False</filterexecutors> <Filterqueue>False</Filterqueue> <Propertiesclass= "Hudson.model.view$propertylist"/> </Hudson.model.AllView> </ views> <Primaryview>All</Primaryview> <Slaveagentport>0</Slaveagentport> <label></label> <nodeproperties/> <globalnodeproperties/></Hudson>
4. Launch Tomcat to access Jenkins
Enter Tomcat/bin directory, execute SH startup.sh, start complete
Access Host/jenkins
Then you can create an Automation project.
Build: Execute Shell
SOURCE ~/.bash_profile
Cd/home/user/local/testcase
Pybot-l debug-d/home/user/local/testcase/case1
Post-Build actions:
......
Pit Record:
My automation project was written with the robot framework, and the results report was opened on Jenkins, prompting:
Opening Robot Framework Report failed
After tossing and turning, give up Tomcat and start Jenkins directly to solve:
Background start Jenkins:
Nohup java-dhudson.model.directorybrowsersupport.csp=-jar./jenkins.war &
The re-access report is OK.
Linux Deployment Jenkins