Use the Hellohao picture bed program to build a self-built picture storage platform, installation and demonstration

888u

Last update at :2024-07-07,Edit by888u

More and more of our friends who build websites hope to separate and store pictures, attachments and website servers. Firstly, it can reduce the load and bandwidth usage of the server. Secondly, it is more convenient for us to manage. For example, when we back up a website, it would be very troublesome if we repeatedly download all the images from the website every time. In fact, our website programs are all fixed, and the database MYSQL is not stored in the root directory in file form. Some friends even use cloud databases.

In other words, if we use object storage to separate images, attachments and website programs, it will be easy to back up and switch. But some friends say that when we use object storage, the cost is high and we don’t know how much traffic will be deducted. So some friends like to use self-built image beds in servers, which can save costs. After all, some servers do not limit traffic according to bandwidth.

In this article, Snail needs to introduce Hellohao Picture Bed (Hellohao Picture Bed Program), which currently provides free functions, and we can directly deploy and use it in the server. Let’s take a look at the basic functionality.

First, Hello Picture Bed installation environment support

The picture bed needs to be installed to support JDK 1.8 and MySQL5.5+. We can use the Pagoda panel to install it or the one-click installation script, which is more convenient. Of course, if we are more capable, we can also compile it ourselves, but I personally do not recommend it. , after all, he is very mature now. Why do we have to be so tired?

Hellohao Image Bed is a SpringBoot open source image hosting program based on multiple object storage sources. The program is built using Spring Boot, allowing users to more conveniently manage their own image management and expansion functions. It supports local docking. At the same time, we can also support docking with third-party object storage, including NetEase, Alibaba, Youpai, Qiniu, Tencent, FTP, u-file, B2 and many other object stores.

Second, installation method of Hello Picture Bed

yum install -y wget && wget -O hellohao.sh http://www.hellohao.cn/gg/hellohao.sh && bash hellohao.sh

We need to support deployment dependent on the java environment.

yum install java-1.8*

This method is relatively simple and direct, but if we cannot install it, we need to check whether the environment is supported, or we can use manual deployment.

We first download the compilation package, then install and create the database picturebed in our environment, select utf8 as the character set and then import the picturebed.sql database. We tested on the Pagoda panel.

Then you need to search for tomcat in the application store of the pagoda panel and select the tomcat8 version to download and install.

Open application.properties and modify the connection information such as MySQL and server port to your server's information. (You can change the port number or not, as long as it is not occupied by other programs).

#Database account picturebedspring.datasource.username=root#Database password spring.datasource.password=root#Database link address spring.datasource.url=jdbc:mysql://localhost:3306/picturebed?useUnicode=true&characterEncoding=utf8&serverTimezone =GMT%2B8#Port server.port=8088Expression=0 30 04 * * ?

#The following configuration items do not need to be modified. mybatis.configuration.map-underscore-to-camel-case=truemybatis.mapper-locations=classpath:mapper/*.xmllogging.level.cn.hellohao.dao=debugspring.jackson.date-format=yyyy-MM-dd HH :mm:ssspring.jackson.time-zone=GMT+8spring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.datasource.type=com.alibaba.druid.pool.DruidDataSourcespring.thymeleaf.cache=falsemultipart .maxFileSize=10240KBmultipart.maxRequestSize=10240KBspring.thymeleaf.mode = LEGACYHTML5spring.http.multipart.location=/data/upload_tmp

jdk1.8 and mysql database, as well as configuration files, then we create a new javaweb directory under the system directory /home and put Tbed.jar and application.properties in the directory you just created on the server: /home/javaweb, Note that these two files must be in the same directory and cannot be separated.

After completion, we need to execute the command to start.

cd /home/javaweb

java -jar Tbed.jar

Then we can see the project information.

We need to release port 8088 if we need to set up a security group. Then the username and password are both admin and you can log in to the picture bed. The latest compilation package download address:

https://github.com/Hello-hao/Tbed/releases

If we need it, we can install and deploy our own free image bed program site, so that we can manage static files on the server or linked object storage.

Recommended site search: local IP, cheap domain name registration, server space rental, Hong Kong server, cheap domain name registration, domain name host server rental, domain name registration official website, free domain name, agency filing,

Use the Hellohao picture bed program to build a self-built picture storage platform, installation and demonstration

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码