반응형


echo -en "\033[1;45m" > /etc/motd
echo -e '\n' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -e '| This server has below service(s) |' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd
echo -en "\033[1;42m" >> /etc/motd
echo -e '1. project.domain.com (redmine)' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd


echo -en "\033[1;45m" > /etc/motd
echo -e '\n' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -e '| This server has below service(s) |' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd
echo -en "\033[1;42m" >> /etc/motd
echo -e '1. www.domain.com (php5)' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd


echo -en "\033[1;45m" > /etc/motd
echo -e '\n' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -e '| This server has below service(s) |' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd
echo -en "\033[1;42m" >> /etc/motd
echo -e '1. ap.domain.com (php5)' >> /etc/motd
echo -e '2. www.domain.com (php5)' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd


**for live**

echo -en "\033[1;36m" > /etc/motd
echo -e '\n' >> /etc/motd
echo -e '## LIVE SERVER ##' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -en "\033[1;45m" >> /etc/motd
echo -e '\n' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -e '| This server has below service(s) |' >> /etc/motd
echo -e '+----------------------------------+' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd
echo -en "\033[1;42m" >> /etc/motd
echo -e '1. member.domain.com (php5)' >> /etc/motd
echo -e '2. static.domain.com (php5)' >> /etc/motd
echo -en "\033[0m" >> /etc/motd
echo -e '\n' >> /etc/motd

반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

selinux 끄기  (0) 2019.07.15
Apache AH00035 오류, Tomcat SSL Permission Denied  (0) 2019.07.15
Jenkins 다른 계정으로 구동  (0) 2019.07.15
GCC .so만들기  (0) 2010.10.21
PHP 확장모듈 만들기  (0) 2010.10.21
반응형

How to run Jenkins under a different user in Linux [Redhat]
When I wanted to change the Jenkins user I first checked /etc/init.d/jenkins script.  There I found two important variables $JENKINS_CONFIG(=/etc/sysconfig/jenkins) and $JENKINS_USER. So if you want, you can change the JENKINS_USER variable in the /etc/init.d/jenkins file; but it is not the correct way to do.

To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default) and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the user in the /etc/passwd file ).
**$JENKINS_USER="manula"**
Then change the ownership of the Jenkins home, Jenkins webroot and logs.
**chown -R manula:manula /var/lib/jenkins 
chown -R manula:manula /var/cache/jenkins
chown -R manula:manula /var/log/jenkins**
Then restarted the Jenkins jenkins and check the user has changed using a ps command 
/etc/init.d/jenkins restart
ps -ef | grep jenkins

반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

Apache AH00035 오류, Tomcat SSL Permission Denied  (0) 2019.07.15
Linux Shell MOTD(로그인 후 배너)  (0) 2019.07.15
GCC .so만들기  (0) 2010.10.21
PHP 확장모듈 만들기  (0) 2010.10.21
shell scripting - date 사용하기  (0) 2010.10.21
반응형

date 쓰기

#!/bin/bash
# 'date' 명령어 연습

echo "올해가 시작한 뒤로 지금까지 `date +%j` 일이 지났습니다."
# 날짜를 형식화 하려면 포매터 앞에 '+'를 써야 됩니다.
# %j 는 오늘이 연중 몇 번째 날인가를 알려줍니다.

echo "1970/01/01 이후로 지금까지 `date +%s` 초가 지났습니다."
#  %s 는 "UNIX 에폭(epoch)"이 시작한 뒤로 현재까지 몇 초가 지났는지를 알려줍니다.
#+ 이걸 도대체 어디다 써 먹죠?

prefix=temp
suffix=`eval date +%s`  # 'date'의 "+%s" 옵션은 GNU 전용 옵션입니다.
filename=$prefix$suffix
echo $filename
#  "유일한" 임시 파일 이름으로 $$ 를 쓰는 것 보다 더 훌륭합니다.

# 더 많은 형식화 옵션을 보려면 'date' 맨 페이지를 읽어 보세요.

exit 0




---------------
참고 '=' 앞뒤로 띄어쓰기 안됨.

http://kr.blog.yahoo.com/sdsduck/87.html
http://wiki.kldp.org/HOWTO//html/Adv-Bash-Scr-HOWTO/timedate.html

반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

GCC .so만들기  (0) 2010.10.21
PHP 확장모듈 만들기  (0) 2010.10.21
AVR-GCC 설치법...  (0) 2010.10.21
Solaris 에서의 pkgadd 사용 예  (0) 2010.10.21
MySQL 리플리케이션 로그 핸들링  (0) 2010.10.20
반응형

