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