나의 마음을 ctrl+c,너의 가슴에 ctrl+v

linux 심볼릭 생성 

ln -s 심볼릭원본링크 생성링크


(참고) 심볼링링크는 윈도우의 바로가기(.lnk) 의 개념
(참고) 하드링크(Hard Link) : 원본파일과 동일한 내용의 다른파일. ( ln 하드원본링크 생성링크)
 - 삭제하더라도 나머지는 존재. 
 - 원본이 변경될 경우, 링크파일 자동으로 변경


linux 점검명령어

# 서버명확인

$ hostname


# OS버전

$ cat /etc/issue.net

$ cat /etc/redhat-release


# kernel

$ uname -r

$ cat /proc/version


# cpu

$ cat /proc/cpuinfo

$ top


# memory

$ free -m

$ cat /proc/meminfo


# swap 

$ free -m

$ cat /proc/swaps

$ df -m (free size check)


# F/S : 

$ df -h


# log 

$ tail -f 경로


# process search

ps -ef | grep keyword


# process kill

kill -9 processid



'itsm' 카테고리의 다른 글

[CI] 젠킨스 및 mavn 설치  (0) 2016.03.31
[ITSM] 리눅스 포트개방  (0) 2016.01.04
[ITSM] UNIX 명령어 (검색,치환,압축,find,jar)  (0) 2012.12.06
[CI] SVN 백업 및 복원 (이관)  (0) 2012.11.30

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

확인

[CodeInteger] htaccess

oss2015. 10. 13. 19:30

.htaccess
CodeInteger 의 하부속성이 아닌, Apache URI 정책


RewriteEngine On
mod_rewriting 을 활성화하여 localhost/layout/a/b/c 와 같은 주소가 가능

RewriteRule ^([^\.]+)$ ./index.php?params=$1 [L]
URL에 어떤 파라미터나 주소가 입력되어도 이를 index.php에 url 파라미터의 값으로 대입하여 링크를 만들고 이 주소로 이동처리가 가능.

Example) http://localhost/layout/abc -> http://localhost/?index.php?params=layout/a/123

* 설정시 참조
^([^\.]+)$ : 주소 끝에 입력되는 모든 문자열을 받아낸다. 이 문자열들은 뒤의 $1로 캐치한다.
L flag : rewrite rule이 끝남을 표시


 Sample


# 404 error document

ErrorDocument 404 /errdoc/error_404

RewriteEngine on

# data/index.php 페이지 변경
RewriteRule ^data\/index\.php$ /main/blank [R=301]

# 도메인에서 www 제거
# RewriteCond %{REQUEST_URI} ^/admin/(.*)$
# RewriteCond %{REQUEST_URI} ^/selleradmin/(.*)$
# RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
# RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# CI 리다이렉트 - 아래 폴더는 바로 접근됨
RewriteCond $1 !^(index\.php|images|robots\.txt|crossdomain\.xml|sitemap\.xml)
RewriteCond %{REQUEST_URI} !^/app/javascript/(.*)$
RewriteCond %{REQUEST_URI} !^/phpThumb/(.*)$
RewriteCond %{REQUEST_URI} !^/data/(.*)$
RewriteCond %{REQUEST_URI} !^/admin/skin/(.*)$
RewriteCond %{REQUEST_URI} !^/selleradmin/skin/(.*)$
RewriteCond %{REQUEST_URI} !^/board_original/(.*)$
RewriteCond %{REQUEST_URI} !^/pg/(.*)$
RewriteRule ^((.*))$ index.php?/$1 [L]