아주오래전

jin's lab에 남긴거네요 ~_~
잊혀질까봐 무서워서 빼옵니다..

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

자!!! 이제 AVR-GCC를 설치 해봅시다!!! (두둥)

처음에 인터버드 홈페이지에 AVR-GCC설치법을 보고 시작했습니다..
글이 순서가 약간 이상해서 혼자 어젯 밤 상당히 삽질을 했드랩니다..
결국은 성공을 했지만....

물론 윈도우에선 AVR-EDIT라는 강력한 툴이 있긴 하지만..
저같은 사용자는 때로는 리눅스 켜놓고 남에게 방해 받지 않고 코딩을 할 수 있어서 좋습니다...(이상하게 리눅 켜놓고 있으면 아무도 터치를 안하는 분위기가 +_ +)

자~ 이제 본격적으로 설치법을 기술 하기 전에 준비물~~~
1. OS Linux 여야겠죠?
(저는 GNU/Linux Debian Linux사용자라 데비안 3.0 우디 배포본에 필요한 개발 헤더라던지 패키지들을 설치 해서 사용합니다.)

2. 기본적인 개발툴들이 설치 되어있어야 합니다....gcc나 Glibc등등..
(Redhat 사용자께서는 gcc버전이 낮으네 어쩌네 하면 http://rpmfind.net에서 의존성 있는 패키지들 검색하셔서 설치해 주세요...
Debian 사용자라면 apt-get upgrade update한방이면 왠간한건 다 되겠죠?)

3. 땜질과 마찬가지로 리눅스 프로그램 소스컴파일도 상당한 인내와 고뇌 그리고 삽질이 필요합니다(물론 고수분들 제외). Jin님의 말씀을 빌리자면 집에 놔두고 온 떡 생각하면 안되옵나이다 (_ _

[[ 설치에 앞서 필요한 패키지들 ]]
tar, gzip, gunzip : 이건 배포본에 대부분 깔려 있습니다. 파일 묶음/압축 유틸
gcc : 제가 2.95를 사용하는데 괜찮더군요.....
glibc : gcc에 의존관계는 크게 없지만 이거 없으면 일반 C 소스도 컴파일안됩니다...
shell : 음 대부분 bash를 사용하실껍니다...bash를 적극 추천합니다...
make : 없으면 리눅스가 아닐지도...


[[ 설치에 필요한 계정 ]]
root 계정으로 프로그램을 설치 합니다....
그래야 나머지 계정에 ftp로 올려버린 압축 이미지도 풀어 헤칠수 있으니까요... <-- 농담반 진담반
.........원래 프로그램 설치는 root에서 하는 거심.........


[[ 설치에 필요한 소스를 받아봅시다 ]]
힘들게 찾았습니다...
http://multi.ks.ac.kr/~reserve/avr-gcc
필요한것이 binutils와 gcc-core, avr-libc입니다...

binutils-2.14.tar.bz2  
gcc-core-3.3.tar.gz  
avr-libc_20030512cvs-1.tar.gz
를 받으세요

binutil만 왜 tar.gz의 확장자가 아니라 tar.bz2의 확장자냐라고 생각하시는 분은...ftp://ftp.informatik.rwth-aachen.de/pub/gnu/binutils/ 가셔서 tar.gz로 된 걸 받으시면 됩니다 ^-^ 그냥 혹시나 하는 마음에 원래 인터보드 강좌의 파일로 쓴거죠...

이전 버전은 tar.gz로 깔았었는데 잘되었습니다...


[[ 본격적인 설치에 앞서 ]]
리눅스에선 configure  - > make - > make install 의 과정으로 소스 컴파일을 합니다..
configure로 설치할 환경을 세팅하구요(데뱐이면 데뱐, 수세면 수세, 레뎃이면 레뎃, 젠투면 젠투...등등)
make로 실제 바이너리 이미지를 현 디렉토리에 맹글어 둔후..
make install을 하면 해당 설치 경로로 파일을 옮기게 됩니다....
make한 데이터를 싸그리 지우고 싶다...라면 make clean하시면 됩니다....만...그냥 사용한 디렉토리는 rm -rf 디렉토리명 으로 삭제 하시면 되기 때문에 그럴 필요가 거의 없을껍니다...

[[ 설치 과정 ]]

gcc가 설치되어있으므로 그것과 구분 지을수 있도록 /usr/local/atmel이란 디렉토리를 생성하여 거기에 avr-gcc를 설치하도록합니다..

$> mkdir /usr/local/atmel

/usr/local/atmel이라는 디렉토리를 맹글었으면

(1)
어셈블러나 링커등이 있는 binutil을 설치 합니다...
(주 : avr-gcc말고 ARM(XScale)용 gcc또한 binutil 을 사용합니다....이와 유사한 방식으로 설치를 하지요..)

$>  bunzip2 -c binutils-2.14.tar.bz2 | tar xvf -
(주 : tar.gz파일이라면 $> tar xvfz binutils-2.14.tar.gz 로 압축을 해제 한다)
$>  cd binutils-2.14
$>  ./configure --target=avr --prefix=/usr/local/atmel
$>  make
$>  make install  

이렇게 설치가 되었으면 avr-gcc(cc이지만 이녀석은 크로스 컴파일러이죠..)의 라이브러리가 어디에 있는지 정의해 주어야 하는데요..

$> vi /etc/ld.so.conf

로 파일을 여신 후 에디터를 insert 모드로 전환(키보드 i키) 후 원래 있는 라이브러리 패스 밑에 /usr/local/atmel/lib 라인을 추가 시킵니다..
그리고 esc키 를 누르면 insert모드에서 해제되는데요 여기서 :wq (파일에 쓰고 종료)를 눌러 파일에 쓰고 종료를 합니다

*.conf파일은 config파일입니다...바뀐 데이터를 반영하기 위해선

$> /sbin/ldconfig

명령을 수행 하게 되면 됩니다...

but, 여기서 저 명령이 안듣는 모양이더군요..제 리눅스가 문제인건지...커널버전이 너무 많이 올라와 버려서 인건지....
대안입니다...
실행을 시켜보고...리붓해주시길...(꼭입니다..)

리붓 후 다시 root로 로긴합니다

(2)
avr-gcc를 설치 합니다...
gcc-core만 깔면 되더군요..+_ +)

