1. pstree 명령어를 찾을 수 없을 때

명령 : yum -y install psmisc

2. ifconfig 명령어를 찾을 수 없을 때

명령 : yum -y install net-tools

3. autoconf 명령을 찾을 수 없을 때 (pecl 또는 phpize 명령 실행시 autoconf 는 필수 설치 항목이다.)

[에러 메시지]
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

해결 : yum -y install autoconf

4. scp 명령어를 찾을수 없을 때

해결 : yum -y install openssh-clients (설치되면 scp, sftp등이 설치된다.)

5. nslookup 명령어를 찾을 수 없을 때 (CentOS7 에서)

해결 : yum -y install bind-utils

6. wget 명령어를 찾을 수 없을 때

해결 : yum -y install wget

7. lspci 명령어를 찾을 수 없을 때

해결 : yum -y install pciutils

8. ntsysv 명령어를 찾을 수 없을 때

해결 : yum -y install ntsysv

9. smartctl 명령어를 찾을 수 없을 때

해결 : yum -y install smartmontools

10. hdparm 명령어를 찾을 수 없을 때

해결 : yum -y install hdparm

11. rdate 명령어를 찾을 수 없을 때

해결 : yum -y install rdate


최소 설치 리눅스에서는 setup, ntsysv 와 같은 명령어가 미포함 되어 있으므로 아래 명령어로 패키지를 설치해 준다.

yum install setuptool

yum install system-config-network-tui

yum install ntsysv

[출처] http://jumals.tistory.com/06


* Test Environment

 

CentOS 5.x 32bit

 

Red : 강조

Blue : 명령어 & 메뉴이동

Green : 주석

Pink : 변수

Purple : 예시

Orange : 출력&편집&소스

 

* Incident

 

svn 설치과정 중 apxs 파일관련 오류가 발생하여 해당 파일을 실행하였더니 아래와 같이 오류가 발생하였다.

[root@mooon]# /usr/local/apache_svn/bin/apxs -h

/usr/local/apache_svn/bin/apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory 

 

 

 

* Resolution

위 오류가 발생한 이유는 시스템상에 perl 이 없는 상태에서 소스설치를 진행하여 apxs 파일이 perl을 찾지 못해 발생하는 오류이다.

perl을 설치하고 apxs 파일을 수정하면 해결 된다.

[root@mooon]# yum install perl

[root@mooon]# vi /usr/local/apache_svn/bin/apxs

#!/replace/with/path/to/perl/interpreter -w // 삭제 

#!/usr/bin/perl -w // 추가 

 

 

 * Reference 

 

http://wnstjqdl.tistory.com/23 



서버를 이전 또는 동일한 옵션의 APM 을 다른 서버에 설치하게 될 경우 기존 APM 옵션을 알아야 하는데

따로 적어두지 않았을 경우에는 곤란함이 있다.


[14.48.175.179 서버 기준]


1.apache 소스 컴파일 옵션 확인

cat /usr/local/apache/build/config.nice

#! /bin/sh
#
# Created by configure

"./configure" \
"--prefix=/usr/local/httpd-2.2.27" \
"--sysconfdir=/etc/httpd/conf" \
"--enable-modules=most" \
"--enable-mods-shared=most" \
"--enable-ssl" \
"--enable-rewrite" \
"--enable-so" \
"$@"


2. php 소스 컴파일 옵션 확인

/usr/local/php/bin/php-config | grep configure

 --configure-options [--prefix=/usr/local/php-5.3.28 --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/etc/httpd/conf --with-iconv --with-mcrypt=/usr --with-ncurses=/usr --with-gdbm=/usr --with-zlib=/usr --with-openssl --with-kerberos=/usr --with-imap-ssl=/usr --with-gd=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --with-pic --with-curl --with-dbm --disable-libtool-lock --disable-short-tags --disable-debug --disable-ipv6 --enable-inline-optimization --enable-zend-multibyte --enable-fast-install --enable-safe-mode --enable-magic-quotes --enable-calendar --enable-ftp --enable-sockets --enable-gd-native-ttf --enable-gd-jis-conv --enable-dba=shared --enable-exif --enable-zip --enable-mbstring --enable-dbase --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-bcmath --enable-shmop --enable-xml --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libdir=lib64]

3. mysql 소스 컴파일 옵션 확인

grep -i configure_line /usr/local/mysql/bin/mysqlbug

CONFIGURE_LINE="./configure  '--prefix=/usr/local/mysql-5.0.96' '--with-mysqld-user=mysql' '--localstatedir=/mysql/data' '--with-charset=utf8' '--with-extra-charsets=all' '--with-pthreads' '--enable-thread-safe-client' '--enable-named-pipe' '--enable-shared' '--with-openssl' '--with-big-tables' '--with-readline' '--without-debug' '--without-docs' '--without-bench'"
`test -n "$CONFIGURE_LINE"  && echo "Configure command: $CONFIGURE_LINE"`


