红帽7.X安装php7.X 与加密PHP

yum -y install gcc gcc-c++ cmake openssl-devel pcre-devel wget
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum install php70 php70-php-fpm php70-php-gd php70-php-json php70-php-mbstring php70-php-mysqlnd php70-php-xml php70-php-xmlrpc php70-php-opcache php70-php-devel -y
  • nginx编译

./configure –prefix=/usr/local/nginx –with-pcre –user=daemon –group=daemon –with-http_stub_status_module –with-http_ssl_module –with-http_v2_module

———————-php加密——————-
安装 php70-php-devel 才有phpize命令

yum -y install php70-php-devel

下载包

$wget https://github.com/liexusong/php-beast/archive/master.zip
$ unzip master.zip

创建软连接

ln -s /opt/remi/php70/root/usr/bin/phpize /usr/local/sbin/

[root@DOBI-20 php-beast-master]# phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
[root@DOBI-20 ]# find /opt/ -name php-config
/opt/remi/php70/root/usr/bin/php-config

对应php70配置

[root@DOBI-20 php-beast-master]# ./configure –with-php-config=/opt/remi/php70/root/usr/bin/php-config

[root@DOBI-20 php-beast-master]# make && make install
Installing shared extensions: /opt/remi/php70/root/usr/lib64/php/modules/

查看模块生效

[root@DOBI-20 php-beast-master]# php70 -m
[PHP Modules]
bcmath
beast

编辑php.ini

vim /etc/opt/remi/php70/php.ini

后修改php.ini配置文件顶部, 加入配置: extension=beast.so, 重启php-fpm

复制配置

cp -a php-beast-master/tools/ /opt/

编译vim /tmp/jsj/php-beast-master/tools

[root@DOBI-20 tools]# cat configure.ini
; source path
src_path = “/soucre”  <<---源码路径

; destination path
dst_path = “/data”   <<<<<---编译后的路径

; expire time
expire = “”

; encrypt type
encrypt_type = “DES”

开始编译
[root@DOBI-20 application]# php70 /opt/tools/encode_files.php
Source code path: /soucre
Destination code path: /data
Expire time:
————- start process ————-
Processed encrypt files [100%] – 100%
Finish processed encrypt files, used 35.378858 seconds

注意要进到绝对路径
[root@DOBI-20 application]# pwd
/soucre/application

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值