"Amazon Cloud Technology Product Review" event call for papers | Quickly build a private image bed based on Lightsail

Authorization statement: This article authorizes the official Amazon Cloud Technology article to forward and rewrite the rights, including but not limited to Amazon Cloud Technology official channels such as Developer Centre, Zhihu, self-media platforms, third-party developer media, etc.

background

I used a third-party image repository for my blog before, but it was suddenly banned. As a result, all images in the blog become invalid. So you still have to set up a picture bed service yourself and keep your own things by yourself. I happened to discover Lightpicture, a picture bed system, and I can build a picture bed server by myself. I just registered an AWS account before, and I have free server usage quota for EC2 and lightsail. I don’t have much to say to get started.

Buy a server

Here we choose to use Lightsail instead of EC2. The main reason is that Lightsail is simple to operate, does not require self-maintenance of the server, is relatively low-priced, and is suitable for individuals and small teams.

Log in to aws, we search in the consoleLightsail, enter the Lightsail console, click the "Create Instance" button to create an instance

Insert image description here

Entering the instance creation page, we mainly select the following:

  • Instance location
  • Instance image
  • Instance plan

Region selection: I use the default region directly here. If you want other regions, you can click "Change AWS Region and Availability Zone"Modify

Insert image description here

System image: I choose Linux/Unix here, Amazon Linux 2023

Insert image description here

Here we can also choose to pre-install the LAMP image, but later I want to install Pagoda to manage the website, so I will not choose LAMP here.

Insert image description here

Instance plan: We select the instance configuration here and you can see our newly registered account. The first three plans are free to use. Here you can choose the plan that suits you.

Insert image description here
Click to create an instance. After a while, we can see the instance in the console.
Insert image description here
Click Manage to enter the instance management page
Insert image description here
Insert image description here

Lightpicture
introduce

LightPicture is a lightweight enterprise team picture resource management system and picture bed system developed using thinkphp+vue.

Features
  • Cloud storage
    The storage driver is easy to expand, diversifies storage, supports local, Alibaba Cloud, Tencent Cloud Qiniu Cloud Object Storage

  • Multi-bucket management
    Supports multi-bucket storage, and can add multiple object storage buckets for management at the same time, with no upper limit

  • Easy to operate
    Supports multi-image upload, drag and drop upload, upload preview, full screen preview

  • Multi-person collaboration
    Multi-user management, group management; users in different groups control different buckets

  • Picture preview
    Powerful picture preview function, supports flipping pictures up and down, left and right, flat flip, zoom in and out, etc.

  • Permission Management
    Different user groups can be assigned different operation permissions to control their upload, deletion and viewing

  • Operation log
    Complete visual log function, recording all user operations to facilitate event traceability

Install the pagoda

We use the ssh tool to connect to the server and switch to theroot account

Pagoda provides a one-click installation script. We use the universal installation script for installation.

if [ -f /usr/bin/curl ];then curl -sSO https://download.bt.cn/install/install_panel.sh;else wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh;fi;bash install_panel.sh ed8484bec

Other installation scripts are also provided here. You can choose the appropriate installation script according to your own system.

Insert image description here

Run the installation script, follow the prompts to install, and wait for the installation to complete.

Insert image description here
Insert image description here
Release port 24333 on the server
Insert image description here

Visit the pagoda external network address prompted after the successful installation just now, and install the LNMP package

Insert image description here

Deploy Lightpicture
  • Download Lightpicture
    The latest version is V1.2.2. We download the code to the server
    Switch to the website directory, download the code and unzip it a>
cd /www/wwwroot

wget  https://github.com/osuuu/LightPicture/archive/refs/tags/v1.2.2.tar.gz

tar -zxvf v1.2.2.tar.gz

Insert image description here

  • Create site

Create a site in the Pagoda panel.

Create a MySQL database. Here you need to set the account and password of the database yourself. For the PHP version, select PHP-72 or above. If not, you need to go to the software store of Pagoda Panel to install it.
Insert image description here
After creating the site, modify the running directory to /public
Insert image description here
Configure pseudo-static rules
Insert image description here

Set the default document of the website to index.html, and put index.html in the default document on the first line
Insert image description here
Visit: http://domain name/install, follow the page prompts, Click Next to fill in the data information you filled in when creating the website
Insert image description here
After the installation is completed, the default account password is admin 123456. Remember to change the default account password after logging in

Insert image description here
Insert image description here

We log in to the website and upload the image
After uploading the image, we can see the access address of the image displayed on the right. We can insert this address into the blog and use our Uploaded pictures.
Insert image description here

Click on the gallery to see all the pictures we uploaded and manage the pictures

Insert image description here

We can also change the storage bucket. The default is the local storage bucket. If you have other storage methods, you can add them, and then modify the storage bucket of the user role to upload the image to other places.

Insert image description here

Insert image description here

In this way, we have deployed an image bed management tool ourselves. We don’t need to use other third-party tools, and we don’t have to worry about the images becoming invalid.

Guess you like

Origin blog.csdn.net/hacks8/article/details/134525618