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

How to use @media in mobile adaptive styles

General mobile phone style: @media all and (orien...

MySQL can actually implement distributed locks

Preface In the previous article, I shared with yo...

MySQL index usage monitoring skills (worth collecting!)

Overview In a relational database, an index is a ...

How to set a fixed IP address for a VMware virtual machine (graphic tutorial)

1. Select Edit → Virtual Network Editor in the me...

Installation and configuration tutorial of MySQL 8.0.16 under Win10

1. Unzip MySQL 8.0.16 The dada folder and my.ini ...

Tutorial on installing MySQL database and using Navicat for MySQL

MySQL is a relational database management system ...

Detailed explanation of monitoring NVIDIA GPU usage under Linux

When using TensorFlow for deep learning, insuffic...

How to use axios to filter multiple repeated requests in a project

Table of contents 1. Introduction: In this case, ...

WeChat applet implements simple calculator function

WeChat applet: Simple calculator, for your refere...

JavaScript destructuring assignment detailed explanation

Table of contents concept Array Destructuring Dec...

Docker primary network port mapping configuration

Port Mapping Before the Docker container is start...