0

Hexo is one of the best static blog platform with a great Blog framework. It is powered by Node.js. It is equipped with lots of beautiful themes and plugins. It is an awesome markdown structure like Github markdown so that you can easily publish your posts with ease. It has great security and performance features makes it a powerful blog platform.

Step-1 (Install EPEL Repository)
# yum install epel-release
Step-2 (Install Required Packages)
# yum install nodejs nginx
Step-3 (Start the Ngnix Services)
# systemctl start nginx
Step-4 (Install the Hexo Blog)

Change the directory where you want to install the Hexo blog

# cd /usr/share/nginx/html/

Install the Hexo  using NPM based installers

# npm install hexo-cli -g
Step-5 (Initialize the the Hexo Blog)

Initialize the hexo blog into hexoblog folder

# hexo init hexoblog

Change the directory where you are going to install the Hexo blog

# cd hexoblog

Install the Hexo blog using NPM installers

# npm install
Step-6 (Working with Hexo Blog)

Start Hexo blog local server

# hexo server

Generate Hexo blog Static files

 # hexo generate

Deploy the Hexo blog

# hexo deploy

Create new Hexo blog article

# hexo new "a new post"

Publish new Hexo blog Article

# hexo publish articlename
Step-7 (Configure Hexo Blog with Nginx Web Server)
# vi /etc/nginx/conf.d/hexoblog.conf

Add the given lines

server {
listen 80;
server_name techbrown.com;
error_page 404 /404/;
location / {
root /usr/share/nginx/html/hexoblog;
index index.html;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
}
Step-8 (Restart the Nginx services)
# systemctl restart nginx
Step-9 (Start the Firewalld Services)
# systemctl start firewalld
Step-10 (Add the firewall Rule to Firewalld services)

Configure firewall for HTTP Services

# firewall-cmd --permanent --zone=public --add-service=http

Configure firewall for HTTPS Services

# firewall-cmd --permanent --zone=public --add-service=https

Configure firewall for SSH Services

# firewall-cmd --permanent --zone=public --add-service=ssh

Finally Reload the firewall

# firewall-cmd --reload
Step-11 (Restart the Firewalld services)
# systemctl restart firewalld
Step-12 (Enable the Required Services during Boot Time)

Enable the Nginx Services during Boot Time

# systemctl enable nginx

Enable the Firewalld Services during Boot Time

# systemctl enable firewalld

That’s all for now.

How to Install TTRSS Tiny Tiny RSS on CentOS / RHEL

Previous article

How to Install Apache Spark on Ubuntu / Debian

Next article

You may also like

Comments

Leave a reply

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

More in Linux