Jenkins Setup: Difference between revisions
Jump to navigation
Jump to search
Quang Nhut (talk | contribs) No edit summary |
Welcomeadmin (talk | contribs) No edit summary |
||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Category: IT Knowledge]] | |||
Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides 985 plugins to support building and testing virtually any project. | Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides 985 plugins to support building and testing virtually any project. | ||
Today, I want to share a small script can install and configure Jenkins automatically. | Today, I want to share a small script can install and configure Jenkins automatically. | ||
Do it very simple by copy below script and save as name jenkins_installer.sh. | Do it very simple by copy below script and save as name jenkins_installer.sh. | ||
Then upload to /tmp and | |||
Then upload to /tmp and issue command : | |||
chmod +x jenkins_installer.sh && ./jenkins_installer.sh | chmod +x jenkins_installer.sh && ./jenkins_installer.sh | ||
After installed, we can go to Jenkins panel by domain we entered before os use public ip of jenkins server. | |||
---- | ---- | ||
<pre> | <pre> | ||
Line 27: | Line 31: | ||
if [ "$jenkinsdomain" = "" ]; then | if [ "$jenkinsdomain" = "" ]; then | ||
clear | clear | ||
echo -e "******************** YOUR DOMAIN CAN NOT BE | echo -e "******************** YOUR DOMAIN CAN NOT BE BLANKED ! ********************" | ||
./jenkins_installer.sh | ./jenkins_installer.sh | ||
exit | exit | ||
Line 33: | Line 37: | ||
#Install software properties package | #Install software properties package | ||
apt-get -y install software-properties-common | apt-get -y install software-properties-common | ||
Line 54: | Line 56: | ||
apt-get -y install openjdk-8-jdk | apt-get -y install openjdk-8-jdk | ||
update-alternatives --config java | update-alternatives --config java | ||
# Install Jenkins, Nginx, Git, PHP 5.6 (latest) and Xdebug (for code coverage) and other tools | # Install Jenkins, Nginx, Git, PHP 5.6 (latest) and Xdebug (for code coverage) and other tools | ||
Line 91: | Line 91: | ||
#Install and enable services | #Install and enable services | ||
update-rc.d nginx defaults | update-rc.d nginx defaults | ||
service nginx restart | service nginx restart | ||
update-rc.d jenkins defaults | update-rc.d jenkins defaults | ||
service jenkins start | service jenkins start | ||