First experience with DevHaoZi Linux panel: a niche practical Linux host panel

DevHaoZi panel uses OpenResty as the web server and is open source based on the Apache License 2.0 protocol. Haozi Linux panel is a small project on GitHub. Its function introduction just meets the needs of website building. Unlike other Linux host panels with a lot of fancy functions, the panel is practical. Install Haozi Linux panel and build a Linux environment.

Haozi Linux Panel is open source based on the Apache License 2.0 protocol.

yesA small project on the Internet, its functional introduction just meets the needs of website building, unlike otherThe host panel has a lot of fancy functions, but the panel is practical. Today I tested and installed Mouse, see if it can meet the Linux environment requirements for novice users to build a website as introduced.

Project website:https://github.com/DevHaoZi/Panel

Supported systems: RHEL8/9 series (CentOS Stream 8, 9 | RockyLinux 8 recommended, 9 | AlmaLinux8, 9)
Domestic dragon lizard Anolis, OpenCloudOS, Alibaba Cloud Linux3.x are theoretically compatible, but no special testing has been done

Install the Linux Panel

Environmental requirements:
System: Pure without built-in nginx and other environments, x86_64 architecture, 64-bit, smooth international network
Memory: 512M and above, more than 2G is recommended (the system occupies about 250M, OpenResty and the panel occupy about 150M, and MySQL8 occupies a minimum of about 300M)
Firewall port: open port 8888
During the panel installation, you need to compile the OpenResty components and the panel-specific PHP, which may take a long time depending on the server CPU performance.

Next, prepare the Google Cloud Linux server. Configure the server environment, update the system, and create a swap partition.

refer to:Google Cloud Server Configuration

Installation command of Mouse Linux panel:

wget -O install_panel.sh https://dl.panel.haozi.xyz/script/install_panel.sh && bash install_panel.shr

Version update:

panel update

Get user information (reset password):

panel getInfo

Remember to install firstdnf install wgetCommand, paste the installation command of the Mouse Linux panel, press Enter to enter the installation mode after downloading the installation script.

Enter Y and press Enter to install.

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

Then wait patiently for the script to install. The installation time is a bit long. You can have a cup of tea and wait...

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

The script has not finished running yet, keep waiting...

The installation process is a bit slow because it is a compilation installation, but it is finally installed. Next, log in to the panel.

Enter your IP address and port 8888, and access it in the browser. Remember to open port 8888 in the firewall, otherwise it will not be accessible.

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

The panel logged in successfully, but SSH login failed.

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

No wonder I can't log in through SSH. There is a system security menu in the Haozi Linux panel, but the firewall is enabled by default and the port is blocked. This design is a bit anti-human and unnecessary.

After decisively turning off the firewall, SSH login is normal. The file management function has not been fully developed yet and is just a decoration for the time being. SFTP is still required for uploading and downloading.

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

After installing the Haozi Linux Panel, PHP and MySQL are not installed by default and need to be installed in the plugin center. (It should be called the software center here, and the plugin will be mistaken for a PHP extension plugin.)

Install Mysql, PHP, etc. in the plugin center.

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

MySQL only supports the installation of 8.0. The memory requirement for installing MySQL 8.0 is not less than 4G. If your memory is 1G, you need to install MySQL 5.6. You can use SSH to log in to the server and install it on the server.

PHP can choose PHP7.4 or PHP8 series, and all Linux software are compiled and installed.

A rough experience of DevHaoZi Linux panel - a niche practical Linux host panel-1

Wait patiently for the installation! After installing MySQL, PHP, phpMyAdmin, and Redis, the requirements for building a website are basically met. The php extension is added in the management of PHP operations.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

Add PHP extensions. There are only a few for now. Install them all.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

Modify the MySQL root password in MySQL management and set a more complex password.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

After the MySQL password is changed, modify the initial configuration of PHP in the management behind PHP8.0

Modify the file upload size and change the configuration variables of PHP8.0 to the following values.

# file upload size, the default value is too small, it is recommended to modify the size of 1G, that is, 1024M: upload_max_filesize = 1024M # form maximum value, 1025M is recommended: post_max_size = 1025M

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

