1. Tener una VM de AWS, Azure, GCP o una vm local base centos 7.7
Necesitamos tener java instalado y revisar que cumplimos con los requerimientos que se piden en la pagina oficial. https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins
sudo yum install java
#java -version just to check the status
2. Configurar el home directory para agregar nuestra variable de ambiente de java.
para esto nos dirigimos al directorio por default cd */usr/lib/jvm* dentro encontraremos otra carpeta con la version de java instalada y debe hacer match con el resultado de java -version
[root@ip-172-31-40-7 jvm]# java -version openjdk version "11.0.6" 2020-01-14 LTS OpenJDK Runtime Environment Corretto-11.0.6.10.1 (build 11.0.6+10-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.6.10.1 (build 11.0.6+10-LTS, mixed mode)
cd /usr/lib/jvm/java-11-amazon-corretto.x86_64
Abrimos el bash profile y modificamos con las siguientes lineas
vi ~/.bash_profile
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export PATH
Revisando que todo esta ok…
#iniciamos sesión nuevamente
su -
echo $JAVA_HOME
#/usr/lib/jvm/java-11-amazon-corretto.x86_64
Ahora vamos a instalar Jenkins con los comandos de la pagina oficial.
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key sudo yum install jenkins service jenkins start chkconfig jenkins on service jenkins status
Si estas usando una maquina virtual en la nube recuerda habilitar el puerto 8080.
Thanks for sharing excellent informations. Your web site is so cool. I am impressed by the details that you’ve on this blog. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for extra articles.
Say, you got a nice blog post. Thanks Again. Keep writing. Carolynn Glynn Genesia