Thursday, January 21, 2010

Install APC automatically via script

If you try to install APC via scripting, you might experience the interactive prompt asking about "apxs". How to by pass that? Use expect ("yum install expect"). This script will solve your problem:
#!/usr/bin/expect
spawn pecl install apc
expect "Use apxs to set compile flag"
send "yes\r"
expect "install ok"
expect eof

Labels:

0 Comments:

Post a Comment

<< Home