Linux system deployment homer static home page

1. Homer introduction

1.1 Introduction to Homer

  • homer static home page is a very simple static HOM epage for your server, yaml keeps your service with a simple configuration file

1.2 homer features

  • yaml file configuration
  • installable (pwa)
  • search
  • group
  • theme customization
  • Offline health check
  • Keyboard shortcut: /Starts search. Escape stops searching. Enter opens the first matching result (respects the bookmark's _target attribute). Alt/Option+Enter opens the first matching result in a new tab.

2. Introduction to the local environment

2.1 Local Environment Planning

This practice is a personal test environment, and the operating system version is centos7.6.

hostname local P address operating system version kernel version python version
jeven 192.168.3.166 hundred 7.6 3.10.0-957.el7.x86_64 v16.17.0 3.6.8

2.2 Introduction to this practice

1. The deployment environment for this practice is a personal test environment;
2. Install the homer static homepage in the centos7.6 environment.

3. Check the local environment

3.1 Check the local operating system version

Check local OS version

[root@jeven ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

3.2 Check the system kernel version

Check system kernel version

[root@jeven ~]# uname -r
3.10.0-957.el7.x86_64

3.3 Check whether Node.js is installed in the system

Check if Node.js is installed on the system

[root@jeven ~]# node -v
-bash: node: command not found

4. Deploy the python3 environment

4.1 Install pyhton3

Install python3 directly using yum

 yum -y install python3

insert image description here

4.2 View python version

check python version

[root@jeven ~]# python3 -V
Python 3.6.8

5. Deploy homer static home page

5.1 Download the software package

Download the homer package

wget https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip

5.2 Create directory

New directory /data/homer

mkdir -p /data/homer && cd /data/homer/

5.3 Unzip the package

Unzip the downloaded homer package

unzip ~/homer.zip -d  /data/homer/

insert image description here

5.4 Copy the config.yml file

Rename the assets/config.yml.dist file to config.yml

cp assets/config.yml.dist assets/config.yml

insert image description here

5.5 Start the homer service

Start the homer service

python3 -m http.server 8010 &

5.6 Check service running status

  • Check the homer service running in the background
[root@jeven homer]# jobs
[1]+  Running                 python3 -m http.server 8010 &
  • Check service listening port
[root@jeven homer]# ss -tunlp |grep 8010
tcp    LISTEN     0      5         *:8010                  *:*                   users:(("python3",pid=47515,fd=3))

6. Visit homer static homepage

Access address: http://192.168.3.166:8010/Replace
the IP address with the IP address of your own server

insert image description here

7. Add URL

7.1 Stop the homer service

Stop the homer service, and query the homer service process as 47515 through the above ss command.

kill -15 47515

7.2 Modify the config.yml file

Modify the assets/config.yml file.

vim assets/config.yml

insert image description here

7.3 Start the homer service

Start the homer service

python3 -m http.server 8010 &

7.4 Access homer static homepage

Refresh the webpage to check that the URL has been added to the homer static homepage normally.

insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/jks212454/article/details/132089761