Build a personal picture bed cloud disk—Simple deployment and remote access configuration of EasyImage

1 Introduction

A good image bed is the key to the stable display of website or article images. However, many image beds are either unstable or charge a fee, causing the website or article images to often hang up. The author has also encountered this problem. In order to display my pictures stably, I plan to use cpolar intranet penetration + EasyImage combination to build a picture bed website to avoid the problem of pictures not being displayed.

2. EasyImage website construction

EasyImage is a free and open source image hosting program. Although it is an open source program, its functions are not weak at all. It not only supports multiple file uploads, text/picture watermarks, API and porn detection, but also custom codes. , the most important thing is that it does not force the use of database operation, which brings great convenience to our deployment and maintenance. Now, let's get started.

2.1. EasyImage download and installation

First, we download the compressed package of EasyImage. You can find the download address on the official website:

20230428105101

20230428105102

After downloading the compressed package of the website file, decompress it and paste all the decompressed files into phpstudy WWW文件夹.

20230428105103

20230428105104

Next, we open the main page of phpstudy and click 网站the button to enter the website settings page. Click on the upper left corner of the website settings page 创建网站.

20230428105105

Since EasyImage does not rely on a database to run, as long as you set up 域名, 端口, 网站根目录, and php版本several items, you can click 确认the button at the bottom of the website settings page to save the settings and generate the EasyImage website. It should be noted that EasyImage relies on PHP7+ and above to run, and the author chose php7.2.9.

Then, we only need to open the set EasyImage website (you can right-click the website entry in phpstudy, or you can enter localhost:port number in the browser to open the website) to enter the EasyImage installation page. EasyImage will automatically check the website installation environment and install After the environment self-check passes, you can click Next to continue setting up the administrator account.

20230428105106

20230428105107

There is nothing to say about the administrator account settings. Just remember the login name and password, and then click the 开始安装button at the bottom of the page to automatically install the EasyImage website. After a short time, the installation completion notification will be displayed after the EasyImage installation is completed.

20230428105108

2.2. EasyImage web page test

After EasyImage is installed locally, when we visit the EasyImage website locally, the login page will appear. After entering the corresponding login name and password, we can enter the EasyImage website.

20230428105109

20230428105110

2.3.cpolar installation and registration

After completing the deployment of the EasyImage website on the local computer, you can move to the installation of cpolar . Like the EasyImage website, installation of cpolar is also very simple. Just find the button directly on cpolar's official website page 下载and click to download the cpolar installation package.

cpolar official website: https://www.cpolar.com/

20230428105111

The author is using the Windows operating system, so I chose the Windows version to download.

After the Cpolar download is completed, decompress the downloaded compressed file, double-click the decompressed .msifile to automatically execute the installation program, and then Nextcomplete the installation all the way.

20230428105113

20230428105114

As a data tunnel software, cpolar will create an independent data tunnel for each user, supplemented by user passwords and token codes to ensure data security. Therefore, user registration is required before using cpolar. The registration process is very simple. Just click on the upper right corner of the cpolar homepage 用户注册and fill in the relevant information on the registration page to complete the registration.

20230428105115

20230428105116

3. Local web page publishing

After completing the installation of the EasyImage website and the installation and registration of the cpolar intranet penetration program, the recipient can use cpolar intranet penetration to create a public Internet address that can connect to the local EasyImage website, allowing us to access the local computer on the public Internet. EasyImage image bed website.

3.1.Cpolar cloud settings

As the author said at the beginning of this article, the image bed pays attention to stability, and the data tunnel of the cpolar free version is reset every 24 hours. The author does not want to reconnect every day, so I upgraded cpolar to the VIP version in order to obtain a long-term and stable intranet penetration data tunnel.

As a VIP customer, if you want to set up a data tunnel that can exist stably for a long time, you need to log in to cpolar's official website, find the "Reserve" button on the left side of the user's home page, and click to enter cpolar's data tunnel reservation page.

A public Internet address is generated here (can be regarded as the entrance of the data tunnel). Since this address is not connected to the local software output port at this time, it can also be regarded as a blank data tunnel.

20230428105117

On the reservation page, you can see many types of data tunnels that can be reserved. Here we select 保留二级子域名the field.

20230428105118

In the "Reserve second-level subdomain name" field, you need to make several simple settings of information, namely

  • 地区: The area where the server is located, just select the nearest one
  • 二级域名: Will eventually appear in the generated public Internet address as one of the identifiers of the network address
  • 描述: can be regarded as the description of this data tunnel, as long as it can be distinguished from other tunnels).

After completing these settings, you can click 保留the button on the right to retain this data tunnel.

20230428105119

Of course, if you no longer plan to use this data tunnel, you can click the "x" on the right to easily delete it and save valuable tunnel quota.

20230428105120

3.2 Cpolar intranet penetrates local settings

After completing the settings of the cpolar cloud and retaining the blank data tunnel, we return to the cpolar client on the local computer and connect the blank data tunnel generated by the cpolar cloud to the local EasyImage website, allowing us to access the local website on the public Internet EasyImage website.

Open and log in to the cpolar client on your local computer (you can enter it in the browser to localhost:9200access it directly, or you can click the cpolar client shortcut in the start menu).

20230428105121

隧道管理Click the button on the left side of the client's main interface 创建隧道to enter the local tunnel creation page (if you want to create a temporary data tunnel that does not reset the address for 24 hours, you can set it up directly here without logging in to the cpolar official website to set up a blank data tunnel).

On this page, you also need to make several information settings, which include:

1. 隧道名称 – 可以看做cpolar本地的隧道信息注释,方便我们区分本地建立的数据隧道;
2. 协议 – 由于EasyImage网站时网页显示,因此选择http协议;
3. 本地地址 – 本地地址即为EasyImage网站的输出端口号,我们已经将输出端口号设置为85,因此这里也填入85;
4. 域名类型 – 由于我们已经在cpolar云端预留了二级子域名的数据隧道,因此勾选“二级子域名”(如果预留的是自定义域名,则勾选自定义域名),并在下一行Sub Domain栏中填入预留的二级子域名,该例子中为“EasyImageweb”。
如果创建的是临时数据隧道,则直接勾选“随机域名”,由cpolar客户端自行生成公共互联网地址;
5. 地区 – 与cpolar云端预留的信息一样,我们依照实际使用地填写即可;

20230428105122

完成设置后,就可以点击页面下方的创建按钮,将cpolar云端的空白数据隧道,与本地EasyImage网站连接起来。

我们可以在“隧道管理”项下的“隧道列表”页面中,对这条数据隧道进行管理,包括开启、关闭或删除这条隧道,也可以点击“编辑”按钮,最这条数据隧道的信息进行修改。

20230428105123

4. 公网访问测试

最后,我们点击左侧状态项下的在线隧道列表按钮,在这里找到EasyImage网站的公共互联网地址,将这个地址粘贴到浏览器中,就能看到本地EasyImage网站。

20230428105124

20230428105125

5. 结语

The image server is one of the necessary conditions for us to build a website. For the author, being able to put the website server and the image server together can reduce a lot of the pressure of website maintenance. Moreover, placing the EasyImage website locally can also make the EasyImage website a private and exclusive image cloud disk. If necessary, the local EasyImage website can be turned into a public Internet image website, so that it will no longer be bothered by online image beds.

Article forwarded from CSDN remote intranet penetration: Private image bed - quickly build a simple EasyImage image bed locally and achieve remote access to the public network

Guess you like

Origin blog.csdn.net/fq157856469/article/details/132989561