Perquisites: Make sure git is available in jenkins server, if not please run below command to install git:
yum install git
yum groupinstall “Development Tools”
yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
Step :1 Copy git repo url
Step 2: Create jobs in jenkins and past the copied git url in Repository URL section and give branch name in branch specifier section.
After giving all details, click on apply and save. now run job by clicking on build now.
- For private repository you have to give credentials in credentials option.
- For public repository no need give credentials.
By using audit trail plugin we can enable log in jenkins
Step 1: Install Audit trail plugin:
Step 2: To manage audit trail plugin navigate to Manage jenkins-> Configure System -> Audit Trail Loggers
Note: Log Separator is option.
Step 3: Login to server where jenkins running. check logs in path mentioned in below screenshot.
Below command will give you list of port where applications were running. You can use the port other than this ports.
How to Install Jenkins on CentOS.
Below are the steps to install Jenkins on your CentOS system.
Step 1: Jenkins is java application, first install java in your CentOS Server.
sudo yum install java-1.8.0-openjdk-devel.
Note: When we published this blog Java 8 is recommended, Java 9 and Java 10 are not supported.
Step 2: Download Jenkins.
Type URL : https://www.jenkins.io/download/ on your browser and click on Red Hat/Fedora/CentOS option.
Run the following command:
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm –import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
If you’ve previously imported the key from Jenkins, the “rpm –import” will fail because you already have a key. Please ignore that and move on.
With that set up, the Jenkins package can be installed with:
yum install jenkins
Jenkins installation completed.
Step 3: Start the Jenkins.
Command to start jenkins:
service jenkins start
Command to check jenkins status:
service jenkins status
Step 4: Access jenkins UI
Type http://<public ip>:8080
Login to server where jenkins is installed and cat the file /var/lib/jenkins/secrets/initialAdminPassword file and give copy past the initialAdminPassword
After entering password, select plugins option(install suggested plugins are recommended)
Installed and login to jenkins successfully.
Note: Jenkins by default it will run on 8080 port. recommended to change the port.
To change port: Login to server where jenkins is running and vi /etc/sysconfig/jenkins and change 8080 port.
How to migrate mysql without downtime
- Setup new server
setup a new server
- Install OmniMigrate
- Give old server root credentials
- Git new server root credentials
- Change dns
which involves App, DB, Storage