CentOS-7-x86_64-Minimal-1810 安装高

2019-03-21  本文已影响0人  不知不怪

1.安装依赖

yum install -y openssl-devel libevent-devel libjpeg-devel giflib-devel libpng-devel libwebp-devel ImageMagick-devel libmemcached-devel

2.下载:zimg-3.1.0-Release.x86_64.rpm

打开:http://zimg.buaa.us/downloads/ 页面 点击 zimg-3.1.0-Release.x86_64.rpm
也可以使用命令

wget https://github.com/buaazp/zimg/releases/download/v3.1.0/zimg-3.1.0-Release.x86_64.rpm

官网下载比较慢可以从我的百度云盘上下载
链接: https://pan.baidu.com/s/1jUVTUPXBGTx5HgLP2LfC2A 提取码: 25d2

3.安装

sudo rpm -ivh zimg-3.1.0-Release.x86_64.rpm

4.运行:

/usr/local/zimg/zimg /usr/local/zimg/conf/zimg.lua

4.开机启动:

chmod +x /etc/rc.d/rc.local
vim /etc/rc.local
//加如下行
/usr/local/zimg/zimg /usr/local/zimg/conf/zimg.lua *

#### 5.关闭防火墙:

systemctl stop firewalld.service
systemctl disable firewalld.service

#### 6.浏览器打开:http://server-ip:4869
![无标题.png](https://img.haomeiwen.com/i7848013/a06ea692ffaf1ee0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

####7.java上传工具类

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;

/**

}



上一篇 下一篇

猜你喜欢

热点阅读