Jenkins configuration Slave specific steps 1 Enter Jenkins to find "System Management"
2 Go to Jenkins System admin page to find "Management node"
3 Find "new node" in the Node Management menu
4 new node page input node name, select Dumb Slave, click OK
1 Configuring Slave page
Number of *executors, 1 or more; Is the number of processes that can be build at the same time
* Enter the directory on the slave; This is where the Jenkins working directory is placed on the remote machine
* Tags: This tag is used to associate with the job
*usage selection: Leave This machine for tied jobs only; usage
*lunch method Selection: Launch slave agents via Java Web start;
* Avaliablitiy selection: Keep This slave online as much as possible;
* then save; 2 start Slave child server
Click Slave01
Starting mode of 3, this paper chooses the second way,
Select the corresponding Label expression when the project is built
The problem is: drop down the File menu and have an option he will prompt you if you want to set up a self starter service. The current slave may be set to a service that automatically starts the slave service each time the machine restarts, so that the slave agent cannot be started every time. The following figure, estimated to be the problem with the virtual machine I use, upgrade the service successfully under Windows
The boot method chooses the server that slave through the SSH connection
Launch log information is as follows:
Solution--refer to the following connection
http://stackoverflow.com/questions/32139098/cannot-connect-to-jenkins-slave-using-root-user/32140361
SSH connection to ensure that Ssh-p Slaveip successful Telnet slaveip success.
Expand Knowledge:
Check to see if Telnet is installed:
[Root@iz94imebuqwz ~]# Rpm-qa telnet
Telnet-0.17-41.e15 "There are output instructions installed, if no output is not installed, use Yum install telnet for installation"
Check if Telnet-server is installed:
[Root@iz94imebuqwz ~]# Rpm-qa Telnet-server
Telnet-server-0.17-41.el5 "There are output instructions installed, if no output is not installed, use yum install Telnet-server for installation"
If the 2nd step is a Telnet-server installation and has been successfully installed, we need to reboot the xinetd because the Telnet service is guarded by xinetd.
[ROOT@IZ94IMEBUQWZ ~]# Service xinetd restart
Stopping xinetd: [
OK]
Starting xinetd: [
OK]
XINETD started successfully, you can view the operation of xinetd [Root@iz94imebuqwz ~]# netstat-tnlp "or use NETSTAT-TNL | grep 23 View only the target port
If you still cannot connect to telnet, you need to modify the/etc/xinetd.d/telnet file.
How to start the Telnet service for Linux
The steps are as follows:
1. If you have a telnet, telnet-server rpm package installed, jump to 2. , otherwise install this package.
2. Modifying the Telnet service configuration file
Vi/etc/xinetd.d/telnet
Service Telnet
{
Disable = yes
Flags = Reuse
Socket_type = Stream
wait = no
user = root
Server =/usr/sbin/in.telnetd
Log_on_failure + + USERID
}
Add the Disable=yes line before the #, or change to Disable=no
3. Restarting the xinetd daemon
Because the Telnet service is also guarded by xinetd, the telnet-server must be restarted to start the Telnet service when the installation is complete xinetd
[root@localhost Root] #service xinetd restart
4. Shut down the system's firewall
The default firewall for Linux systems is "high".
(method: [Root@localhost root]# Setup
Choice: "Firewall Configuration"
Option: Security level--"no Firewall")
5. If you want to allow root to be logged into the Linux host Telnet. Because Telnet is not very secure, it is not possible to allow root to Telnet to the Linux host in a natural default scenario. If you want to open root to Telnet to the Linux host, you can do this:
Vi/etc/pam.d/login
Add a # before Auth required/lib/security/pam_securetty.so this line, that is, just comment it out.
Query \ Install SSH service
Log on to the Linux system and open the Terminal command. Enter Rpm-qa |grep ssh to find if the current system is installed
2. If the SSH software package is not installed, it can be installed through the Yum or RPM installation package (no screenshots)
Start SSH Service 2
Once installed, SSH service will be turned on. SSH service is generally called SSHD
command line input Service sshd start can be started
or use/etc/init.d/sshd start
Configuration \ View Sshd Port 3
View or edit the SSH service profile, such as Vi/etc/ssh/sshd.config
If you want to modify the port, you can change the default port 22 port to other ports (note that the # of the front will be removed)
Remote Connection SSH4
If you need to connect SSH remotely, you need to have 22 ports open on the firewall.
. Close the firewall, or set the 22 port exception
SSH remote login failed, prompting "Password authentication failed"
Use SECURECRT login, hint "Password authentication failed"
Using Linux under SSH login, prompt "Permission denied, please try again."
Online collection of relevant information:
Method One:
1. VI Server-side/etc/ssh/sshd_config
2. Set Passwordauthentication to Yes
3. Restart SSH Service
Method Two:
1.VI Server-Side/etc/ssh/sshd_config
2. Find #permitrootlogin No to modify it to permitrootlogin Yes
Method Three:
1. See if the sshd is running correctly
NETSTAT-ANP | grep sshd
2. If you are not running service sshd restart Restart services
Method Four:
1. Clients use ssh-v root@192.168.0.120 to view login information
2. Hint "Permission denied, please try again."
3. View the Firewall
#/etc/init.d/iptables status
If the 22 port is restricted, it cannot be logged in.
Release Port 22
#/sbin/iptables-i input-p tcp–dport 22-j ACCEPT
#/etc/rc.d/init.d/iptables Save Telnet:no route to host
[root@zshts011 backup]# telnet 192.168.31.42
Trying 192.168.31.42 ...
Telnet:connect to address 192.168.31.42:no route to host
Workaround:
Executing on the target machine: iptables-f//performing cleanup work
via SSH private key public key form
Who starts the Jenkins uses which user to generate the public key private key, if in the Tomcat container Jenkins, then who starts Tomcat, who generates the public key pair
can refer to:
Http://www.blogjava.net/qileilove/articles/409984.html
Http://kurenai.elastos.org/2013/03/22/jenkins Learning Notes (iv) Preliminary understanding of-masterslave
Http://www.cnblogs.com/itech/archive/2011/11/10/2244690.html
A) generating key pairs: ssh-keygen–t RSA
b add id_rsa.pub to the ~/.ssh/authorized_keys to access the machine
Ssh-copy-id–i ~/.ssh/id_rsa.pub Username@servername
Then you can use SSH username@servername no password login
Open Pubkeyauthentication Yes in Ps:/etc/ssh/sshd_config
If you use a password to generate the key, you still need the password at the time of login, and you can use Ssh-agent to help. Use Ssh-add to hand over your key to its management, once you enter a password, you can login without a password.
Fill in Jenkins's credentials with the private key generated by Master's server
Pass master-generated public key to slave user
Configure the Slave node to select via SSH and select the corresponding credentials