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.
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
Comments