지금 CentOS 컴파일 PHP5 때 가끔 이하의 일부 오류 메시지 만나면 기본적으로 모두 통과할 수 있다 yum 설치 상응하는 라이브러리 해결할게.다음은 구체적인 해결 방법을 좀: checking for BZip2 support… yes checking for BZip2 in default path… not found configure: error: Please reinstall the BZip2 distribution Fix: yum install bzip2-devel checking for cURL support… yes checking if we should use cURL for url streams… no checking for cURL in default path… not found conf..
![[bash]파라미터(인자값) 처리](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbla1IG%2FbtrzgH0omAu%2FZgUHkp3OWqhCzEJEeX1ZR1%2Fimg.jpg)
bash 에서는 shell 을 실행 할때만 인자를 받아들여 처리 할 수 있다. shell 내부에서 첫번째 인자는 $1, 두번째 인자는 $2, 세번째 인자는 $3, 네번째 인자는 $4 ... 으로 쉘 스크립트 내부에서 변수로 받아서 처리가 가능하다. 또한 인자의 개수는 $# 을 이용하여 현재 들어온 인자의 개수가 몇개인지 알 수 있다. 다음은 쉘에서 인자 처리에 대한 예를 보여주는 샘플 이다. ---------------------------------------------------------- #!/bin/sh argc=$# argv0=$0 argv1=$1 argv2=$2 argv3=$3 argv4=$4 fa_argcv() { if [ 0 -eq $argc ] then echo "argc:$argc" ..
![[리눅스]서버 호스트명 추출](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdnYIOE%2FbtrR31lInDe%2FRjxl8aA9Y55IqygwubcGH1%2Fimg.png)
Shell script에서 호스트명을 가져오기 위해 다음과 같이 할 수 있다. HOSTNAME=`hostname -f` # -f : FQDN HOSTNAME_S=`hostname -s` # -s : short echo $HOSTNAME echo $HOSTNAME_S