1. php 모듈 변경 진행

2. 기존 php config 설치 파일 백업
[root@test ~]# mv /root/src/php-5.5.58 /root/src/php-5.5.58_bak

3. apache, mysql 중지
[root@test ~]# /opt/apache/bin/apachectl stop
[root@test ~]# /opt/mysql/support-files/mysql.server stop

4. 기존 php 디렉토리 백업 완료
[root@test ~]# mv /opt/php /opt/php_bak

5. 기존 apache libphp5.so 파일 백업
[root@test /opt/apache/modules]# mv libphp5.so libphp5.so_bak

6. php 재컴파일
[root@test ~]# cd /root/src/php-5.5.38
./configure --prefix=/opt/php --with-mysql=/opt/mysql --with-mysqli=/opt/mysql/bin/mysql_config --with-pdo-mysql=/opt/mysql --with-apxs2=/opt/apache/bin/apxs --with-curl --with-gd --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-zlib --with-zlib-dir=/usr --with-gdbm --with-gettext --with-iconv --with-openssl --with-libxml-dir=/usr/lib --with-bz2 --with-mcrypt --enable-gd-native-ttf --enable-exif --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-soap --enable-mbstring=all --enable-bcmath --enable-zip --with-mhash
make -j `grep processor /proc/cpuinfo | wc -l`; make install

7. php.ini 파일 복사
cp -f /opt/php_bak/lib/php.ini /opt/php/lib/php.ini
ㄴ 추가 모듈 에러 발생되어 기존 모듈에서 복사 완료
[root@test ~/src/php-5.5.38]# cp -rp /opt/php_bak/lib/php/extensions/opcache.so /opt/php/lib/php/extensions/opcache.so
[root@test ~/src/php-5.5.38]# cp -rp /opt/php_bak/lib/php/extensions/ZendGuardLoader.so /opt/php/lib/php/extensions/ZendGuardLoader.so

8. apache, mysql 시작
[root@test ~/src/php-5.5.38]# /opt/apache/bin/apachectl configtest
Syntax OK
[root@test ~/src/php-5.5.38]# /opt/apache/bin/apachectl start
[root@test ~/src/php-5.5.38]# /opt/mysql/support-files/mysql.server start
Starting MySQL... SUCCESS!

9. 모듈 추가 확인 확인
[root@test ~/src/php-5.5.38]# php -m | grep mhash
mhash

+ Recent posts