인터보드랑 약간 차이나는 게 여기서 부터라 볼수 있군요..

$>  tar zxvf gcc-core-3.3.tar.gz
$>  cd gcc-3.3
$>  ./configure --target=avr --prefix=/usr/local/atmel --disable-nls --enable-language=c

위와 같이 gcc-core를 configure한 다음 make, make install전에

$>  export CC=avr-gcc  
$>  export AS=avr-as
$>  export AR=avr-ar
$>  export RANLIB=avr-ranlib
$>  export PATH=/usr/local/atmel/bin:${PATH}

위와 같이 환경 변수를 등록합니다...

그 다음

$>  make
$>  make install

로 마무리!!


(3)
여기까지 아무문제 없이 잘 왔다면..대략 성공이 눈앞에 보이는 것입니다.... 나머지는 이제 avr-gcc가 사용할 avr 헤더파일과 라이브러리 파일을 등록시켜주는(파일을 생성후 /usr/local/atmel/ 디렉토리 하부에 집어 넣는) 작업만 남았습니다..

그 것이 avr-libc이죠....
(주: 역시 ARM용 또한 이렇게 존재하는 것이지요 [_ _]*)

$>  tar xvfz  avr-libc_20030512cvs-1.tar.gz
$>  cd avr-libc-200030512cvs
$>  ./configure --prefix=/usr/local/atmel --target=avr --enable-languages=c --host=avr
$>  make
$>  make install

하면 이제 avr-gcc가 동작할 것입니다...ㅠ_-
고난과 역경을 ㅠ_ㅠ 격게 되실 것이므로;;
avr-gcc의 패스가 재로긴 후 사라지기 때문이죠..

Tip하나를....

로그인 후 자신의 홈 디렉토리가
/home/자신의 아이디 일껍니다..
거기에서

$>  vi .bash_profile

을 하시면 Bash쉘의 개인 프로필이 뜨게 되는데요..

export CC=avr-gcc  
export AS=avr-as
export AR=avr-ar
export RANLIB=avr-ranlib
export PATH=/usr/local/atmel/bin:${PATH}

제일 밑에 써 넣으시고 난 뒤 저장 후 종료 하신후

$>  source .bash_profile

하시면....

avr-gcc가 그 사용자에게는 실행이 될 것입니다...^-^ 물론 path에 추가해줘도 괜찮지만...

역시 unix, linux라는 운영체제는...특별 권한에 특별한 아이디를 사용하는 매력이 +_ +)/





