2015년 1월 23일 금요일

create database with mysql

mysql -uroot -p

create database igen;

quit

2015년 1월 22일 목요일

console commands with linux

psql -h host -p 5432 -U username database

/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first

yum install postgresql-server

[root@localhost kamailio-4.2.2]# /etc/init.d/postgresql start

/var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.
                                                           [FAILED]
[root@localhost kamailio-4.2.2]# service postgresql initdb
Initializing database:                                     [  OK  ]
[root@localhost kamailio-4.2.2]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [  OK  ]
[root@localhost kamailio-4.2.2]#

2015년 1월 15일 목요일

backup & restore with postgresql

1. Backup: $ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}
2. Restore: $ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql}

Screen Capture with Mac

shift + command + 4 : selection area capture
shift + command + 3 : full area capture

2015년 1월 8일 목요일

agile plugin install for redmine

1. http://redminecrm.com/projects/agile/pages/last 에서 light 버전 다운로드
2. 다운로드 한 파일을 압축 해제 하여 redmine 서버의 /var/lib/redmine/plugins 폴더에 복사
3. plugin 설치 명령 수행
bundle install
bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
4. /etc/init.d/httpd restart
5. 신규 프로젝트 생성 시, agile 모듈을 선택
6. 생성한 프로젝트의 일감을 생성하면 agile 탭에서 이동 할 수 있음

backup for redmine

redmine version : 2.4.3.stable
mysql version : 5.2.73


redmine db backup
1. mysqldump -u root -ppassword redmine | gzip > /var/tmp/20150108_redmine_db_backup.gz

redmine files backup
1. rsync -a /var/lib/redmine/files /var/tmp/files
2. cd /var/tmp/files
3. tar -czvf 20150108_redmin_file_backup.tar.gz files