Skip to main content

Posts

Showing posts from July, 2013

ubuntu server gui in Xenserver

Xenserver상에서 ubuntu server gui 를 구성하기 위해서 일반적인 가이드로 적용되지 않았다. ㅇ Install GUI in Ubuntu Server => xenserver 에서는 안됨 (Webmin가 답일 듯) http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html 1. sudo apt-get update 2. sudo apt-get install ubuntu-desktop or sudo aptitude install --without-recommends ubuntu-desktop or sudo apt-get install xubuntu-desktop (light weight desktop install xfce) 3. sudo apt-get install ttf-unfonts-core (한글 언어 설치) => virtualbox나 vmware에서 적용하는 가이드는 많았으나 xenserver에서는 ㅜ.ㅜ 속편히 webmin 로 돌아섰다. ㅇ webmin 설치 sudo aptitude install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl wget http://prdownloads.sourceforge.net/webadmin/webmin_1.470_all.deb sudo dpkg -i webmin_1.470_all.deb sudo vi /etc/apt/sources.list deb http://download.webmin.com/download/repository sarge contrib 추가 wget http://www.webmin.com/jcameron-key.asc sudo apt-key add jcameron-key.asc sudo apt-get update wge

Redis pub/sub on Spring-Data

Center 에 MDM 으로 부터 Overseas 의 분산 서버로 master data 를 분산 배포하는 구조에 적용하려 함. 1. config <?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:cache="http://www.springframework.org/schema/cache" xmlns:c="http://www.springframework.org/schema/c" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd       http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd"> <bean id="connectionFactory"  class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">  <property name="hostName" value="localhost" />  <property name="port" value="7379" />  <property name="passw

Redis Cache on Spring-Data

1. windows에 redis 설치 ㅇ 다운로드 (windows) https://github.com/MSOpenTech/redis (2.6 download zip) https://github.com/dmajkic/redis/downloads ㅇ 압축 해제 후 배치 C:\Redis \redis-2.4.5-win32-win64\64bit\*.* -> C:\Redis ㅇ 환경 파일 수정 https://raw.github.com/antirez/redis/2.6/redis.conf (2.6 config) daemonize yes bind 127.0.0.1 loglevel notice dir C:\Redis\DB\ logfile C:\Redis\DB\log\redis.log requirepass deweyhong appendonly yes => 기록을 재 로딩 ㅇ 서버 실행 : redis-server redis.conf ㅇ 테스트 redis-cli.exe -h 127.0.0.1 -p 6379 set redis "Hello, Redis!" get redis 2. Spring redis Cache 설정 ㅇ 관련 jar spring-data-redis commons-logging commons-pool jackson-core-asl jackson-mapper-asl jedis org.springframework.beans org.springframework.context org.springframework.core org.springframework.expression spring-tx <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.spri

Transaction AOP 예외 처리

Service class 단위의 트랜잭션 처리는 다음의 설정으로 가능합니다. <!-- Transaction AOP --> <aop:config proxy-target-class="true"> <aop:pointcut id="serviceMethods" expression="execution(* *..*Service.*(..))" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods" /> </aop:config> <!-- Transaction --> 여기서 트랜잭션 예외 처리를 하려면 메소드 명을 다음과 같이 해야 합니다.     <!-- Transaction --> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes>   <tx:method name="retrieve*" read-only="true" />   <tx:method name="get*" read-only="true" />   <tx:method name="print*" read-only="true" />   <tx:method name="start*" propagation="REQUIRES_NEW"/> <tx:method name="finish*" propagation="REQUIRES_NEW"/>

AWS EC2 사용기

AWS에 접한 후 현재까지의 의견은 다음과 같습니다. ㅇ 장점 1. 다양한 서비스의 활용 2. 간단한 설치와 확장 지원 ㅇ 단점 1. 자체 서버 구성에 비쌈. 2. 생각보다 느린 네트워크 비싼 비용은 아래에서 확인할 수 있는데 여러 서비스 중에 가장 싼 스펙의 경우에도 한달에 7만원? 계산이 잘못된 것인지 하여간 이건 아닌 듯.          시간당$ cpu 1일 1달 1달$        1달\ 스몰(기본)   0.088 1 24 31 65.472 72,019 그럼 free tier를 사용한다면 스펙은 비슷한 듯. <t1.micro> 615 MiB ECU 2개 32비트 또는 64비트 플랫폼 <M1 스몰 인스턴스(기본)> 1.7GiB 메모리 ECU(EC2 컴퓨팅 유닛) 1개(ECU 1개를 장착한 가상 코어 1개) 160GB의 로컬 인스턴스 스토리지 32비트 또는 64비트 플랫폼 free tier이 1년간 무상이라는 것은 정말 매혹적이다. - 1년간 사용 무료 - Linux/UNIX 또는 RHEL / Microsoft Windows Server 무료 - 30GB Amazon Elastic Block Storage - database :오라클이 아닌 MySQL, Oracle BYOL 또는 SQL Server Express Edition 실행    20GB의 데이터베이스 스토리지 - Amazon ElastiCache - Amazon Simple Notification Service에 대한 요청 100,000건, HTTP 알림 100,000개 및 이메일 알림 1,000개** - Amazon Simple Queue Service 요청 100,000건** http://aws.amazon.com/ko/free/faqs/ http://aws.a