linux 하드웨어 사양을 알아보는 명령어 CPU 정보[root@shuiky webapps]# cat /proc/cpuinfo | more processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz stepping : 7 cpu MHz : 1600.000 cache size : 8192 KB . . 중략 . . 메모리 정보[root@shuikywebapps]# cat /proc/meminfo MemTotal: 8034300 kB MemFree: 1418372 kB Buffers: 56192 kB Cached: 3887776 kB SwapCached: 5..
백업 전체 db를 백업한다 shell> mysqldump -u root -p --all-databases > dump.sql wordpress db를 백업한다 shell> mysqldump -u root -p wordpress > dump.sql db1, db2, db3을 백업한다 shell> mysqldump -u root -p --databases db1 db2 db3 > dump.sql test db에 있는 t1, t3, t7 테이블을 백업한다 shell> mysqldump -u root -p test t1 t3 t7> dump.sql 복원 전체 db를 복원한다 shell> mysql -u root -p source dump.sql wordpress db를 복원..
문제[root@scwas wordpress]# sftp suser@해당 서버 IP Connecting to 해당 서버 IP... suser@해당 서버 IP's password: Permission denied, please try again. suser@해당 서버 IP's password: subsystem request failed on channel 0 Couldn't read packet: Connection reset by peer 원인 설정이 변경되어 있음 해결[root@socool ssh]# vi sshd_config 아래 내용 추가함. subsystem sftp /usr/libexec/openssh/sftp-server [root@socool ssh]# service sshd restart
문제 sftp 사용 중 다음과 같은 오류가 발생했습니다. [root@scwas wordpress]# sftp suser@해당 IP Connecting to 해당 IP... command-line: line 0: Bad configuration option: PermitLocalCommand Couldn't read packet: Connection reset by peer 원인 openssh-clients 등 관련 모듈이 설치가 되어있지 않았음 해결[root@scwas wordpress]# yum install openssh-clients Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.yongb..
세션당 최대 오픈 커서 수 초과 오류 설정된 커서 개수 확인show parameter _cursors NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ open_cursors integer 300 session_cached_cursors integer 20 현재 열린 커서와 설정된 최대 오픈 커서 수 확인SELECT MAX(a.value) AS highest_open_cur, p.value AS max_open_cur FROM v$sesstat a, v$statname b, v$parameter p WHERE a.statistic# = b.statistic# AND b.name = '..
Oracle에서 대량 데이터를 Database에 입력하기 위해 SQL*Loader를 사용한다. SQL*Loader가 이해할 수 있는 Control 파일과 실제 데이터가 들어있는 Data 파일을 작성한다. Control 파일에는 데이터가 어디에 있는지, 어떻게 분석하고 해석할지 그리고 어디에 데이터를 넣야되는지 SQL*Loader에서 알려주는 역할을 한다. Control 파일 생성 user.ctlload data characterset UTF8 infile 'user.dat' "str '||\n'" badfile 'user.bad' discardfile 'user.dsc' append into table USER fields terminated by ',' trailing nullcols ( user_id..
shell-init: error retrieving current directory: getcwd: cannot access parent directories 현상 : 현재 존재하지 않은 디렉토리에서 httpd restart 시에 발생 해결 : 다른 디렉토리로 이동 후 명령어 실행 Symbolic link not allowed or link target not accessible 현상 : 해당 URL 접속이 안됨 해결 : 다음과 같이 수정 수정 전 AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec 수정 후 AllowOverride FileInfo AuthConfig Lim..
톰캣 사용 중 out of memory 오류가 발생했습니다. 기존 서블릿 컨테이너에 jenkins를 추가했더니 발생해서 구글링.... 클래스가 로딩되면 Perm 공간에 저장되는데 deploy된 어플리케이션이 한번에 Perm 공간에 저장되지 않습니다. jsp같은 경우엔 호출될 때 저장되기 때문에 일정시간이 지난 후에 오류가 발생하는 경우도 있다고 합니다. MaxPermSize 옵션을 주지 않을 때 기본 메모리는 64M 입니다. 해결 메모리는 현재 상황에 맞추고 다음과 같이 설정한다. 1. catalina.sh에 설정 JAVA_OPTS="-XX:MaxPermSize=256m" 2. /etc/profile에 설정 export JAVA_OPTS="-XX:MaxPermSize=256m" 출처 http://www...
oracle lock 확인 중 검색된 정보 입니다. 출처 http://blog.naver.com/motbombe/90028439497 락걸린 테이블 확인SELECT do.object_name, do.owner, do.object_type, do.owner , vo.xidusn, vo.session_id, vo.locked_mode FROM v$locked_object vo , dba_objects do WHERE vo.object_id = do.object_id ; 해당 테이블이 락에 걸렸는지 확인SELECT a.sid, a.serial#, b.type, c.object_name FROM v$session a, v$lock b, dba_objects c WHERE a.sid=b.sid AND b.id1=..
Tomcat Web Application Manager 사용 중 다음과 같은 오류가 발생했습니다. The web application [] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 원인 등록된 JDBC Driver가 미등록 상태로 변경하던 중 실패가 되서 memory leak이 발생함. 강제적으로 미등록 상태로 만들어야 한다고 함. 해결 웹 어플리케이션 WEB-INF/lib에 jdbc 라이브러리를 tom..
메일서버를 구성하기 위해 qmail을 설치했습니다. knetqmail-1.0.6-20110908 설치 파일 http://qmail.kldp.net/phpbb/viewtopic.php?f=4&t=8299 knetqmail-1.0.6 설치 매뉴얼 http://qmail.kldp.net/phpbb/viewtopic.php?f=3&t=8229 svscan이 꼭 실행되어 있어야 함 설치법 http://www.kluner.net/2011/04/04/daemontools-on-redhat-enterprise-6-0/ [root@localhost]# cd /var/tmp [root@localhost]# wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz [root@lo..
Tcpdump는 패킷의 헤더를 출력하는 명령어입니다. 예제 1. 패킷의 출발지가 111.111.111.111인 경우 [root@shuiky ~]# tcpdump src host 111.111.111.111 2. 패킷의 목적지가 111.111.111.111인 경우 [root@shuiky ~]# tcpdump dst host 111.111.111.111 3. 패킷의 목적지가 111.111.111.111 이고 port가 80 인 경우 [root@shuiky ~]# tcpdump dst host 111.111.111.111 and dst port 80 4. 패킷의 목적지가 111.111.111.111 또는 222.222.222.222 인 경우 [root@shuiky ~]# tcpdump dst host 111...
MongoDB란? C++ 언어로 개발된 open source, high-performance, schema-free, document-oriented database 이다. Mongo란 명칭은 humongous에서 가져왔다. 복잡한 계층과 쉬운 쿼리, 인덱스를 사용할 수 있는 BSON(Binary JSON) documents의 collections으로 관리된다. 데이터 타입이나 구조도 어플리케이션에 맞게 자유로운 방식으로 저장하면 된다. 10gen에 의해 2007년 10월에 개발이 시작됐고, 2009년 2월에 공식적으로 발표됐다. 1. 우선 아래 사이트에서 platform과 버전을 선택하여 MongDB 설치파일을 다운로드 합니다. http://www.mongodb.org/downloads 2. 적당한 디..
Chapter 4 | Advanced Shell Scripting Commands 다음과 같은 고급 쉘 스크립 및 명령어를 배워보자 1. Functions 2. User Interface 3. Conditional execution 4. File Descriptors 5. traps 6. Multiple command line args handling etc /dev/null - 프로그램 출력을 원하지않을 때 사용 구문 command > /dev/null 예제 $ ls > /dev/null 지역 그리고 전역 쉘 변수 (export command) 지역변수 예제 $ vech=Bus $ echo $vech Bus $ /bin/bash //메모리에 두번째 쉘을 로딩.... 이전 쉘의 변수들은 모두 무시됨. $..
IANA is responsible for assigning port numbers to specific uses. The well-known ports are those in the range 0-1023. On Unix-derived operating systems, opening a port in this range to receive incoming connections requires root privileges. Registered port numbers are those in the range 1024-49151. Port numbers in the range 49152-65535 are private or dynamic ports, not used by any defined applicat..
Chapter 3 | Shell Structured Language Constructs ※ 리눅스 쉘 값 Zero Value(0) 는 Yes/True NON-ZERO Value 는 No/False $ cat foo $ echo $? foo 파일이 있는 경우 zero(0)가 반환된다. $ cat > showfile #!/bin/sh # #Script to print file # if cat $1 then echo -e "\n\nFile $1, found and successfully echoed" fi $ chmod 755 showfile $ ./showfile foo 다음 스크립트는 숫자가 양수인지 알아낸다. $ cat > ispositive #!/bin/sh # # Script to see whethe..
Chapter 2 : Getting Started with Shell Programming 쉘 프로그래밍을 소개하고 스크립트를 어떻게 작성하는지 그리고 실행하는지를 소개합니다. 쉘 스크립트를 어떻게 작성하는가? 쉘 스크립트 작성법은 다음과 같다. 1. vi 또는 mcedit 같은 에디터를 사용한다. 2. 쉘 스크립트 작성 후에 스크립트 파일에 실행 권한을 설정한다. chomod permission your-script-name $ chmod +x your-script-name $ chmod 755 your-script-name 3. 스크립트를 실행한다. bash your-script-name sh your-script-name ./your-script-name $ bash bar $ sh bar $ ./..
Chapter 1 : Quick Introduction to Linux 리눅스는 무엇인가? Free a. 리눅스는 무료다 b. 리눅스를 사용할 때 MS Windows 나 유닉스의 상용버전과 같이 돈을 낼 필요가 없다 c. 리눅스 소스코드를 맘대로 수정할 수 있다 d. 많은 무료 소프트웨어 어플리케이션들, 개발언어들 그리고 개발툴 등을 지원한다. Unix Like a. 유닉스는 거의 35년 이상된 OS이다. b. 1964년에 MIT & General Electric의 벨 연구소에 의핸 MULTICS(Multiplexed Information and Computing System)라 불리는 OS가 개발되었다. 그러나 이 OS는 성공한 OS는 아니었다. 그때 벨 연구소의 시스템 프로그래머인 Ken Thomps..
설치단계 1. Erlang 설치 2. RabbitMQ server 설치 3. 환경 설정(옵션) 4. plugin directory에 plugin 추가(옵션) 5. 서비스 시작 1. Erlang 설치 ※clustered된 node들은 모두 같은 Erlang 버전을 사용해야함. windows 사용자 http://www.erlang.org/downloads.html RedHat Enterprise Linux(RHEL) wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo. yum install erlang Centos6에서 오류... release version 6가 안나..
설치 전 요구사항 하드웨어 - 33MB의 여유공간(바이너리) - 200MB의 여유공간(소스) 운영체제 - windows : Windows XP SP2, windows 2000, Windows Vista, Windows 7 - Unix : Ubuntu Linux, Powerdog Linux, MacOS, AIX, HP-UX, Solaris 또는 JAVA를 지원하는 Unix 플랫폼 환경 - 배포를 위해 Java Developer Kit(JDK) 1.4.x 이상 그리고 compiling/building을 위한 1.5.x (Java 5) - JAVA_HOME 환경 변수 셋팅 - Maven 1.0.2 또는 그 이상(소스) 1. ActiveMQ 파일 다운로드 wget http://www.apache.org/dyn/..