인터버드에 있는 AVR-GCC 설치 사용법..
http://www.interboard.co.kr/devel/avr/avr_install.html


======================================================================================================================
avr-libc-1.0.3.tar.tar 가 업데이트 되었습니다 .tar.tar는 .tar.bz입니다... 압축 푸시는건 bunzip2 -c 파일명 | tar xvf - 입니다... atmega32 됩니다 두둥~~~


http://www.avrfreaks.net/AVRGCC/index.php
http://www.lancos.com/ppwin95.html
반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

PHP 확장모듈 만들기  (0) 2010.10.21
shell scripting - date 사용하기  (0) 2010.10.21
Solaris 에서의 pkgadd 사용 예  (0) 2010.10.21
MySQL 리플리케이션 로그 핸들링  (0) 2010.10.20
php full compile options  (0) 2010.10.20
반응형

[PHP] PHP Full Library 컴파일
.....................................................................
http://prdownloads.sourceforge.net/freetype/freetype-2.2.1.tar.gz?download
freetype : remove
# rpm -qa |grep freetype
freetype-2.1.3-6
# rpm -e --nodeps freetype-2.1.3-6

freetype : install
# cd freetype-2.1.10
# ./configure
# make
# make install
# cd /usr/local/include/ 해서 freetype2가 설치되어 있는지 확인합니다.

.....................................................................
http://prdownloads.sourceforge.net/libungif
http://sourceforge.net/project/showfiles.php?group_id=102202
libgif : remove

libgif : install
# cd giflib-4.1.0
# ./configure
# make
# make install
# ls -al /usr/local/lib/libgif.a : 날짜확인

libungif : remove

libungif : install
# cd libungif-4.1.0
# ./configure
# make
# make install

.....................................................................
http://prdownloads.sourceforge.net/libpng/
libpng : remove
# rpm -qa | grep libpng
libpng-1.2.2-16
# rpm -e --nodeps libpng-1.2.2-16

libpng : install
# ./configure
# make
# make install

libpng : install
# cd libpng-1.2.8
# cd scripts
# cp makefile.linux ../makefile
# cd ..
# make test
=> 컴파일 에러 발생하면..........................
# cd /usr/local/lib
# cp libz.so* /usr/lib
# cd /usr/lib
[lib]# rm -rf libz.so
[lib]# rm -rf libz.so.1
[lib]# ln -s libz.so.1.2.8 libz.so
[lib]# ln -s libz.so.1.2.8 libz.so.1
-------------------------------------------------
# make install
# ls -al /usr/local/lib/libpng*

libpng 1.2.9 ...............................
./configure
make
make install

..........................................................................
X 6b-33 이 설치되어있다면 제거하지 말고 devel RPM 만 추가 설치 요망.......
http://freshmeat.net/projects/libjpeg/
libjpeg : remove
# rpm -qa libjpeg
libjpeg-6b-26
# rpm -e --nodeps libjpeg-6b-26

another method From: http://site.n.ml.org/info/libjpeg/
I downloaded libjpeg-6b.tar.gz and put it in ~/tmp. There,
$ tar xzvf libjpeg-6b.tar.gz
$ cd jpeg-6b
$ ./configure --enable-shared
$ make test
$ make
. The directory /usr/local/man/man1 didn't exist. I created it, with:
# mkdir /usr/local/man
# mkdir /usr/local/man/man1
. Then,
# make install

# ls -al /usr/local/lib/libjpeg*

another method ................
libjpeg : install
# cd jpeg-6b
# ./configure
# make
# make test
# make install
# make install-lib
# make install-headers

.....................................................................
http://dl.maptools.org/dl/libtiff/
libtiff : remove
rpm -qa libtiff

libtiff : Install
# cd tiff-3.7.2/
# ./configure (Press enter/return to use default paths)
# make
# make install

.....................................................................
####################################################
gd 라이브러리를 등록하기전에 /usr/local/lib이 반드시 라이브러리패스에
등록되어 있어야 정상적으로 gd에서 위에 추가된 라이브러리를 불러온다.
# echo "/usr/local/lib" >> /etc/ld.so.conf
# /sbin/ldconfig
####################################################
http://www.boutell.com/gd/
libgd : remove
# rpm -qa gd
gd-1.8.4-11
# rpm -e --nodeps gd-1.8.4-11

