avatar

superorange0707

  • Homepage
  • Tag
  • Category
Home Personal Blog Construction
文章

Personal Blog Construction

Posted 2022-05-28
6~8 min read

Personal website construction

Required: server, domain name, halo package and materials, software (terimus, transmit)

problem:can't access the ip address
reason:firewall
check the status of the firewall:firewall-cmd --state

temporarily close:systemctl stop firewalld.service

disable service:systemctl disable firewalld.service 

1.install the environment

1.1 java environment

yum install java-11-openjdk -y

1.2 install Nginx

1.Put the installation package (nginx-1.17.10.tar.gz) into the root directory

  1. Create and enter the nginx folder under /usr/local/
cd /usr/local/
mkdir nginx
cd nginx
#install repository
yum -y install pcre-devel
yum -y install openssl openssl-devel
  1. Unzip to the nginx folder, and compile and install the configure file in the directory nginx-1.17.10 that appears after unzipping

    cd nginx-1.17.10
    ./configure
    make && make install
    
  2. Enter the sbin folder in the nginx directory and execute the executable file nginx

cd /usr/local/nginx/sbin
./nginx
  1. Modify the nginx config file
cd /usr/local/nginx/conf

open file - nginx.conf

find the content about serve,add the targethat needs to be mapped(default port of local address of halo:8090):

    upstream blog{
        server 127.0.0.1:8090;
    }

modify the internal location of server:

        location / {
            proxy_pass http://blog;
            proxy_set_header HOST $host;
            proxy_set_header X-Forward-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
        }
1.3 bind the public ip and domain name

server:racknerd

domain name:reg123

Add DNS records in reg123 DNS control panel

Hostname: @(No need to add anything before the domain name)
ipaddress:the public ip of the server

2.run halo.jar

nohup java -jar halo-1.4.17.jar &

You can see the process number when you open it, or get it by querying (eg halo-1.4.17.jar)

ps -aux | grep "halo-1.4.17.jar"

you can change it to something running within “” after grep

close it with kill the process

kill -9 process number
CS Learning
Learning Source
Share

Further Reading

Jul 12, 2022

DSA-Learning-https://programmercarl.com/

DSA-LearningLearning Sourcehttps://leetcode.com/https://programmercarl.com/https://www.hackerrank.com/https://exercism.org/https://www.techinterviewha

Jun 19, 2022

Java Basic Note

Java Basic Learning Note1. Java Synax1.1 Data Type1.1.1 Java Integer TypesTypeStorageInt4 byteslong8 bytesshort2 bytesbyte1 byte1.1.2 Floating-Point T

Jun 16, 2022

Learning Souces.md

Learning Souces1.JAVAhttps://github.com/doocs/advanced-javahttps://r2coding.com/#/?id=%e7%bc%96%e7%a8%8b%e8%af%ad%e8%a8%80https://doocs.github.io/adva

OLDER

Fuzzy logic and system Notes

NEWER

Linear and Discrete Optimization Note

Recently Updated

  • Migrating Jenkins SCM Using GitLab from Bitbucket: SCM URL Bulk Replacement
  • 283 - Move Zero
  • 27 - Remove Element
  • 26 - Remove Duplicates from Sorted Array
  • Migrating from Bitbucket to GitLab? Here’s how to keep your teams moving without missing a beat!

Trending Tags

Course two pointer Binary Tree Hash SQL Leetcode Error Recording Gitlab Bitbucket Devops

Contents