티스토리 뷰
10년전 APM으로 개발된 웹페이지를 건드려볼 일이 생겼다.
netbeans php ide로 설치하고 테스트 해보려했는데 APM 설치가 필요했다.
하지만 최신 버전과 10년전 버전은 하늘과 땅 차이!!!
APM 10년전 버전을 개인 계정에 설치했던 로그 기록이다.
사용한 플랫폼은 gentoo x86-64
하지만 소스 컴파일 설치이니 모든 리눅스에 적용 가능하다 생각함
소스들은 각 아카이브에서 받아왔다. md5sum으로 확인해보니 깨끗.
$prefix는 설치 위치
1. mysql 5.0.67 설치
$ tar xfvz mysql-5.0.67.tar.gz
$ cd mysql-5.0.67/
$ ./configure --prefix=$prefix/mysql-5.0.67 --with-charset=utf8 --with-collation=utf8_general_ci
$ make && make install
$ cd $prefix
$ ln -sf mysql-5.0.67 mysql
$ export PATH=$PATH:$prefix:/mysql/bin
$ mysql_install_db # 처음 mysql 데이터베이스를 설치
$ mysqld_safe & # mysqld 실행
$ mysqladmin -u root passwd 'rootpassword' # root 비밀번호 설정
$ cd ../mysql-test ; perl mysql-test-run.pl # 잘 설치되었는지 확인. 오래 걸린다....
$ ./mysqladmin -u root -p shutdown # mysql 종료
2. Apache 2.2.8
$ tar xfvz httpd-2.2.8.tar.gz
$ cd httpd-2.2.8/
$ ./configure --prefix $prefix/apache-2.2.8 --enable-so --with-included-apr --enable-rewrite --enable-deflate --enable-headers
#--enable-lib64 --libdir=/usr/lib64 64비트 시스템일경우 추가
#--enable-ssl ssl https 인증서 사용시 필요
#--enable-rewrite 주소 재작성 모듈
#--enable-suexec cgi 실행 권한 관련
#--enable-deflate --enable-headers 압축관련(이미지등)
#--enable-dav subversion에서 사용됨
#--with-included-apr 아파치 소스에 포함된 apr을 그대로 사용하도록 지정
#--with-mpm=worker 아파치의 프로세스 동작 설정(기본 옵션은 prefork)
$ make & make install
$ cd $prefix
$ ln -sf apache-2.2.8 apache2
$ export PATH=$PATH:$prefix:/apache2/bin
$ vi apache2/conf/httpd.conf
Listen 80 -> Listen 8000 수정 (로컬에서 실행할 예정이라서 80포트 사용이 안됨)
$ apachectl start # apache 시작
브라우저에서 http://localhost:8000 확인
It works!
$ apachectl stop # apache 스톱
3. PHP dependency 설치
3.1 bison 설치
$ wget http://ftp.gnu.org/gnu/bison/bison-2.3.tar.gz
$ tar xfvz bison-2.3.tar.gz
$ .configure --prefix=$prefix/bison
$ make && make install
3.2 flex는 버전에 큰 영향이 없어 보여서 로컬 설치 취소
3.3 libxml2
- 2.9.0 이상은 컴파일시 에러 발생 속편하게 2.7 설치
$ wget ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz
$ tar xfvz libxml2-2.7.7.tar.gz
$ ./configure --prefix=$prefix/libxml2
$ make && make install
3.4 oracle instant client
- 오라클 홈페이지 instant client download 페이지로 이동
(http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html)
3.5 환경 셋업 (로컬에 설치한 버전을 먼저 사용하도록 환경 설정)
4. PHP
$ tar xfvz php-5.2.6.tar.gz
$ cd php-5.2.6
$ ./configure
--prefix=$prefix/php/php-5.2.6
--with-apxs2=$prefix/apache2/bin/apxs
--with-mysql=$prefix/mysql
--with-config-file-path=$prefix/apache2/conf
--with-libxml-dir=$prefix/libxml2
--enable-mbstring
--enable-shared
--with-gd
--enable-sigchild
--with-zlib
--with-oci8=$prefix/instantclinet
$ make
$ make test (오류 확인)
$ make install
- php 환경 설정 생성
$ cp php.ini-dist $prefix/apache2/conf/php.ini
- httpd.conf 설정 변경
$ vi $prefix/apache2/conf/httpd.conf
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
<IfModule mime_module>
... 생략
AddType application/x-httpd-php .php .html .htm .phtml .inc
AddType application/x-httpd-php-source .phps
AddType text/html .php
AddHandler php5-script .php
</IfModule>
- index.php 생성
$ vi $prefix/apache2/htdocs/index.php
phpinfo();
?>
- apache restart
$ $prefix/apache2/bin/apachectl restart
브라우저에서 http://localhost:8000/index.php 확인
일단 여기까지...
- Total
- Today
- Yesterday
- ChatGPT
- 저금
- 피곤한 휴일
- xe
- netbeans
- machine learing
- OpenAI
- source
- 창준이 득남
- ThumbFish
- java
- rapidminer
- 해약
- 시리
- ruby
- 블로그 업데이트
- Synergy
- 벗꽃축제
- IDE
- 안타까움
- pg_upgrade
- postgresql upgrade
- 소화불량
- GPT3
- Shortcuts
- 단축어
- commons-fileupload
- Deep Learning
- marvin
- gpt4
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |