Jenkins Setup: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
 
(8 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. Do it very simple by issues 3 command :
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.
 
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 25: Line 31:
if [ "$jenkinsdomain" = "" ]; then
if [ "$jenkinsdomain" = "" ]; then
clear     
clear     
     echo -e "******************** YOUR DOMAIN CAN NOT BE BLANK ! ********************"  
     echo -e "******************** YOUR DOMAIN CAN NOT BE BLANKED ! ********************"  
./jenkins_installer.sh
./jenkins_installer.sh
exit
exit
Line 31: Line 37:


#Install software properties package
#Install software properties package
#apt-get -y remove python-software-properties
#apt-get -y autoremove
apt-get -y install software-properties-common
apt-get -y install software-properties-common


Line 52: Line 56:
apt-get -y install openjdk-8-jdk
apt-get -y install openjdk-8-jdk
update-alternatives --config java
update-alternatives --config java
#echo "JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"" > /etc/environment
#source /etc/environment


# 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 89: Line 91:


#Install and enable services
#Install and enable services
#systemctl enable nginx.service
update-rc.d nginx defaults
update-rc.d nginx defaults
#systemctl start nginx.service
service nginx restart
service nginx restart
#systemctl enable jenkins.service
update-rc.d jenkins defaults
update-rc.d jenkins defaults
#systemctl start jenkins.service
service jenkins start
service jenkins start