https://jenkins.io/zh/doc/boo...
- install java
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
- add the following entry in your
/etc/apt/sources.list
deb https://pkg.jenkins.io/debian-stable binary/
sudo apt-get update
sudo apt-get install jenkins
- set environment path
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
export JRE_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
export CLASSPATH=$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
source /etc/profile
java -jar /usr/share/jenkins/jenkins.war --httpPort=1080
- restart jenkins
/etc/init.d/jenkins restart
- open in browser
127.0.0.1:1080
- login jenkins
- install recommended plugins
- create admin user
- config jenkins
- generate public key for git repositories
1).cd ~/.ssh
2).ssh-keygen
// this will generate id_dsa and id_dsa.pub
3). copy the text in id_dsa.pub to git -> settings -> SSH Keys -> key - Set up new item -> source code management -> git -> repositories -> credentials -> add -> SSH Username with private key -> copy public key here.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。