빌링 서비스 및 오픈소스 도구 분석 메뉴얼 - SeungpilPark/uEngine-bill GitHub Wiki

킬빌 설치 과정

시스템 구성

  • OS: Ubuntu 14.04
  • EC2 Instance: 2cpu, 4GB Memory, 8GB Disk

루비 설치

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby

Java 설치

sudo apt-get install openjdk-7-jdk

Mysql 설치

sudo apt-get install mysql-client-5.6 mysql-server-5.6

mysql -uroot

//유저 , 데이터 베이스 생성
CREATE DATABASE killbill CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI;

DROP USER 'killbill'@'localhost';
CREATE USER 'killbill'@'localhost' IDENTIFIED BY 'killbill';

GRANT ALL PRIVILEGES ON *.* TO 'killbill'@'localhost' identified by 'killbill';
FLUSH PRIVILEGES;

//외부접속 허용
sudo vi /etc/mysql/my.cnf

아래 라인을 주석처리
#bind-address           = 127.0.0.1

//외부접속 허용 아이디 생성
INSERT INTO mysql.user (host,USER,password) VALUES ('%','killbill',password('killbill')); GRANT ALL PRIVILEGES ON *.* TO 'killbill'@'%'; FLUSH PRIVILEGES;

//재시작
sudo service mysql restart

Mysql DDL 생성

아래 네가지의 DDL 파일을 mysql 에 생성

KAUI DDL

PAYPAL DDL

Analytics Plugin DDL

KILLBILL DDL

KPM 설치

gem install kpm
mkdir killbill
cd killbill
kpm install

Configration

sudo vi killbill/conf/catalina.properties

# Kill Bill properties
org.killbill.dao.url=jdbc:mysql://localhost:3306/killbill
org.killbill.dao.user=killbill
org.killbill.dao.password=killbill
org.killbill.billing.osgi.dao.url=jdbc:mysql://localhost:3306/killbill
org.killbill.billing.osgi.dao.user=killbill
org.killbill.billing.osgi.dao.password=killbill

# Kaui properties
kaui.db.adapter=jdbcmysql
kaui.db.url=jdbc:mysql://localhost/killbill
kaui.db.username=killbill
kaui.db.password=killbill

org.killbill.server.test.mode=true
org.killbill.notificationq.analytics.tableName=analytics_notifications
org.killbill.notificationq.analytics.historyTableName=analytics_notifications_history

Start Server

sudo bin/startup.sh