spring-rabbitmq 연동

설치는 그냥 rpm 으로 설치 1 2 3 4 5 # 서버 시작. sbin/rabbitmq-server start # 서버 중지 sbin/rabbitmqctl stop spring-rabbit 연동 pom.xml 1 2 3 4 5 <dependency> <groupid>org.springframework.amqp</groupId> <artifactid>spring-rabbit</artifactId> <version>1.4.1.RELEASE</version> </dependency> context-rabbitmq.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <!-- A reference to the org.springframework.amqp.rabbit.connection.ConnectionFactory --> <rabbit:connection-factory id="connectionFactory" host="localhost" username="worker" password="workerpassword" /> <!-- Creates a org.springframework.amqp.rabbit.core.RabbitTemplate for access to the broker --> <rabbit:template id="amqpTemplate" connection-factory="connectionFactory" /> <!...

March 10, 2015 · 1 min · 페이퍼

git 관련 명령어 모음

svn to git 마이그레이션 1 2 git svn clone --stdlayout --no-metadata -A users.txt svn://example.com/repository/projectname cd projectname 아래 users.txt 만드는건데 perl 이 없어서 그런지.. 안되네요… ㅠ svn log ^/ --xml | grep -P "^<author" | sort -u | \ perl -pe 's/<author>(.*?)<\/author>/$1 = /' > users.txt ignore file처리 1 git svn show-ignore -i trunk > .gitignore remote git 지정 1 git remote add origin git@git.example.com:group/projectname.git tags 처리 1 git for-each-ref refs/remotes/tags | cut -d / -f 4- | grep -v @ | while read tagname; do git tag "$tagname" "tags/$tagname"; git branch -r -d "tags/$tagname"; done branches 처리 1 git for-each-ref refs/remotes | cut -d / -f 3- | grep -v @ | while read branchname; do git branch "$branchname" "refs/remotes/$branchname"; git branch -r -d "$branchname"; done push한다....

March 4, 2015 · 1 min · 페이퍼

CentOS 명령어 모음

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #프로그램 설치위치 찾기 which java /usr/bin/java #오래된 로그파일만 찾아서 삭제함 find /logs/httpd/ -type f -mtime +180 -exec rm -f {} \; #hosts 편집 vi /etc/hosts #dns서버 수정 vi /etc/resolv.conf #OS 비트 확인 getconf LONG_BIT #OS 버전 확인 cat /etc/issue #폰트목록 fc-list #폰트 반영 (/usr/share/fonts 에 폰트 넣고) fc-cache -fv #로그보기 tail -f file....

February 5, 2015 · 1 min · 페이퍼

tomcat 에서 OutOfMemory 자주 나오면.

catalina.sh 맨 상위에 아래를 추가해서 메모리를 크게 잡자. (주의 서버 메모리를 생각해서 적당히. ) 1 export CATALINA_OPTS="-Djava.awt.headless=true -server -Xms2048m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled" 참고) http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error

February 5, 2015 · 1 min · 페이퍼