libgd : install
# cd gd-2.0.28
# ./configure --with-freetype-dir=/usr/local/include/freetype2        ## 수정 옵션하나 추가.
# make
.....................................................................................
[root@ gd-2.0.35]# make
make: Warning: File `.deps/webpng.Po' has modification time 3e+04 s in the future
cd . && /bin/sh /home/nexer/pack/gd-2.0.35/config/missing --run aclocal-1.9 -I config
aclocal:configure.ac:64: warning: macro `AM_ICONV' not found in library
cd . && /bin/sh /home/nexer/pack/gd-2.0.35/config/missing --run automake-1.9 --foreign
cd . && /bin/sh /home/nexer/pack/gd-2.0.35/config/missing --run autoconf
configure.ac:64: error: possibly undefined macro: AM_ICONV
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation.
make: *** [configure] Error 1
make 중 아래 에러나면 "make"를 한번더 날려준다.....................................

# make install

.....................................................................
wget ftp://ftp.gnome.org/mirror/gnome.org/sources/libxml2/2.6/libxml2-2.6.22.tar.gz
wget ftp://ftp.gnome.org/mirror/gnome.org/sources/libxml2/2.6/libxml2-2.6.26.tar.gz
libxml : remove
#rpm -qa | grep libxml
libxml-1.8.17-8
# rpm -e --nodeps libxml-1.8.17-8

libxml : install
# cd libxml2-2.6.22
# ./configure
# make
# make install

.....................................................................
zlib : remove
# rpm -qa zlib
zlib-1.1.4-8
rpm -e --nodeps zlib-1.1.4-8

zlib : install
#cd zlib-1.2.1
//-->libz.so와 관련된 모듈을 생성시킨다 이것이 정말 중요하다
# ./configure -s
# make

//--> libz.a를 만든다
# ./configure
# make test
# make install

[root@davinci zlib-1.1.4]# mv libz.so* /usr/local/lib
[root@davinci zlib-1.1.4]# ls /usr/local/lib

####################################################
zlib을 새로 설치하였다면 /usr/local/lib이 반드시 라이브러리패스에
등록되어 있어야 rpm등 zlib을 사용하는 프로그램이 정상적으로 구동된다.
# echo "/usr/local/lib" >> /etc/ld.so.conf
# /sbin/ldconfig
####################################################

.....................................................................
mySQL 종료
mySQL 삭제

mySQL 설치
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--with-mysqld-user=root \
--with-charset=euckr

!!"--with-charset=euckr" <= euckr : 4.0 에서 사용안됨 4.1 에선 됨

make

make install

./scripts/mysql_install_db

/usr/local/mysql/bin/mysqld_safe --user=root &

.....................................................................
http://ftp.apache-kr.org/httpd/httpd-2.2.9.tar.gz    
아파치 종료.
아파치 삭제.

apache2 : install
./configure \
--prefix=/usr/local/apache2 \
--enable-module=so \
--enable-module=rewrite \
--enable-dav \
--enable-dav-fs \

2.2.9 //////////////
./configure \
--prefix=/usr/local/apache2 \
--enable-dav \
--enable-dav-fs \
--enable-so \
--enable-ssl

# make
# make install

.....................................................................
php 삭제.

php : install
./configure \
--prefix=/usr/local/php5 \
--with-exec-dir=/usr/bin \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-apache-install=/usr/local/apache2 \
--with-config-file-path=/etc \
--disable-debug \
--enable-safe-mode \
--enable-track-vars \
--enable-sockets \
--enable-mailparse \
--enable-calender \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-versioning \
--enable-url-includes \
--enable-trans-id \
--enable-inline-optimization \
--enable-bcmath \
--enable-sigchild \
--enable-module=so \
\
--with-ttf \
--with-gettext \
--with-mod_charset \
--with-charset=euc_kr \
--with-language=korean \
\
--with-freetype \
--with-freetype-dir=/usr/local/include/freetype2 \
\
--with-xml \
--with-libxml-dir=/usr/lib \
--with-zlib \
--with-zlib-dir=/usr/lib \
--with-tiff \
--with-tiff-dir=/usr/lib \
--with-gd \
--with-gd-dir=/usr/lib \
\
--with-ungif \
--with-ungif-dir=/usr/local/lib \
--with-jpeg \
--with-jpeg-dir=/usr/local/lib \
--with-png \
--with-png-dir=/usr/local/lib \
--with-gif \
--with-gif-dir=/usr/local/lib \
\
--with-mysql

--with-mysql=/usr/lib/mysql

!!!!!!2008-09-12!!!!!! 성공함