Modify the configuration in OpenResty management and change client_max_body_size to 1024M. The maximum file size that can be uploaded is 1G.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

Upload file size, just modify the value in PHP and OpenResty configuration.

Next, we will start to build the website.OpenRestyAs a web server.

OpenResty is a web platform based on Nginx that can run Lua scripts using its LuaJIT engine. The software was created by Zhang Yichun. Before 2011, it was initially sponsored by Taobao. From 2012 to 2016, it was mainly developed bySupport. Since 2017, it is primarily supported by the OpenResty Software Foundation and OpenResty Inc.

OpenResty official website:https://openresty.org/cn/

Use the Haozi Linux panel to build a WordPress website

In Website Management, click Add Website. In Add Website, enter the website configuration information.

Note: The website name can only be entered in English, not in Chinese. The website name is used to create the website storage directory.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

After the website is created, click Settings behind the website in the website list.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

In the website settings, click SSL and apply for an SSL domain name certificate first. Remember to resolve the domain name to the IP address of the server.

Click the main switch, click HTTP redirect, click HSTS, and then clickIssue free SSL certificatePlease note that you can only apply for one domain name when applying for an SSL certificate.Do not bind multiple domain names to one website.

Knowledge point: Understand what HSTS is?

HTTP Strict Transport Security (HSTS) is a set of Internet security policy mechanisms released by the Internet Engineering Task Force. Websites can choose to use HSTS policies to force browsers to use HTTPS to communicate with websites to reduce the risk of session hijacking.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

After SSL configuration is complete, set up pseudo-static and reverse proxy. If reverse proxy is not needed, you do not need to set it up.

Fill in the following content in pseudo static

 # pseudo-static page location / { try_files $uri $uri/ /index.php?$args; } # reverse proxy location /update32/ { proxy_redirect off; proxy_read_timeout 1200s; proxy_pass http://127.0.0.1:10086; proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Early-Data $ssl_early_data; }

Remember to save your settings after filling in the form.

First experience with DevHaoZi Linux panel: a niche practical Linux host panelThe website has been configured. Next, download the wordpress program and unzip it inWebsite Directorymiddle.

Since the file management function of the Haozi Linux panel is not yet complete, use SSH to log in to the server and download WordPress for installation.

#Use wget command to download wordpress installation package wget https://cn.wordpress.org/latest-zh_CN.tar.gz #Unzip wordpress installation package tar -xzvf latest-zh_CN.tar.gz #Copy the unzipped files to the website directory mv wordpress /www/wwwroot/mfccb #Copy the files in wordpress to the upper directory cp -ri /www/wwwroot/mfccb/wordpress/* /www/wwwroot/mfccb/ #Delete the wordpress folder rm -rf /www/wwwroot/mfccb/wordpress #Enter the mfccb directory cd /www/wwwroot/mfccb

Rename the wp-config-sample.php file to wp-config.php

cp wp-config-sample.php wp-config.php

Modify the configuration file

vi wp-config.php

The name of the WordPress database: define('DB_NAME', 'WordPress' );
MySQL database username: define('DB_USER', 'root' );
MySQL database password: define('DB_PASSWORD', 'mysql password' );
MySQL host: define('DB_HOST', '127.0.0.1' );

After the modification is completed, add the following code at the bottom of the wp-config.php file:

define( 'FS_CHMOD_DIR', 0751 ); define('WP_MEMORY_LIMIT', '256M');

After modifying wp-config.php, modify the directory permissions on the server.

chown -R www:www /www/wwwroot/mfccb

Create an empty database in the database. The database name should be the same as the WordPress database name you set above.

In the plug-in center of the Haozi Linux panel, click Management behind phpMyAdmin, which contains the web access address of phpMyAdmin.

Open phpMyAdmin and click on the left menuNew , create a new empty WordPress database.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

Then visit the website domain name you set previously in your browser.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

WordPress has been installed successfully. Now, configure WordPress and you can access the WordPress website.

First experience with DevHaoZi Linux panel: a niche practical Linux host panel

 

1/5 - (1 vote)

Leave a Reply

Your email address will not be published. Required fields are marked *