Use Typecho to build a personal blog website and penetrate the intranet to achieve public network access
Article directory
Preface
Typecho is a combination of the two words type and echo, which came from the brainstorming of the development team. Typecho is developed based on PHP5 and supports a variety of databases. It is a lightweight open source blog program with a strong core, easy expansion, user-friendly experience, and smooth operation. Choose Typecho to build a unique personal web log publishing platform and enjoy the joy of creation.
Why use the panel tool to install? Because the panel tool integrates the environment required for installation and greatly simplifies our installation difficulty. Combined with the cpolar tool, we can remotely access typecho even when we are outside.
The following introduces how to build a typecho personal blog website that can be accessed remotely through Linux centOS8 + pagoda panel tool + Cpolar intranet forwarding tool.
1. Installation environment
According to official requirements, you need to install PHP5.0 or above, open the panel software store, search for PHP, select 8.0 here, and then wait for the installation to complete
Next, install a web container, click on the panel website, install apache, and then wait for the installation to complete. If it is already installed, you can ignore it.
2. Download Typecho
Click on the panel terminal and enter the apache root directory:
cd /www/wwwroot
Then create a folder called typecho
mkdir typecho
Go to folder
cd typecho
Execute download command:
wget https://github.com/typecho/typecho/releases/latest/download/typecho.zip
After the download is successful, we can see the compressed package
Then unzip it to the current directory
unzip typecho.zip
3. Create a site
Click Website, create a web site, click Add Site, fill in the local address for the domain name: 127.0.0.1:8089, the port number can be specified by yourself, and for the root directory we choose the typecho directory we created above.
Select Finish and click Submit
4. Visit Typecho
After creating the site, we use Linux LAN ip+:8089, the port number we set above, access it in the browser, and you will see the Typecho welcome page
5. Install cpolar
Open the Pagoda Terminal command window and use the cpolar installation script:
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
token authentication
Log in to the cpolar official website www.cpolar.com, click on the left side验证
to view your authentication token, and then paste the token into the command line
cpolar authtoken xxxxxxx
Add services to the system
sudo systemctl enable cpolar
Start cpolar service
sudo systemctl start cpolar
Select security in the Pagoda panel. Then open port 9200
Then access the LAN IP to port 9200 and the cpolar management interface will appear.
Enter the account registered on the official website to log in to operate the tunnel.
6. Remote access Typecho
We create a random 8089 tunnel in the cpolar management interface:
- Tunnel name: Customizable, be careful not to repeat it
- Protocol: http
- Local address: 8089
- Port type: random domain name
- Region: China vip
Click Create
Then open the online tunnel list, view the public network address of the created tunnel, and copy the address
Open the browser and access it using the public address. Since the welcome page appears, it indicates success.
7. Fixed remote access address
You need to upgrade to the basic package or above to support the configuration of second-level subdomain names.
Log incpolar official website backend, click 预留
on the left dashboard, find < a i=4>, reserve a second-level subdomain name for the http tunnel. 保留二级子域名
- Region: Select server region
- Name: Fill in the second-level subdomain name you want to reserve (can be customized)
- Description: Notes, which can be customized
This example reserves a second-level subdomain namedtypechoTest
. After the subdomain name is successfully reserved, we copy the subdomain name and then configure it into the tunnel.
Log in to the cpolar web ui management interface. Click 隧道管理
——隧道列表
on the left dashboard, find the tunnel that needs to be configured with a second-level subdomain name (typecho tunnel in this example), and click < /span>编辑
Modify the tunnel information and configure the second-level subdomain name into the tunnel:
- Domain Type: Select instead
二级子域名
- Sub Domain: Fill in the second-level subdomain name we just reserved (in this case
typechoTest
)
After modification is completed, click更新
After the tunnel is updated successfully, click on 状态
——在线隧道列表
on the left dashboard. You can see that the public network address of the typechoTest tunnel has been updated to Second-level subdomain name, copy the public address.
Open the browser and let's test accessing the successfully configured second-level subdomain name. The test is successful and you can access it normally. Now, our only private second-level subdomain name in the entire network has been created.
8. Placement typecho
Click Start and click Next. If this problem occurs, let’s modify the permissions of the entire file.
Just modify the typecho permissions
chmod -R 777 /www/wwwroot/typecho
Then open the Pagoda panel and create a mysql database
Then change the database password to a password you can remember. The user name is root.
After modification, we add a database
After the addition is successful, add the database configuration information on the typecho page, fill in the information set above to create the database, and then click Confirm to start the installation.
Then set and create account information
The installation is successful. The username and password information appears on the page. You need to remember it, and then click below to access the control panel.
Now we can publish our personal blog and create whatever we want.
zGA-1700737870889)]
Then set and create account information
[External link pictures are being transferred...(img-XP3arET1-1700737870889)]
The installation is successful. The username and password information appears on the page. You need to remember it, and then click below to access the control panel.
[External link pictures are being transferred...(img-Vz96SSIe-1700737870889)]
Now we can publish our personal blog and create whatever we want.
[External link pictures are being transferred...(img-eZt8bkDB-1700737870890)]