1. to switch to bash shell chsh -s /bin/bash 2. to kill process based on program name kill -9 $(ps aux | grep program_name | grep -v grep | awk ‘{print $2}’)
Read MoreGit commands for development workflow
1. checkout remote dev branch to local git checkout -b local_dev_branch origin/dev 2. after modified, submit to local, the example shows submit modified java files. git commit -m *.java “modified java files” 3. after submit code in local, you can submit own branch to remote, the branch name can be same with local branch name […]
Read Morestart/stop jenkins service on mac
## start sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist ## stop sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
Read MoreSome commands for common usage
1. Remove all docker containers docker rm $(docker ps -a -q) 2. Stop all docker containers docker stop $(docker ps -a -q) 3. use pem to login server without password ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/someuser.pem username@host
Read MoreStart firefox with command issue of RHEL7 Error: no DISPLAY environment variable specified
This issue root cause is no Xvfb below is fixed steps: yum install Xvfb firefox Xvfb :10 -ac & export DISPLAY=:10 #start firefox, should no this error /path/firfox
Read MoreRun hashicorp nomad in localhost steps
Nomad is a tool of deploy cluster scheduler. Sometimes we need to install localhost to try how to use it,here are some steps for linux ubuntu18.04 installation: 1) Download nomad with binary version Download nomad,then need to add bin path to execute. 2) Then we need to a server config file to start nomad server, below […]
Read MoreDevOps : Build your docker repository for example
1. Install docker on Ubuntu Please refer to https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver 2. Check and Download JavaSimpleProject.zip include dockerfile and java code Zip file includes: src/main maven project folder Dockerfile for docker build including maven,tomcat installation pom.xml for maven build start.sh start tomcat to run java application Note, in Dockerfile, you can change FROM ubuntu:latest into FROM ubuntu:18.04 3. Change to your […]
Read MoreDevOps : Linux commands with scenarios
DevOps Linux commands # Sometimes only access linux system using terminal, and need to check which linux version is, lsb_release -a # Open terminal and run one application/scripts with long console output, and try to search some keyword text in GUI,not impacted by previous command output, avoid to re-open new terminal to re-run, so […]
Read More