Installing Expect on WHM/CENTOS

This is an installation procedure that would work on 5.6 PHP. Not sure if it would work on higher PHPs.

Go to SSH/putty or whatever you use and install these dependencies.

  1. Install PHP and its Development Framework
yum install php php-devel php-common

2. Install php-pear (PHP Extension and Application Repository)

  yum install php-pear

 To verify whether pear is installed properly or not, type command pear, there you will get

 list of command like discover-channel, upgrade,upgrade-all,if pear is successfully installed.

3. Install Tool command language (TCL) and TK, required for expect package

  yum install tcl tcl-devel tk tk-devel

4. Install Expect package required for php-expect

  yum install expect expect-devel

5. Install php-expect using pecl

  pecl install expect

 sometimes it may give error regarding channel,then use the path mentioned in suggestion like

channel://pecl.php.net/expect-0.3.1

 After successful installation of expect package, add the following line under extension in

 php.ini file (this will also be shown after successful installation of expect function)

 extension = expect.so

Maida Barrientos on EmailMaida Barrientos on FacebookMaida Barrientos on GithubMaida Barrientos on InstagramMaida Barrientos on LinkedinMaida Barrientos on Twitter
Maida Barrientos
COO at Contrib
About Maida
She is Zipsite's all around Zipsiter. Only clocks out when she can barely stand. She sings, bakes, and tries so hard to be fit. But don't judge, she can literally strong arm you no problem. She's currently involved with eCorp, Contrib and VNOC, besides being a Brazilian Jiu Jit Su practitioner.

Leave a Comment