DEFAULT LIB ++++++++++++++++++++++++++++++++++++++++++++++++++++++
./configure \
--prefix=/usr/local/php5 \
--with-exec-dir=/usr/bin \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-apache-install=/usr/local/apache2 \
--with-config-file-path=/etc \
--disable-debug \
--enable-safe-mode \
--enable-track-vars \
--enable-sockets \
--enable-mailparse \
--enable-calender \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-versioning \
--enable-url-includes \
--enable-trans-id \
--enable-inline-optimization \
--enable-bcmath \
--enable-sigchild \
--enable-module=so \
\
--with-ttf \
--with-gettext \
--with-mod_charset \
--with-charset=euc_kr \
--with-language=korean \
\
--with-gd \
--with-gd-dir=/usr/lib \
--with-gif \
--with-gif-dir=/usr/lib \
--with-tiff \
--with-tiff-dir=/usr/lib \
\
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-png \
--with-png-dir=/usr/local/lib \
--with-jpeg \
--with-jpeg-dir=/usr/local/lib \
--with-xml \
--with-libxml-dir=/usr/local/lib \
\
--with-mysql=/usr/local/mysql

#--enable-ftp \

# make
# make install
# cp php.ini-dist /etc/php.ini

....................................................................

./configure \
--prefix=/usr/local/php5 \
--with-exec-dir=/usr/bin \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-apache-install=/usr/local/apache2 \
--with-config-file-path=/etc \
--disable-debug \
--enable-safe-mode \
--enable-track-vars \
--enable-sockets \
--enable-mailparse \
--enable-calender \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-versioning \
--enable-url-includes \
--enable-trans-id \
--enable-inline-optimization \
--enable-bcmath \
--enable-sigchild \
--enable-module=so \
\
--with-ttf \
--with-gettext \
--with-mod_charset \
--with-charset=euc_kr \
--with-language=korean \
\
--with-tiff \
--with-tiff-dir=/usr/lib \
--with-xml \
--with-libxml-dir=/usr/lib \
\
--with-freetype \
--with-freetype-dir=/usr/local/include/freetype2 \
\
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-gif \
--with-gif-dir=/usr/local/lib \
--with-jpeg \
--with-jpeg-dir=/usr/local/lib \
--with-xml \
--with-libxml-dir=/usr/local/lib \
\
--with-mysql=/usr/local/mysql


....................................................................
./configure \
--prefix=/usr/local/php5 \
--with-exec-dir=/usr/bin \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-apache-install=/usr/local/apache2 \
--with-config-file-path=/etc \
--disable-debug \
--enable-safe-mode \
--enable-track-vars \
--enable-sockets \
--enable-mailparse \
--enable-calender \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-versioning \
--enable-url-includes \
--enable-trans-id \
--enable-inline-optimization \
--enable-bcmath \
--enable-sigchild \
--enable-module=so \
\
--with-ttf \
--with-gettext \
--with-mod_charset \
--with-charset=euc_kr \
--with-language=korean \
\
--with-jpeg \
--with-jpeg-dir=/usr/lib \
--with-mysql \
\
--with-freetype \
--with-freetype-dir=/usr/local/include/freetype2 \
\
--with-xml \
--with-libxml-dir=/usr/local/lib \
--with-png \
--with-png-dir=/usr/local/lib \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-gif \
--with-gif-dir=/usr/local/lib \
--with-ungif \
--with-ungif-dir=/usr/local/lib \
--with-tiff \
--with-tiff-dir=/usr/local/lib
반응형
반응형

http://blog.nominet.org.uk/tech/2005/05/26/tail-f-with-highlighting/




If you want to highlight something when doing ‘tail -f’ you can use the
following command:

tail -f /var/log/logfile | perl -p -e
's/(something)/33[7;1m$133[0m/g;'or if your terminal supports colours, e.g. linux terminal, you can use
this:

tail -f /var/log/logfile | perl -p -e
's/(something)/33[46;1m$133[0m/g;'
and if you want it to beep on a match use this:

tail -f /var/log/logfile | perl -p -e
's/(something)/33[46;1m$133[0m07/g;'If you find that perl is too heavy for this you can use sed:

