redis 3.2.3 설치

컴파일러를 먼저 설치해야 합니다. (설치돼 있다면 패스) 1 yum install gcc gcc-c++ autoconf automake 참고) http://www.redis.io/download 설치 1 2 3 4 5 6 7 # 다운로드 및 설치 (컴파일) wget http://download.redis.io/releases/redis-3.2.3.tar.gz tar xzf redis-3.2.3.tar.gz cd redis-3.2.3 make && make install cd utils ./install_server.sh 실행로그 확인 1 tail -f /var/log/redis_6379.log -n 1000 로그에서 Warning 없애기 vi /etc/sysctl.conf 파일에 아래 추가 1 2 vm.overcommit_memory=1 fs.file-max = 1048576 vi /etc/rc.local 파일에 아래 추가 1 2 echo never > /sys/kernel/mm/transparent_hugepage/enabled sysctl -w net....

September 20, 2015 · 1 min · 페이퍼

.NET Framework 4.5.2로 개발했다가. 4.0로... 내림

최근에 윈도우 어플을 개발할 일이 생겼다. .NET 4.5부터 async 문법이 새로 들어갔다 해서.. 이왕 하는거 4.5.2로… 만들기로 했다. 오…… 엄청나게 편리하다.!! async, await 두개가 중요하다. 특히 UI프로그램에서 background thread와 main thread와의 동기화를 쉽게 지원한다. 아래는 id/pwd를 입력받아서 서버통신으로 인증을 진행하는 코드다. 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 private async void btnLogin_Click(object sender, RoutedEventArgs e) { string id = tbEmail....

September 16, 2015 · 1 min · 페이퍼

디지탈오션에 서버 셋팅기 (centos 6.7)

친구랑 개발하는 간단한 쪽지앱의 서버로 사용할 서버를 구축했다. 물론 나는 잘 모른다 모든건 다 구글을 통해.. 1. SWAP 메모리 할당 https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-6 1 2 3 4 5 dd if=/dev/zero of=/swapfile bs=1024 count=2048k mkswap /swapfile swapon /swapfile chown root:root /swapfile chmod 0600 /swapfile 아래 내용을 /etc/fstab 에 붙인다. 1 /swapfile swap swap defaults 0 0 2. 서버 시간을 KST 로 바꿈 & rdate 설치 1 2 ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime yum install rdate 3....

September 15, 2015 · 2 min · 페이퍼

spring batch 사용

최근에 spring-batch를 사용해 봤는데.. 결과는 성공적 특히 트랜잭션commit size와 read size를 따로 지정할 수 있다는게 좋은것 같다. 쿼리나 기타 로직보다 아래 설정이 중요한 듯 하여 아래 설정을 기록으로 남긴다. job에 대해서 요약하면 reader에서 데이타를 읽어서 process 에서 처리 하고 writer로 결과를 기록 한다. 물론 위 설정 외에 각 시작 구간마다 이벤트를 받아 처리 할 수 있는 listener 같은 것도 제공한다. reader, writer는 커스텀 하지 않고 mybatis에서 기본으로 제공하는 걸 이용했다....

August 27, 2015 · 1 min · 페이퍼

jfreeChart에서 한글 폰트 사용 (centos 폰트 설정)

jfreeChart를 사용하는 중인데 tomcat위에서 돌리면 한글이 ㅁㅁㅁ 과 같이 나온다. /usr/share/fonts 폴더에 폰트파일을 넣고 fc-cache -fv 를 해주자!! 1 2 3 4 5 6 7 8 // 코드 상에 아래와 같이 폰트를 지정한다. private static final Font _BASE_FONT = new Font("나눔고딕",Font.PLAIN,11); ... 중략 ''' // setFont를 적절하게 코드 내에 사용한다. lineAndShapeRenderer.setLegendTextFont(i, _BASE_FONT); ... tomcat 재시작은 필요 없다.

July 1, 2015 · 1 min · 페이퍼

OSX 10.10.3 homebrew 설치하기

터미널 열고 1 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 1 2 gimjonghuiui-MacBook-Pro:bin paper$ brew -v Homebrew 0.9.5 출처: http://coolestguidesontheplanet.com/installing-homebrew-os-x-yosemite-10-10-package-manager-unix-apps/

June 4, 2015 · 1 min · 페이퍼

하둡 스프링 연동 테스트2 - hadoop 2.6.x with spring 4.0 (MapReduce WordCount example)

context-hadoop.xml에 아래 내용 추가. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <hdp:configuration id="hdConf"> fs.default.name=hdfs://localhost:9000 </hdp:configuration> <hdp:job id="wordCountJob" input-path="/input/" output-path="/output/" configuration-ref="hdConf" mapper="delim.app.service.WordCount$TokenizerMapper" reducer="delim.app.service.WordCount$IntSumReducer" > </hdp:job> <hdp:job-runner id="wordCountJobRunner" job-ref="wordCountJob" run-at-startup="false"> </hdp:job-runner> WordCount.java 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 40 41 42 43 44 45 46 47 48 49 import org....

April 15, 2015 · 2 min · 페이퍼

하둡 스프링 연동 테스트 - hadoop 2.6.x with spring 4.0

Hadoop 설치 및 설정은 아래와 같이 (osx 요세미티.) https://hadoop.apache.org/releases.html#Download ( 2.6.x 버전 ) 설치는 아래 블로그 보고 함 http://iamhereweare.blogspot.kr/2014/05/hadoop.html pom.xml 에 아래 dependency 추가. 1 2 3 4 5 <dependency> <groupid>org.springframework.data</groupId> <artifactid>spring-data-hadoop</artifactId> <version>2.1.1.RELEASE</version> </dependency> context-hadoop.xml spring 설정에 파일 추가 1 2 3 4 5 6 7 8 9 10 11 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hdp="http://www.springframework.org/schema/hadoop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd"> <hdp:configuration id="hdConf"> fs.default.name=hdfs://localhost:9000 </hdp:configuration> </beans> 아래와 같이 test코드 작성....

April 12, 2015 · 2 min · 페이퍼

아파치에서 403 오류 나올때.

이것저것 했는데 403이 계속 나오면.. 1 chcon -R --reference=/var/www /www/webroot 또는 1 chcon -R -h -t httpd_sys_content_t /www/webroot

March 27, 2015 · 1 min · 페이퍼

spring junit testcase 작성

pom.xml에 아래 추가. 1 2 3 4 5 6 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.0.5.RELEASE</version> <scope>test</scope> </dependency> test java코드 MemberServiceTest.java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration( { "classpath:servlet-context.xml", "classpath:config/context-datasource.xml" } ) public class MemberServiceTest { @Autowired MemberService memberService; @Test public void testSr2002() throws Exception { RequestData req = new RequestData(null, new DbMap()); ResponseData res = new ResponseData(new DbMap()); memberService....

March 24, 2015 · 1 min · 페이퍼