SSamTure.net

워드프레스

우분투 apt 한국 미러 사이트 접속 안될때

우분투 apt 사용하여 업데이트 및 패키지 설치 등을 할때, 한국 미러 사이트(http://kr.archive.ubuntu.com/)에 접속이 안될 경우가 있다. 접속이 안되는 경우에는 sudo vi /etc/apt/source.list  //해당 파일에서 kr.archive.ubunutu.com 을 ftp.daum.net 으로 변경하면 된다.

MySQL Replication 구축 방법

본 포스트에서 나오는 경로는 우분투 리눅스 기준으로 작성하였습니다. #1. Master Server /etc/mysql/my.cnf 에서 server-id        = 1 log_bin            = /var/log/mysql/mysql-bin.log binlog_do_db        = DB명 #사용 되는 옵션(do: 해당 DB(table)만 | ignore: 해당 DB(table) 제외하고) #binlog-do-db(table) #binlog-ignore-db(table) #replicate-do-db(table) #replicate-ignore-db(table) #여러개의 DB(table)을 입력 시에는 “,”로 구분하는 것이 아니고 하나하나 작성 해야함 #ex) binlog_do_db        = […]

MySQL Replication 구축 시 Slave_IO_State 가 빈값일 때

If you don’t have any error but your replication slave does not work and you get the following information when you “show slave statusG”: Slave_IO_State: Slave_IO_Running: No Step1: check your mysql log file ( mysql log file is in  /var/log/mysqld.log or /var/log/syslog), if you have this error: Got fatal error 1236: ‘Client requested master to […]

How to install and configure Sphinx in Ubuntu 9.10 with MySQL support

Description: “Sphinx is a full-text search engine, distributed under GPL version 2. Commercial license is also available for embedded use. Generally, it’s a standalone search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data […]

Read-only file system error 발생시

서버를 재부팅 한 후 다음의 에러를 발생하며 apache 실행이 안되었고, 파일을 새로 쓰려고 해도 Read-only file system라고 계속 나오더군요. ssamture@testserver:/var/log/apache2# sudo /etc/init.d/apache2 start * Starting web server apache2 (30)Read-only file system: apache2: could not open error log file /var/log/apache2/error.log. Unable to open logs …fail! 다음을 통해 파일 시스템 권한을 확인 해보니 권한이 ro로 되어 있었고, […]

[Ubuntu] NFS error

mount 할 때 다음과 같이 에러메시지가 나오면 mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use ‘-o nolock’ to keep locks local, or start statd. protmapper 재 실행 sudo /etc/init.d/portmap restart

아파치 최대접속자 수 계산

아파치 프로세스당 물리적 메모리 사용량을 확인한다. cat /proc/PID/status 에서 VmHWM의 평균을 확인 하고 (전체 메모리 용량 – 서버 기본 사용 용량) / 아파치 프로세스 메모리 사용량 평균

Ubuntu Apache Tuning

출처 : http://www.mistcat.com/ So I recently needed to do a little quick performance tuning at work on one of our ubuntu server installs.  I’ve been using some of the wisdom found here to refresh myself on the basics, and I wrote a quick little one line awk script to give me the total amount of […]

[iPhone]scrollView position 선택

CGFloat position =  320.0f; [scrollView setContentOffset:CGPointMake(position, 0.0f) animated:YES];

[Android] WebView에 플레이어 연결

Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(url), “video/mp4″); view.getContext().startActivity(intent); return true;

[iPhone]다른 클래스 멤버 접근 예)

FirstViewController *firstView = [appDelegate.tabBarController.viewControllers objectAtIndex:0];

HTML DTD

HTML 2.0 표준 문서 형식 <!DOCTYPE html PUBLIC “-//IETF//DTD HTML 2.0//EN”>  HTML 3.2 표준 문서 형식 <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 Final//EN”>  HTML 4.01 표준 문서 형식[Strict, Transitional, Frameset 순] <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”> XHTML […]

[objective-c]timestamp 관련

NSTimeInterval timeStamp = 1282093277; NSDate* date = [NSDate dateWithTimeIntervalSince1970:timeStamp]; NSLog(@”date=%@”, date); // date=2010-08-18 10:01:17 +0900

[objective-c]형 변환

int -> String int 정수형 = 3; NSString *스트링 = [NSString stringWithFormat:”%d”, 정수형]; String -> int int 정수형 = [스트링 intValue];

[objective-c]공백 제거

string = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];