tail -f /var/log/logfile | sed
"s/(something)/^[[46;1m1^[[0m/g"
Note, that in the last example you have to actually type “cntl-v
cntl-[” in place of “^[”

For the full list of control characters on Linux you can look at ‘man
console_codes’.

반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

MySQL 리플리케이션 로그 핸들링  (0) 2010.10.20
php full compile options  (0) 2010.10.20
리눅스 타임존(time zone) 변경..  (0) 2010.10.20
Bash 파일명 패턴으로 지우기  (0) 2010.10.20
qmail control 파일들  (0) 2010.10.20
반응형

qmail은 하나의 전체 설정 파일을 사용하지 않고 /var/qmail/control/ 안에 다음과 같이 분리되고 각각의 기능을 하는 설정파일들을 사용합니다. 각 설정 파일들의 목적은 매우 뚜렷하고 이해와 수정이 용이합니다. 다음 콘트롤 파일들이 모두 존재하고 있어야 하는 것은 아니며, 필요에 따라 만들어 줍니다. -- 임은재 2004-04-15 21:25:37


정의

bounce : 어떤 이유로든 메일이 되돌려 질때 (from: 헤더가 있는 경우)

double bounce : bounce 한 메일이 다시 되돌아 오는 경우

me 는 FQDN으로 명기한 도메인 명이 적혀있는 me 라는 파일을 의미합니다.

Control 파일 Default 사용 설명
rcpthosts 없음 qmail-smtpd 메일을 받아들일 도메인(들)
badmailfrom 없음 qmail-smtpd 이 메일주소로 부터 오는 메일은 553 sorry, your envelope sender is in my badmailfrom list 라는 메세지와 함께 무조건 User unknown으로 bounce 한다.
bouncefrom MAILER-DAEMON qmail-send bounce 할때 메일의 from: 헤더에 들어갈 유저 이름.
bouncehost me qmail-send bounce 할때 메일의 from: 헤더에 들어갈 호스트 이름.
concurrencylocal 10 qmail-send 로컬 메일 배달시 qmail-send의 동시 최대 프로세스의 수를 조절
concurrencyremote 20 qmail-send 리모트 메일 배달시의 qmail-send 동시 최대 프로세스 수를 조절
databytes 0 qmail-smtpd 메일의 최대 크기(byte, 0 = 무제한)
doublebouncehost me qmail-send double bounce 된 메일을 수신할 호스트
doublebounceto postmaster qmail-send double bounce 된 메일을 받을 유저
envnoathost me qmail-send 메일주소에 @ 가 명시되지 않았을 경우의 디폴트 도메인 이름
helohost me qmail-remote SMTP HELO 명령에 표시될 호스트 이름
localiphost me qmail-smtpd 로컬 IP 주소가 대체될 이름
locals me qmail-send 로컬로 인식하며 배달할 도메인(들)
me 시스템의 FQDN . 다른 콘트롤 파일을 위해 쓰임
morercpthosts 없음 qmail-smtpd 두번째 rcpthosts 파일
percenthack 없음 qmail-send "%"-형식의 릴레이를 사용 할 수 있는 도메인
plusdomain me qmail-inject domain substituted for trailing "+"
qmqpservers 없음 qmail-qmqpc QMQP 서버의 IP 주소
queuelifetime 604800 qmail-send 메세지가 메일 큐안에 머물 수 있는 시간 (초단위)
smtpgreeting me qmail-smtpd SMTP greeting message
smtproutes 없음 qmail-remote artificial SMTP routes
timeoutconnect 60 qmail-remote SMTP 연결 대기 시간 (초)
timeoutremote 1200 qmail-remote 리모트 서버 연결 대기 시간 (초)
timeoutsmtpd 1200 qmail-smtpd SMTP client 대기 시간 (초)
virtualdomains 없음 qmail-send 가상 도메인들과 유저들
defaultdomain me qmail-inject 기본 도메인 이름
defaulthost me qmail-inject 기본 호스트 이름
idhost me qmail-inject Message-ID 에 사용될 호스트 이름



머 대충 이런내용인데 qmail kldp에 가입이 안되어잇어서 comment를 달수가 없..어서 다음과 같이 글을 남김...

주 골자는 다음과 같음
me <- 이놈이 아무런 현상이 없다, 참조하는 곳이 없는거 같다라고 glay옹에게 물어봐서 답변이
다른게 설정이 되지 않으면 me가 디폴트인것만 설정이 된다..라는 것.

이런식으로 더 추가해볼 까 한다 하악..
회사 wiki완성되면 쓰고 -0-
=3
반응형

'Tip & Tech > Linux | Unix' 카테고리의 다른 글

리눅스 타임존(time zone) 변경..  (0) 2010.10.20
Bash 파일명 패턴으로 지우기  (0) 2010.10.20
ld.so.conf 사용법  (0) 2010.10.20
qmail 더블바운싱 되는 메일 처리 하기  (0) 2010.10.20
qmail 관련 명령어들.  (0) 2010.10.20
반응형

# vi /etc/ld.so.conf 를 열고...

사용하고자하는 라이브러리 패스를 넣는다...귀찮으면 절대 패스!!!!!!!!!

저장하시고...

#ldconfig -d   (기억이 맞나 가물가물 --help로 보시면, 캐쉬잡힌거 보여줍니다)

반응형
반응형

Java 2 SDK, Standard Edition, v. 1.4.2 Installation Notes

기본 설치
Download j2sdk-1_4_2_03-linux-i586.bin (다운받은다음 644나 755권한을)
다운로드 받은 j2sdk-1_4_2_03-linux-i586.bin 파일을 설치를 원하는 디렉토리에 복사한다. (일반적으로 /usr/local/)
권한을 다음 처럼되어있는지 확인 혹 설정한다.
chmod 755 j2sdk-1_4_2_03-linux-i586.bin

파일이 있는 곳에서 다음과 같이 명령한다.
./j2sdk-1_4_2_03-linux-i586.bin

링크를 걸어준다.
ln -s /usr/local/j2sdk1.4.2_03 /usr/local/j2sdk

환경 설정
어느곳에서나 java 명령을 쳐도 이를 인식하고 또 기본 jar 파일 들을 클래스 패스에 등록하기 위해 다음 파일을 수정(혹 만듬)한다.
vi /etc/profile.d/jdk.sh

다음과 같은 내용을 적는다.
#export JAVA_HOME="/usr/local/j2se"
export JAVA_HOME="/usr/local/j2sdk"
export PATH="$PATH:$JAVA_HOME/bin"
export CLASSPATH=".:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/jre/lib/rt.jar"
export CLASSPATH="$CLASSPATH:$JAVA_HOME/jre/lib/ext"

만약 톰캣이 깔려있다면 다음 줄도 추가한다.(아마도 이 라인은 톰캣을 깐 후에 하는 작업이 될듯)
export CLASSPATH="$CLASSPATH:$CATALINA_HOME/lib/servlet.jar"

vi를 저장하고 빠져나온다.
저장한 내용을 반영시키기 위해 다음과 같이 타입한다.
source /etc/profile

-------------------------------------------------------------------------------------------------

JDK 설치

1. 설치파일
Java(TM) 2 Platform Standard Edition Development Kit
-> Download : http://java.sun.com/
-> jdk-1_5_0_06-linux-i586-rpm.bin (자동실행파일)

2. 설치

[root@voyager jdk]# chmod 755 jdk-1_5_0_06-linux-i586-rpm.bin
[root@voyager jdk]# ./jdk-1_5_0_06-linux-i586-rpm.bin
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0

중략...

For inquiries please contact: Sun Microsystems, Inc., 4150 Network
Circle, Santa Clara, California 95054, U.S.A. (LFI#141623/Form
ID#011801)

Do you agree to the above license terms? [yes or no]
y
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jdk-1_5_0_06-linux-i586.rpm
준비 중... ########################################### [100%]
1:jdk ########################################### [100%]

Done.
[root@voyager jdk]# rpm -qi jdk
Name : jdk Relocations: /usr/java
Version : 1.5.0_06 Vendor: Sun Microsystems, Inc.
Release : fcs Build Date: 2005년 11월 11일 (금) 오전 07시 20분 19초
Install Date: 2006년 04월 26일 (수) 오전 11시 41분 59초 Build Host: tiger-linux
Group : Development/Tools Source RPM: jdk-1.5.0_06-fcs.src.rpm
Size : 84094742 License: Sun Microsystems Binary Code License (BCL)
Signature : (none)
Packager : Java Software
URL : http://java.sun.com/
Summary : Java(TM) 2 Platform Standard Edition Development Kit
Description :
The Java 2 Platform Standard Edition Development Kit (JDK) includes both the
runtime environment (Java virtual machine, the Java platform classes and
supporting files) and development tools (compilers, debuggers, tool libraries
and other tools).

The JDK is a development environment for building applications, applets and
components that can be deployed with the Java 2 Platform Standard Edition
Runtime Environment.
반응형
반응형

설치한 jdk의 javac와 java를 심볼릭링크로 거세연...
반응형

+ Recent posts