«   2018/06   »
          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
Archives
Today
340
Total
1,112,200
안정적인 DNS서비스 DNSEver
관리 메뉴

Blue Breeze

PHP7 event, libevent Installation 본문

Language/PHP

PHP7 event, libevent Installation

푸른바람 C/H 2018.06.06 08:30

PECL event

#yum install libevent-devel -y
sudo apt-get install libevent-dev -y
sudo pecl channel-update pecl.php.net
sudo pecl install event
downloading event-2.3.0.tgz ...
.....
Include libevent OpenSSL support [yes] : no
.....

Build process completed successfully
Installing '/usr/lib/php/20170718/event.so'
install ok: channel://pecl.php.net/event-2.3.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=event.so" to php.ini

libevent 확장은 php7을 지원하지 않으며 php7 사용자는 event를 사용해한다. 
하지만 그 조차도 안된다면 아래 pecl-event-libevent.git 을 설치 해서 사용할 수 있다.

libevent Installation

# 사전설치
sudo apt-get install gcc make libevent-dev

# libevent 설치
git clone https://github.com/expressif/pecl-event-libevent.git
cd pecl-event-libevent
phpize
./configure
make && sudo make install

php.ini extention

#extension=event.so
#extension=libevent.so

# event.so, ubuntu
sudo vi /etc/php/7.2/mods-available/event.ini
cd /etc/php/7.2/cli/conf.d
sudo ln -s ../../mods-available/event.ini 20-event.ini

# libevent.so, ubunut
sudo vi /etc/php/7.2/mods-available/libevent.ini
cd /etc/php/7.2/cli/conf.d
sudo ln -s ../../mods-available/libevent.ini 20-libevent.ini

libevent.so, event.so /usr/lib/php/20160303/ Not Found Error

cd /usr/lib/php/20160303/
sudo ln -s ../20170718/libevent.so
sudo ln -s ../20170718/event.so


0 Comments
댓글쓰기 폼