CentOS安装php_screw模块的脚本

install_php_screw.sh

声明执行该脚本前需要将php_screw-1.5.tar.gz上传至/usr/local/下

#!/bin/sh


#install php_screw

cd /usr/local/

tar zxvf php_screw-1.5.tar.gz

cd /usr/local/php_screw-1.5/

#vi /usr/local/php_screw-1.5/php_screw.h
echo "#define PM9SCREW        \"\tCOOL\t\"
#define PM9SCREW_LEN     6

char *zdecode(char *inbuf, int inbuf_len, int *resultbuf_len);
char *zencode(char *inbuf, int inbuf_len, int *resultbuf_len);" > /usr/local/php_screw-1.5/php_screw.h

#vi /usr/local/php_screw-1.5/my_screw.h
echo "short pm9screw_mycryptkey[] = {
  12852, 968, 192, 1281, 62, 269
};" > /usr/local/php_screw-1.5/my_screw.h

phpize

./configure

make

cd modules

cp php_screw.so /usr/lib/php/modules

#insert strings "extension=php_screw.so" into line 625 of /etc/php.ini
sed -i '625a\extension=php_screw.so' /etc/php.ini

/usr/sbin/apachectl restart

cd /usr/local/php_screw-1.5/tools

make

cp screw /usr/bin

screw /var/www/html/info.php
rm -rf /var/www/html/infophp..screw
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值