[출처] http://jelbin.tistory.com/63


방법 1 : chpasswd ( CentOS, Ubuntu 에서 가능 )

명령 : echo '아이디:패스워드' | chpasswd


방법 2 : passwd ( CentOS는 가능. Ubuntu는 불가 )

명령 : echo '패스워드' | passwd --stdin 아이디

※ 요약

리눅스 명령어 lastb는 접속 실패 기록을 보여주는 명령어다. last 명령어가 로그인 기록과 재부팅 기록을 보기 위해 /var/log/wtmp 파일을 열람한다면, lastb는 /var/log/btmp 파일을 열람하여 실패 목록을 보여준다. lastb는 접속 실패를 기록하는 파일인 btmp 파일을 열람한다는 것을 제외하고는 last 명령어와 같다.

※ 경로

/usr/bin/lastb

※ 사용법

lastb [옵션]... [유저명]... [tty]...


※ 옵션

 옵션

 설명

 -num

 num 만큼의 줄만 출력

 -n num

 -num과 동일

 -R

 hostname필드는 출력 안 함

 -a

 출력되는 목록에서 hostname 필드는 마지막에 출력

 -d

 다른 host에서 접속한 내용만 출력

 -x

 shutdown 상태 및 runlevel이 바뀐 상태 출력

 -f file

 지정한 file에서 정보를 읽어와서 출력


[출처] http://shaeod.tistory.com/729

'Works > CentOS & RockyLinux' 카테고리의 다른 글

CentOS setup ntsysv 설치  (0) 2017.03.21
시스템 패스워드 한줄로 변경하기  (0) 2017.02.14
CentOS 다운로드 미러 사이트  (0) 2017.01.03
CentOS7 hostname 설정  (0) 2016.10.31
tmpwatch  (0) 2016.10.19

'Works > CentOS & RockyLinux' 카테고리의 다른 글

시스템 패스워드 한줄로 변경하기  (0) 2017.02.14
lastb - 로그인 실패 로그 확인  (0) 2017.02.14
CentOS7 hostname 설정  (0) 2016.10.31
tmpwatch  (0) 2016.10.19
du 명령어의 활용  (0) 2016.09.02


httpd-2.4.3 버전과  php-5.2.14 버전을 설치하였다.

php 5.2 설치 후에 apache를 start 하게 되면 다음과 같은 메시지가 나오면서 apache가 정상적으로 작동을 하지 않았다.

httpd: Syntax error on line 146 of /usr/local/apache/conf/httpd.conf: Cannot load modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: undefined symbol: unixd_config

아파치의 버전업으로 인해서 해당 심볼의 명칭이 바뀌었다. unixd_config -> ap_unixd_config로 변경

src/php-5.2.14/sapi/apache2handler/php_functions.c

안에서 unixd_config -> ap_unixd_config 로 변경하면 된다. 총 2군데 4번 변경하면 된다.

그리고 나서 다시 컴파일을 하게 되면 문제 없이 실행이 된다.

[출처] http://sclow.tistory.com/entry/apache-24-php-52-설치시-libphp5so-undefined-symbol-unixdconfig-오류


윈도우 서버 2008 R2에서 원격 데스크톱으로 2명이 동시에 접속할 수 있도록 설정하는 방법입니다.

시작 - 관리 도구 - 원격 데스크톱 서비스 - 원격 데스크톱 세션 호스트 구성
사용자당 세션을 하나로 제한 => 더블 클릭
사용자당 세션을 하나로 제한 => 체크 풀기

변경 후 로그오프 한번 해주세요.




위 내용을 마우스가 아닌 레지스트리로 하시려면 아래 파일을 병합해주세요. 제가 레지샷으로 변화분 비교해보고 만든 레지입니다.

SessionUnlimit.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"TSServerDrainMode"=dword:00000000
"UserSessionLimit"=dword:00000000
"fSingleSessionPerUser"=dword:00000000

[출처] http://snoopybox.co.kr/1512

 


php 소스 컴파일시 아래와 같은 오류가 발생하는 경우가 있다. 

gcc 4.7 버전에서 아래와 같은 오류가 발생한다. 

/home/segio_php/php-5.2.17/ext/dom/node.c: In function ‘dom_canonicalization’:
/home/segio_php/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type
/home/segio_php/php-5.2.17/ext/dom/node.c:1955:5: error: dereferencing pointer to incomplete type



이때는 아래와 같은 순서로 php 소스를 패치하면 오류가 사라진다. 

[root@localhost] wget -O php.patch  https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt
[root@localhost] cd php-5.2.17
[root@localhost] patch -p0 -b < php.patch
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).

patch 명령어를 찾을 수 없다고 할 경우 yum -y install patch

위와 같이 패치를 적용한 후 컴파일을 하면 문제없이 진행된다. 

 

[출처] http://blog.naver.com/ssik425/10175143994