Linux Kernel Compile

sudo -i         (루트 계정으로 전환한다) cd /usr/src     (반드시 이 디렉토리일 필요는 없지만 관용적으로 많이 쓰인다) wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.3.2.tar.bz2                 (kernel.org에서 원하는 리눅스 커널 소스 코드 다운로드) tar xvfj linux-3.3.2.tar.bz2    (압축 풀기) cd linux-3.3.2 make mrproper           (의존성 제거) make clean    (mrproper와 clean 단계는 특별한 이유가 없는 한  두 번째 컴파일부터 생략 가능하다) make menuconfig make localmodconfig    (현 시스템의 모듈 인식, usb 쓸려면 꼽고 돌려라) 커널을 컴파일 해보자. 컴파일 순서는 다음과 같다. make dep make modules make bzImage make modules_install make dep로 소스 파일과 헤더와의 의존성을 검사해 /usr/src/linux/.depend를 만든다. make modules는 설정에서 module로 선택한 것들을 *.o의 형태로 만들어 준다. make bzImage는 커널 자체를 만들어 준다. make zImage를 하는 경우 커널의 크기가 너무 커서 에러가 날 수도 있다. 이 경우엔 더 많은 부...

Linux Backup

우분투 백업하기 (LINUX BACKUP) TAR 사용 시스템 전체 백업 tar(Tape ARchive)는 소규모 네트워크에서 백업 프로그램으로 가장 일반적으로 사용되는 유틸리티이다. 이 유틸리티는 오래 전부터 여러 가지 용도로 사용되어 왔고, 앞으로도 아마 꽤 오랫동안 남아있을 것이다. 대부분의 사람이 모르고 있지만, tar는 옛날에 사용되던 자기테이프에 파일들을 옮겨 넣기 위해서 만들어진 것으로 HDD백업용으로 설계된 것이 아니다. 그런 이유로 tar는 증분 백업기능이 미약하다. 백업에 제외할 디렉토리를 정한다. 쓸모없는 디렉토리와,   백업파일 자신 을 꼭 제외시켜주어야 한다. 또한 다른 파티션의 하드를 마운트한 /mnt 등의 디렉토리도 제외시켜야 불필요한 용량증가와 시간을 줄일 수 있다. . /media, /dev 등의 디렉토리도 빼주자. /sys, /dev 는 가상적인 디렉토리이다. 백업이 완료된 후 에러 문구를 볼수가 있는데 대부분의 경우 무시해도 된다. 백업 1. 권한획득, 루트로 이동 su cd / 2.전체 시스템을 백업 tar cvpzf backup.tgz.gz --exclude=/proc --exclude=/lost+found --exclude=/media --exclude=/backup.tgz --exclude=/mnt --exclude=/sys / 그러니까 루트 권한으로 바꾸고 나서 최상위 리스트로 올라가서 tar 명령어를 적용하는데 압축 파일이름은 backup.tgz.gz 로 하고 압축시 /proc , /lost+found , /mnt , /sys, /media 는 제외하자는 겁니다. 그런 후에 backup.tgz.gz 파일을 dvd로 굽든 랜으로 다른 컴터로 옮기시든 하시면 됩니다. 옵션 지적한 옵션으로는,   z   (압축; 백업 자료를   gzip   을 이용하여 압축한다),   c   (생성; 새...

Windows Virtual PC HotKey

Press this key To do this CTRL+ALT+Left Arrow Release the mouse from the virtual machine’s (VM) window (required only when the integration features are not installed or are disabled). You can also use this shortcut to release the keyboard and move focus to the toolbar on the VM’s window. CTRL+ALT+END Send the CTRL+ALT+DEL command to a VM. This shortcut is also available while running virtual applications, when the focus is on such an application. Windows logo key +UP Arrow Switch from window mode to full-screen mode. CTRL+ALT+PAUSE BREAK Switch from full-screen mode to window mode. ALT+F4 Close a VM. CTRL+ALT +Plus key Capture a print screen of the VM display output. CTRL+ALT +Minus key Capture a print screen of the window in the VM that has focus. TAB + Right Arrow Move to the Help menu from other menus on the VM toolbar. Before you can use this shortcut, you would need to press CTRL+ALT+Left Arrow to bring the focus on to the VM’s window. TAB + Left arrow Move from ...

Spring PDF Example

  @RequestMapping (value="/pdf" )   public void pdfCreate(HttpServletResponse response, OutputStream outputStream){   Document document = new Document();        try {                   // 파일 출력 -      FileOutputStream file = new FileOutputStream(new File("C:/HelloWorld.pdf"));  // File Write                   PdfWriter.getInstance(document, file);                     // Stream Output           PdfWriter.getInstance(document, outputStream);                     document.open();           //           // Create our first paragraph for the pdf document to be           // created. We also set the alignment and the font ...

Spring Excel Example

@RequestMapping(value = "/excel", method = RequestMethod.GET) public void handleRequestInternal(HttpServletRequest request,                                  HttpServletResponse response,                                  OutputStream outputStream    ) throws Exception { response.setHeader("Content-Disposition", "attachment; filename=file.xls"); //ModelAndView model = new ModelAndView("excel"); // Creating an instance of HSSFWorkbook.         HSSFWorkbook workbook = new HSSFWorkbook();         // Create two sheets in the excel document and name it First Sheet and         // Second Sheet.         HSSFSheet firstSheet  = workbook.createSheet("FIRST SHEET");         HSSFSheet secondShe...

NoSuchMessageException Error Handle

처리방법 해당 리소스를 찾지 못해서 발생되는 메시지로 <beans:bean id="messageSource"                              class="org.springframework.context.support.ReloadableResourceBundleMessageSource">      <beans:property name="basename" value="/WEB-INF/messages/messages" />      <beans:property name="cacheSeconds" value="0" />       <beans:property name="useCodeAsDefaultMessage" value="true"></beans:property> </beans:bean> 붉은 부분을 추가 하여 해당 Message 가 없을때 Default Message 로 출력하도록 한다. message.properties         id.emptyMessage = id code required.    id.sizeError = id code less 4 then 20.          required  email.emptyMessage =  message  <<== 이부분의 메시지가 없을때 나오는 에러메시지로                      ...

Sencha EXTJS Panel Demo

<%@ page language="java" contentType="text/html; charset=UTF-8"                                                                             pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"                                                                   "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>     <title></title>         <!-- ExtJS -->     <link rel="stylesheet" type="text/css" href="ext-4.1/resources/css/clifton-blue.css" />   ...