아파치 실행 에러
작성자 정보
- 유진 작성
- 작성일
컨텐츠 정보
- 5,449 조회
- 3 댓글
- 0 추천
- 목록
본문
아파치 실행 중지, 실행시 에러가 뜨는데 해결 방법을 모르겠습니다.
[root@localhost ~]# /etc/rc.d/init.d/httpd start
httpd: Syntax error on line 109 of /usr/local/server/apache/conf/httpd.conf: Cannot load /usr/local/server/apache/modules/libphp5.so into server: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
[root@localhost ~]# ls /usr/local/server/apache/modules
httpd.exp mod_cache.so mod_info.so
libphp5.so mod_cern_meta.so mod_log_config.so
mod_actions.so mod_cgid.so mod_log_forensic.so
mod_alias.so mod_dav.so mod_logio.so
mod_asis.so mod_dav_fs.so mod_mem_cache.so
mod_auth_basic.so mod_dbd.so mod_mime.so
mod_auth_digest.so mod_deflate.so mod_mime_magic.so
mod_authn_anon.so mod_dir.so mod_negotiation.so
mod_authn_dbd.so mod_disk_cache.so mod_rewrite.so
mod_authn_dbm.so mod_dumpio.so mod_setenvif.so
mod_authn_default.so mod_env.so mod_speling.so
mod_authn_file.so mod_expires.so mod_status.so
mod_authz_dbm.so mod_ext_filter.so mod_unique_id.so
mod_authz_default.so mod_file_cache.so mod_userdir.so
mod_authz_groupfile.so mod_filter.so mod_usertrack.so
mod_authz_host.so mod_headers.so mod_version.so
mod_authz_owner.so mod_ident.so mod_vhost_alias.so
mod_authz_user.so mod_imagemap.so
mod_autoindex.so mod_include.so
[root@localhost ~]# find / -name libmysqlclient_r.so.15
/usr/local/server/mysql_back/lib/mysql/libmysqlclient_r.so.15
내용을 봐서는 libmysqlclient_r.so.15 이 파일이 문제가 있는 것 같은데 modules 디렉토리에 넣어도 안되고, SELinux 설정 때문이라고 하지만, 아래처럼 기본으로 disabled 되어 있네요..
[root@localhost ~]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
아래 이 방법은 이렇게 하면 해결된다는 내용이 있길래 해봤습니다.
[root@localhost ~]# chcon -t texrel_shlib_t /usr/local/server/apache/modules/*.so
chcon: can't apply partial context to unlabeled file /usr/local/server/apache/modules/libphp5.so
.. 중략 ..
chcon: can't apply partial context to unlabeled file /usr/local/server/apache/modules/mod_vhost_alias.so
결국 초보라 해결을 못하고 있습니다.
어떻게 하면 해결 할 수 있는지 고수 분들의 조언 부탁드립니다.
관련자료
-
이전
-
다음
suki님의 댓글
- suki
- 작성일
유진님의 댓글
- 유진
- 작성일
[root@localhost php-5.2.5]# ./configure --prefix=/usr/local/server/php --with-apxs2=/usr/local/server/apache/bin/apxs --with-mysql=/usr/local/server/mysql --with-config-file-path=/usr/local/server/apache/conf --with-jpeg --with-png --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-libxml-dir=/usr --with-gd --with-ttf --with-gettext --with-iconv --with-xml --enable-force-cgi-redirect --enable-calendar --enable-magic-quotes --disable-debug --enable-safe-mode --enable-bcmath --enable-ftp --enable-exif --enable-sysvsem=yes --enable-sysvshm=yes --enable-sockets --enable-sigchild --enable-mbstring --enable-gd-native-ttf --enable-url-includes --enable-trans-id --enable-inline-optmization
mysql 경로에 복사
[root@localhost ~]# cp /usr/local/server/mysql_back/lib/mysql/libmysqlclient_r.so.15 /usr/local/server/mysql/libmysqlclient_r.so.15
복사 확인
[root@localhost ~]# ls /usr/local/server/mysql bin include libexec man share
data lib libmysqlclient_r.so.15 mysql-test
[root@localhost ~]# /etc/rc.d/init.d/httpd start
httpd: Syntax error on line 109 of /usr/local/server/apache/conf/httpd.conf: Cannot load /usr/local/server/apache/modules/libphp5.so into server: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory
안되네요 ^^;
유진님의 댓글
- 유진
- 작성일
해당 에러는 mysql을 Thread 방식으로 컴파일 안해서 그러네요..
Apache는 Thread 방식으로 컴파일 해 놓고 Mysql을 안했네요..
그냥 모두 재컴파일...
그랬더만.. 잘되던 proftp가 말썽이네요...