apache php7 cent7 소스 설치

운영자 | 기사입력 2019/10/15 [13:47]
>
필자의 다른기사 보기 인쇄하기 메일로 보내기 글자 크게 글자 작게
apache php7 cent7 소스 설치
 
운영자   기사입력  2019/10/15 [13:47]

 

http://apache.org/dist/apr/apr-1.6.5.tar.gz

 

tar xvfz apr-1.6.5.tar.gz 

 

cd apr-1.6.5

cp -arp libtool libtoolT

 

 

 

http://apache.org/dist/apr/apr-util-1.6.1.tar.gz

tar xvfz apr-util-1.6.1.tar.gz

 

 

 

xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory

yum install expat-devel

 

 

wget https://sourceforge.net/projects/pcre/files/pcre/8.43/pcre-8.43.tar.gz/download

 

 

./configure  --prefix=/home/apache2 --enable-so --enable-rewrite --enable-expires --enable-modules=ssl --enable-ssl --with-apr=/home/apache2/apr --with-apr-util=/home/apache2/apr-util --with-pcre=/home/apache2/pcre

 

 

hecking for OpenSSL version >= 0.9.8a... FAILED

configure: WARNING: OpenSSL version is too old

no

checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failures

[root@ID25727 httpd-2.4.41]# 

 

yum install openssl-devel

yum install libcurl-devel

 

 

make[2]: *** [htpasswd] Error 1

--enable-lib64 --libdir=/usr/lib64

 

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_GetErrorCode'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ParserCreate'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ParserFree'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetUserData'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_StopParser'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_Parse'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ErrorString'

/home/apache2/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetElementHandler'

collect2: error: ld returned 1 exit status

make[2]: *** [htpasswd] Error 1

make[2]: Leaving directory `/home/httpd-2.4.41/support'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/httpd-2.4.41/support'

make: *** [all-recursive] Error 1

 

vi build/config_vars.mk 파일 수정해서

AP_LIBS = 시작하는 라인을 찾아

-lexpat를  추가 

 

 

 

./configure --with-apxs2=/home/apache2/bin/apxs --with-mysql --with-gd --with-jpeg-dir --enable-ftp --with-zlib-dir --with-iconv --enable-mbstring --enable-mbregex --prefix=/home/php --with-curl=/usr/lib --enable-gd-native-ttf --with-ttf -with-freetype-dir --with-png_dir

 

 

checking for FreeType 2... yes

checking whether to enable JIS-mapped Japanese font support in GD... no

If configure fails try --with-webp-dir=<DIR>

configure: error: jpeglib.h not found.

 

yum -y install libjpeg*

 

 

 

--with-mysql for this value --with-mysqli

 

 

 

 

timedatectl set-timezone Asia/Seoul

 ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

 

yum -install libzip*

 

yum install bzip2-devel

 

checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11

 

 

 

file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in

 

php 설치시  --with-openssl \

 

phpinfo 에서 

 Registered Stream Socket Transportstcp, udp, unix, udg

항목에 ssl 추가 되야 한다. 

Registered Stream Socket Transportstcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2

 

./configure --with-apxs2=/home/apache2/bin/apxs --with-mysqli --with-gd --with-jpeg-dir --enable-ftp \

 --with-zlib-dir --with-iconv --enable-mbstring --enable-mbregex \

--prefix=/home/php7 --with-curl=/usr/lib   -with-freetype-dir --with-png_dir \

--enable-exif \

--with-openssl \

--with-zlib \

--with-bz2 \

--enable-sockets \

--with-mhash \

--with-gd \

 

 

 

cp php.ini-production  /home/php7/lib/php.ini

 

 

/home/apache2/bin/httpd -t

 

Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

 

 

#LoadModule rewrite_module modules/mod_rewrite.so 수정

LoadModule rewrite_module modules/mod_rewrite.so

 

 

mysqli_connect(): (HY000/2002): No such file or directory 

 

 

 

<Directory "/home/ins_news3/ins_news">

 AddDefaultCharset euc-kr

</Directory>

 

AddDefaultCharset UTF-8

#AddDefaultCharset EUC-KR

 

 

Methods with the same name as their class will not be constructors in a future version of PHP

생성자 이름과 클래스이름을 같이 사용 할 수 없고 

__construct() 생성해 주어야 합니다.

 

class  abc {

 

   function abc() {

 

   }

}

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

class  abc {

 

   function __construct()

 

   }

}

 

 

##########################################################################################################

 

 $viewonoff=(int)@mktime($w_H_e,$w_i_e,0,$w_m_e,$w_d_e,$w_y_e);

 

error_reporting(E_ALL);

ini_set("display_errors", 1);

extract($_POST);

extract($_GET);

extract($_SERVER);

extract($_FILES);

extract($_ENV);

extract($_COOKIE);

 

 

./configure --prefix=/home/ImageMagick --with-png --with-jpeg --with-gif

 

$_SESSION['d_id'],$_SESSION['d_level'],$_SERVER['PHP_SELF']

 

yum -y install ntp

yum -y install ftp

yum -y install wget

mv /usr/bin/wget /usr/bin/w_get

yum -y install ghostscript

yum -y install rsync

yum -y install telnet

yum -y install fonts-korean

yum groupinstall -y korean-support -x xorg-x11-server-Xorg

yum -y install libgomp

yum -y install vsftpd

yum -y install lftp

fc-cache

 

 

 

rpm -ivh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

yum install mysql-community-server

 systemctl start mysqld

cat /var/log/mysqld.log

 

 A temporary password is generated for root@localhost: iMKq;#Asv0G)

set password=password('Aaaaa123');

flush privileges;

 

mysqli_connect(): (HY000/2002): No such file or directory

 

ln -s /var/lib/mysql/mysql.sock mysql.sock

 

 

 

트위터 트위터 페이스북 페이스북 카카오톡 카카오톡
기사입력: 2019/10/15 [13:47]  최종편집: ⓒ iwav