운영체제

[리눅스] 기본 명령어 모음

지승준 2014. 1. 13. 14:38

http://1.214.45.90:8080/cmm/main/mainPage.do


Apache

================================================================================

아파치 다운로드

wget http://apache.tt.co.kr/httpd/httpd-2.4.7.tar.gz

wget http://apache.tt.co.kr/apr/apr-1.5.0.tar.gz

wget http://apache.tt.co.kr/apr/apr-util-1.5.3.tar.gz

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz


# cd pcre-8.33

# ./configure --prefix=/usr/local/pcre

# make && make install


# cd apr-1.5.0

# cp -arp libtool libtoolT

# ./configure --prefix=/usr/local/apr

# cp -arp libtool libtoolT

# make & make install


# cd apr-util-1.5.3

# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

# make & make install


# cd httpd-2.4.7

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr \

--with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre \

--enable-mods-shared=all --enable-so --enable-rewrite


# make & make install


아파치 설정

# vi /usr/local/apache/conf/httpd.conf (설정파일)


Listen 80 (웹 기본 포트를 바꾸고 싶으시다면 변경)

User daemon a nobody

Group daemon a nobody 로 변경

DocumentRoot "/usr/local/apache/htdocs" (접속했을 때의 루트 디렉토리)

DirectoryIndex index.html


아파치 실행

# /usr/local/apache/bin/apachectl start //설정을 변경했을 경우 restart 해주면 됨

# /usr/local/apache/bin/apachectl stop

# ps ?ef | grep httpd



JDK

================================================================================

JDK 다운로드

http://www.oracle.com/technetwork/java/javase/downloads/index.html





Tomcat

================================================================================

톰켓 다운로드

http://tomcat.apache.org/download-80.cgi


2-1.톰켓 실행

# cd bin

# catalina.sh start

# catalina.sh stop



TEST

================================================================================

이클립스 → run → 메이븐 인스톨 → 완료

workspace → [프로젝트명] → target → [파일명].war 파일을 아파치 → htdocs 폴더로 복사





리눅스 기본 명령어

================================================================================

압축풀기

# tar -xzvf [파일명]


PATH설정

# vi ~/.bash_profile


PATH 변경사항 적용

# source ~/.bash_profile  


PATH설정2

#PATH=$PATH:/tmp

echo $?


프로세스 확인

# ps 

# ps ef (PID 자식, PPID 부모)


프로세스 종료

# kill -9 (PID 번호)


hosts 파일 설정

# vi /etc/hosts


시작프로그램 설정

# vi /etc/rc.d/rc.local


서비스 확인

# chkconfig --list


현재 디렉토리 확인

# pwd


파일 편집

# vi [파일명] (i 편집 / esc 편집나오기 / :w 저장 / :q 나오기)


심볼릭 링크 생성

# ln -s [기존폴더명] [링크명]