Posted
Filed under 프로그래밍
우분투에서 datadir을 변경했을때 이런 오류가 날수 있다.

start: Job failed to start

datadir만 변경해서 해결될 문제가 아니다..ㅋㅋㅋ

/home/mysql 로 datadir을 변경할경우의 예이다.
root에서 실행한다.

service mysql stop

rsync -av /var/lib/mysql /home

vi /etc/mysql/my.cnf
datadir = /var/lib/mysql
부분을
datadir = /home/mysql
으로 변경.

vi /etc/apparmor.d/usr.sbin.mysqld
/var/lib/mysql/
/var/lib/mysql/**
부분을
/home/mysql/
/home/mysql/**
으로 변경.

service mysql start
2015/08/18 17:15 2015/08/18 17:15
Posted
Filed under 프로그래밍
mantis에서 비밀번호를 바꿀라면 이메일로 관련내용을 보내는것이 기본세팅이다.
근데 이메일이 갈리가 없지...

그래서 이메일통보가 아니라 비밀번호 없이 로그인해서 즉시 설정이 가능한 상태로
변경이 가능하다.

vi config_defaults_inc.php

$g_send_reset_password  = OFF;

OFF를 ON으로만 변경해주면 된다.

$g_send_reset_password  = ON;

이것도 같이 바꿔주면 한글로 나온다.

$g_default_language             = 'korean';

2015/08/03 17:37 2015/08/03 17:37
Posted
Filed under 회사이야기
이주승 사인 귀엽네~


사용자 삽입 이미지
2015/07/23 15:11 2015/07/23 15:11
Posted
Filed under 프로그래밍
백업은 if 는 장치명 of는 저장할파일명
반대로 하면 복원이다.


이미지 백업
dd if=/dev/mmcblk0 of=/mnt/raspi/rpibackup_20150721.img

이미지 복원
dd if=/mnt/raspi/rpibackup_20150721.img of=/dev/mmcblk0


2015/07/21 12:49 2015/07/21 12:49
Posted
Filed under 프로그래밍
우분투의 경우 apt-get install curlftpfs 로 간단설치

curlftpfs ftp://user:pass@192.168.0.7:21/btsync /mnt/btsync -o allow_other,uid=109,gid=112

uid,gid는 해당 유저와 그룹으로 변경

마운트해제는 fusermount -u /mnt/btsync

아주 간단하다~


2015/07/17 12:23 2015/07/17 12:23
Posted
Filed under 프로그래밍
라즈베리파는 용량이 작다
파이썬으로 되어있는 모니터리툴은 기능은 많은데 파이썬까지 올려야하는 부담이 있다.
본 블로그는 PHP로 돌아가기때문에 PHP로된 모니터링툴을 찾아봤다.

페이지도 심플하고 설치도 그냥 복사만하고 아이디 비번 파일만 생성해주면되니 무쟈게 간단하다.

Raspcontrol - Github


사용자 삽입 이미지
2015/07/14 00:49 2015/07/14 00:49
Posted
Filed under 프로그래밍
어떤건 1일이 일요일이라고 하고 어떤건 0이 일요일이라고 하고 헷갈린다.

우분투 CronHowto

우분투 사이트에 있는 정확한 설명이다.

minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday), command

0부터 일요일이다.

0 = 일요일
1 = 월요일
2 = 화요일
3 = 수요일
4 = 목요일
5 = 금요일
6 = 토요일

헷갈리지 말자


2015/07/08 02:17 2015/07/08 02:17
Posted
Filed under 기타

정은우,공명,정은채,서강준,나라,경수진 출연 시네마틱 게임 "도시를품다 for Kakao"  가 드디어 오픈 했습니다.

안드로이드 다운 받기

공식카페 가기



 
2015/07/08 01:54 2015/07/08 01:54
Posted
Filed under 프로그래밍
MongoDB를 2.x에서 3.0.4로 업그레이드 했다.
(업그레이드 참조 : http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/?_ga=1.222986259.926585648.1423043948)


3.x대의 새로운 스토리지 엔진 WiredTiger를 사용해보려고 한것이 이유라서...

일단 기존데이터 파일은 사용하지 못한다.
꼭 옮겨야 한다면 dump뜨고 데이터파일 지우고 다시 넣어야 한다.

난 과감하게 기존데이터 파일을 삭제했다.

1. service mongod stop
2. vi /etc/mongod.conf
3. engine: wiredTiger 를 추가해준다.
4. service mongod start

start를 했는데 안올라온다면 거의 기존 데이터가 남아있어서일꺼다.

8배가 빨라지고 80% 압축이 어쩌고...
얼마나 좋아졌는지 써보자.



storageEngine {
   "name": "wiredTiger" 
}

wiredTiger {
   "uri": "statistics:",
   "LSM": {
     "sleep for LSM checkpoint throttle": NumberInt(0),
     "sleep for LSM merge throttle": NumberInt(0),
     "rows merged in an LSM tree": NumberInt(0),
     "application work units currently queued": NumberInt(0),
     "merge work units currently queued": NumberInt(0),
     "tree queue hit maximum": NumberInt(0),
     "switch work units currently queued": NumberInt(0),
     "tree maintenance operations scheduled": NumberInt(0),
     "tree maintenance operations discarded": NumberInt(0),
     "tree maintenance operations executed": NumberInt(0) 
  },
   "async": {
     "number of allocation state races": NumberInt(0),
     "number of operation slots viewed for allocation":NumberInt(0),
     "current work queue length": NumberInt(0),
     "number of flush calls": NumberInt(0),
     "number of times operation allocation failed": NumberInt(0),
     "maximum work queue length": NumberInt(0),
     "number of times worker found no work": NumberInt(0),
     "total allocations": NumberInt(0),
     "total compact calls": NumberInt(0),
     "total insert calls": NumberInt(0),
     "total remove calls": NumberInt(0),
     "total search calls": NumberInt(0),
     "total update calls": NumberInt(0) 
  },
   "block-manager": {
     "mapped bytes read": NumberInt(0),
     "bytes read": NumberInt(49152),
     "bytes written": NumberInt(368640),
     "mapped blocks read": NumberInt(0),
     "blocks pre-loaded": NumberInt(0),
     "blocks read": NumberInt(12),
     "blocks written": NumberInt(81) 
  },
   "cache": {
     "tracked dirty bytes in the cache": NumberInt(0),
     "tracked bytes belonging to internal pages in the cache":NumberInt(2827),
     "bytes currently in the cache": NumberInt(38408),
     "tracked bytes belonging to leaf pages in the cache":3221222645,
     "maximum bytes configured": 3221225472,
     "tracked bytes belonging to overflow pages in the cache":NumberInt(0),
     "bytes read into cache": NumberInt(0),
     "bytes written from cache": NumberInt(57112),
     "pages evicted by application threads": NumberInt(0),
     "checkpoint blocked page eviction": NumberInt(0),
     "unmodified pages evicted": NumberInt(0),
     "page split during eviction deepened the tree": NumberInt(0),
     "modified pages evicted": NumberInt(0),
     "pages selected for eviction unable to be evicted":NumberInt(0),
     "pages evicted because they exceeded the in-memory maximum":NumberInt(0),
     "pages evicted because they had chains of deleted items":NumberInt(0),
     "failed eviction of pages that exceeded the in-memory maximum": NumberInt(0),
     "hazard pointer blocked page eviction": NumberInt(0),
     "internal pages evicted": NumberInt(0),
     "maximum page size at eviction": NumberInt(0),
     "eviction server candidate queue empty when topping up":NumberInt(0),
     "eviction server candidate queue not empty when topping up":NumberInt(0),
     "eviction server evicting pages": NumberInt(0),
     "eviction server populating queue, but not evicting pages":NumberInt(0),
     "eviction server unable to reach eviction goal": NumberInt(0),
     "pages split during eviction": NumberInt(0),
     "pages walked for eviction": NumberInt(0),
     "eviction worker thread evicting pages": NumberInt(0),
     "in-memory page splits": NumberInt(0),
     "percentage overhead": NumberInt(8),
     "tracked dirty pages in the cache": NumberInt(0),
     "pages currently held in the cache": NumberInt(22),
     "pages read into cache": NumberInt(0),
     "pages written from cache": NumberInt(46) 
  },
   "connection": {
     "pthread mutex condition wait calls": NumberInt(7483),
     "files currently open": NumberInt(14),
     "memory allocations": NumberInt(9273),
     "memory frees": NumberInt(5106),
     "memory re-allocations": NumberInt(283),
     "total read I/Os": NumberInt(24),
     "pthread mutex shared lock read-lock calls": NumberInt(1013),
     "pthread mutex shared lock write-lock calls": NumberInt(362),
     "total write I/Os": NumberInt(137) 
  },
   "cursor": {
     "cursor create calls": NumberInt(747),
     "cursor insert calls": NumberInt(82),
     "cursor next calls": NumberInt(36),
     "cursor prev calls": NumberInt(28),
     "cursor remove calls": NumberInt(0),
     "cursor reset calls": NumberInt(336),
     "cursor search calls": NumberInt(766),
     "cursor search near calls": NumberInt(109),
     "cursor update calls": NumberInt(0) 
  },
   "data-handle": {
     "connection dhandles swept": NumberInt(0),
     "connection candidate referenced": NumberInt(0),
     "connection sweeps": NumberInt(33),
     "connection time-of-death sets": NumberInt(9),
     "session dhandles swept": NumberInt(0),
     "session sweep attempts": NumberInt(86) 
  },
   "log": {
     "log buffer size increases": NumberInt(0),
     "total log buffer size": NumberInt(1048576),
     "log bytes of payload data": NumberInt(15699),
     "log bytes written": NumberInt(18432),
     "yields waiting for previous log file close": NumberInt(0),
     "total size of compressed records": NumberInt(12585),
     "total in-memory size of compressed records":NumberInt(29812),
     "log records too small to compress": NumberInt(7),
     "log records not compressed": NumberInt(15),
     "log records compressed": NumberInt(15),
     "maximum log file size": NumberInt(104857600),
     "pre-allocated log files prepared": NumberInt(1),
     "number of pre-allocated log files to create": NumberInt(1),
     "pre-allocated log files used": NumberInt(0),
     "log read operations": NumberInt(0),
     "log release advances write LSN": NumberInt(37),
     "records processed by log scan": NumberInt(0),
     "log scan records requiring two reads": NumberInt(0),
     "log scan operations": NumberInt(0),
     "consolidated slot closures": NumberInt(0),
     "logging bytes consolidated": NumberInt(0),
     "consolidated slot joins": NumberInt(0),
     "consolidated slot join races": NumberInt(0),
     "slots selected for switching that were unavailable":NumberInt(0),
     "record size exceeded maximum": NumberInt(0),
     "failed to find a slot large enough for record": NumberInt(0),
     "consolidated slot join transitions": NumberInt(0),
     "log sync operations": NumberInt(14),
     "log sync_dir operations": NumberInt(1),
     "log server thread advances write LSN": NumberInt(0),
     "log write operations": NumberInt(37) 
  },
   "reconciliation": {
     "page reconciliation calls": NumberInt(46),
     "page reconciliation calls for eviction": NumberInt(0),
     "split bytes currently awaiting free": NumberInt(0),
     "split objects currently awaiting free": NumberInt(0) 
  },
   "session": {
     "open cursor count": NumberInt(132),
     "open session count": NumberInt(75) 
  },
   "thread-yield": {
     "page acquire busy blocked": NumberInt(0),
     "page acquire eviction blocked": NumberInt(0),
     "page acquire locked blocked": NumberInt(0),
     "page acquire read blocked": NumberInt(0),
     "page acquire time sleeping (usecs)": NumberInt(0) 
  },
   "transaction": {
     "transaction begins": NumberInt(94),
     "transaction checkpoints": NumberInt(5),
     "transaction checkpoint generation": NumberInt(5),
     "transaction checkpoint currently running": NumberInt(0),
     "transaction checkpoint max time (msecs)": NumberInt(20),
     "transaction checkpoint min time (msecs)": NumberInt(7),
     "transaction checkpoint most recent time (msecs)":NumberInt(7),
     "transaction checkpoint total time (msecs)": NumberInt(70),
     "transactions committed": NumberInt(11),
     "transaction failures due to cache overflow": NumberInt(0),
     "transaction range of IDs currently pinned by a checkpoint":NumberInt(0),
     "transaction range of IDs currently pinned": NumberInt(1),
     "transactions rolled back": NumberInt(82) 
  },
   "concurrentTransactions": {
     "write": {
       "out": NumberInt(0),
       "available": NumberInt(128),
       "totalTickets": NumberInt(128) 
    },
     "read": {
       "out": NumberInt(1),
       "available": NumberInt(127),
       "totalTickets": NumberInt(128) 
    } 
  } 
}
2015/07/01 14:44 2015/07/01 14:44
Posted
Filed under 프로그래밍/PHP
slim framework 이 워낙 간단하기때문에 조금만 생각해보면 다국어 지원도 뭐 아주 간단히 해결가능하다.


http://nesbot.com/2012/6/26/multilingual-site-using-slim

https://fiberonofiber.wordpress.com/2014/02/13/slim-php-multi-language-urls/

2015/06/23 14:26 2015/06/23 14:26