maven, jenkins, nexus, git related

change mac os x jenkins default port:

sudo defaults write /Library/Preferences/org.jenkins-ci httpPort 8880

check if it changed:

defaults read /Library/Preferences/org.jenkins-ci

stop jenkins on mac os x:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

or if the previous doesn’t work,

ps -ef | grep jenkins and then kill -9

start jenkins on mac os x:

sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist

Externalising SCM credentials with Maven:

https://stackoverflow.com/a/4791460

nexus default username/password:

admin/admin123

Nexus Repository Manager OSS 3.x change port

open /path/to/nexus/nexus-3.x/etc/nexus-default.properties

 

Advertisements

linux/unix utilities

1. How to kill a known process

Step #1: First, you need to find out process PID (process id)

Use ps command or pidof command to find out process ID (PID). Syntax:
# ps aux | grep processname
pidof processname

For example if process name is lighttpd, you can use any one of the following command to obtain process ID:
# ps aux | grep lighttpd

OR use pidof command which is use to find the process ID of a running program:
# pidof lighttpd

Step #2: kill process using PID (process id)

Above command tell you PID of lighttpd process. Now kill process using this PID:
# kill PID
OR
# kill -9 PID
Where, -9 is special Kill signal, which will kill the process.


2. How to kill the process running on specific port in linux

Step #1: Find Out Which Process Is Listening Upon a Port

Type the following command:
# netstat -tulpn | grep :PID
OR
# fuser PID
OR
lsof -i :PID

Step #2: kill process using PID (process id)

same as previous Step #2.


3. Find out process name associated with PID and current working directory of a process

To find out process name associated with PID, type the following command:
# ls -l /proc/PID/exe

To find out current working directory of a process, type the following command:
# ls -l /proc/PID/cwd
OR
# pwdx PID