Install .NET 6.0 in CentOS system using cloud server

Install .NET 6.0 in CentOS system using cloud server

.NET SDK Download Link

https://dotnet.microsoft.com/download/dotnet/6.0

Installation Script

https://docs.microsoft.com/zh-cn/dotnet/core/install/linux-scripted-manual#manual-install

Installation Commands

Download dotnet-install.sh and switch to the download directory (wget downloads to the current path by default)

sh ./dotnet-install.sh -c 6.0

Installing .NET SDK via Snap (normal)

https://docs.microsoft.com/zh-cn/dotnet/core/install/linux-snap

I originally thought that script installation was the most convenient, but it was very annoying when the TCP connection was reset and I couldn't download. ET used .NET6.0, and CentOS 8 pre-installed .NET5.0 was useless, not to mention CentOS 7.6.

So I went back to try the Snap installation method and finally succeeded according to the official documentation https://snapcraft.io/docs/getting-started

The command steps are as follows:

$ snap version Check the snap version to see if it is pre-installed on the system. If it is pre-installed, you can skip these steps and install .NET directly.
$ cat /etc/centos-release Check the system version. The commands for CentOS7 and 8 are different.
$ sudo yum install epel-release Install EPEL repository
$ sudo yum install snapd Install snap
$ sudo systemctl enable --now snapd.socket Register snap's socket. I don't know what it is. Just follow the instructions.
$ sudo ln -s /var/lib/snapd/snap /snap Create a mapping directory in the root directory for easy access
$ sudo snap install snap-store Install snap store

After installing the store, you can happily install .NET6.0, which brings you one step closer to successful deployment. By the way, Windows Terminal is really good, beautiful and convenient, highly recommended!

In addition, MongoDB has some pitfalls. The mongodb.conf files in the online guides are all written in the old version. Some option parameters are not recognized, resulting in the failure to start the configuration file. After reading the official website document, I found that the new version has changed the format, as follows

#MongoDB configuration file storage:
   dbPath: "/www/server/mongodb/data"
systemLog:
   destination: file
   path: "/www/server/mongodb/logs/mongod.log"
   logAppend: true
   quiet: true
storage:
   Journal:
      enabled: true
processManagement:
   fork: true
net:
   bindIp: 127.0.0.1
   port: 27017
setParameter:
   enableLocalhostAuthBypass: false

After this configuration, you can start the MongoDB service normally using ./mongod --config /www/server/mongodb/etc/mongodb.conf .

This concludes this article on installing .NET 6.0 in CentOS system using cloud server. I hope it will be helpful for everyone’s study, and I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • The whole process of deploying asp.net core application Docker to centos7
  • Building .NET Core 2.0 + Nginx + Supervisor environment under Centos7 system
  • Graphical tutorial on deploying .Net Core to CentOS
  • Detailed explanation of deploying ASP.NET Core applications to production environments (CentOS7)

<<:  Detailed explanation of HTML area tag

>>:  How to optimize the slow Like fuzzy query in MySQL

Recommend

CentOS 8 is now available

CentOS 8 is now available! CentOS 8 and RedHat En...

CSS mimics remote control buttons

Note: This demo is tested in the mini program env...

How to configure Java environment variables in Linux system

Configure Java environment variables Here, the en...

W3C Tutorial (15): W3C SMIL Activities

SMIL adds support for timing and media synchroniz...

CSS3 uses animation attributes to achieve cool effects (recommended)

animation-name animation name, can have multiple ...

Detailed explanation of HTML basics (Part 1)

1. Understand the WEB Web pages are mainly compos...

Some lesser-known sorting methods in MySQL

Preface ORDER BY 字段名升序/降序, I believe that everyon...

Using Nginx to implement grayscale release

Grayscale release refers to a release method that...

How to implement interception of URI in nginx location

illustrate: Root and alias in location The root d...

Handwriting implementation of new in JS

Table of contents 1 Introduction to the new opera...

TypeScript uses vscode to monitor the code compilation process

Install Install ts command globally npm install -...

Several common methods of CSS equal height layout

Equal height layout Refers to the layout of child...

How to fix the footer at the bottom of the page (multiple methods)

As a front-end Web engineer, you must have encoun...

The principle and implementation of two-way binding in Vue2.x

Table of contents 1. Implementation process 2. Di...