{"id":39,"date":"2025-11-15T02:35:38","date_gmt":"2025-11-15T02:35:38","guid":{"rendered":"https:\/\/blogs.giamkichsan.com\/?p=39"},"modified":"2025-11-15T02:54:47","modified_gmt":"2025-11-15T02:54:47","slug":"cai-net-8-tren-centos-stream-9","status":"publish","type":"post","link":"https:\/\/blogs.giamkichsan.com\/index.php\/2025\/11\/15\/cai-net-8-tren-centos-stream-9\/","title":{"rendered":"C\u00e0i .NET 8 tr\u00ean CentOS Stream 9"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>\u2705I. Ki\u1ec3m tra danh s\u00e1ch t\u1ea5t c\u1ea3 c\u00e1c repo \u0111ang b\u1eadt<\/strong><\/h2>\n\n\n\n<p>N\u1ebfu b\u1ea1n \u0111ang s\u1eed d\u1ee5ng m\u1ed9t m\u00f4i tr\u01b0\u1eddng desktop (GUI) nh\u01b0 GNOME, b\u1ea1n c\u00f3 th\u1ec3 m\u1edf Terminal d\u1ec5 d\u00e0ng qua c\u00e1c c\u00e1ch sau:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Ph\u01b0\u01a1ng ph\u00e1p 1: S\u1eed d\u1ee5ng Menu \u1ee8ng D\u1ee5ng<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Nh\u1ea5n v\u00e0o <strong>&#8220;Activities&#8221;<\/strong> ho\u1eb7c <strong>&#8220;Applications&#8221;<\/strong> (\u1edf g\u00f3c tr\u00ean c\u00f9ng b\u00ean tr\u00e1i c\u1ee7a m\u00e0n h\u00ecnh, t\u00f9y v\u00e0o phi\u00ean b\u1ea3n CentOS c\u1ee7a b\u1ea1n).<\/li>\n\n\n\n<li>T\u00ecm ki\u1ebfm &#8220;Terminal&#8221; trong \u00f4 t\u00ecm ki\u1ebfm.<\/li>\n\n\n\n<li>Nh\u1ea5p v\u00e0o <strong>Terminal<\/strong> \u0111\u1ec3 m\u1edf.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Ph\u01b0\u01a1ng ph\u00e1p 2: S\u1eed d\u1ee5ng ph\u00edm t\u1eaft<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ph\u00edm t\u1eaft m\u1eb7c \u0111\u1ecbnh<\/strong>: B\u1ea1n c\u00f3 th\u1ec3 nh\u1ea5n <code>Ctrl + Alt + T<\/code> \u0111\u1ec3 m\u1edf Terminal.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>II .Ki\u1ec3m tra version kho l\u01b0u tr\u1eef tr\u00ean m\u00e1y ch\u1ee7 centos<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2705II.1. Ki\u1ec3m tra danh s\u00e1ch t\u1ea5t c\u1ea3 c\u00e1c repo \u0111ang b\u1eadt<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf repolist\n<\/code><\/pre>\n\n\n\n<p>Ho\u1eb7c chi ti\u1ebft h\u01a1n:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf repolist all<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2705II.2. Ki\u1ec3m tra th\u00f4ng tin chi ti\u1ebft v\u1ec1 m\u1ed9t repo c\u1ee5 th\u1ec3<\/strong><\/h3>\n\n\n\n<p>V\u00ed d\u1ee5 ki\u1ec3m tra repo c\u1ee7a Microsoft (sau khi b\u1ea1n c\u00e0i \u0111\u1ec3 d\u00f9ng .NET):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf repoquery -a --info microsoft-*\n<\/code><\/pre>\n\n\n\n<p>Ho\u1eb7c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf config-manager --dump | grep -i microsoft -A 5\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2705 II.3. Ki\u1ec3m tra file c\u1ea5u h\u00ecnh repo trong th\u01b0 m\u1ee5c \/etc\/yum.repos.d\/<\/strong><\/h3>\n\n\n\n<p>Danh s\u00e1ch file repo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -l \/etc\/yum.repos.d\/\n<\/code><\/pre>\n\n\n\n<p>Xem n\u1ed9i dung file repo c\u1ee5 th\u1ec3, v\u00ed d\u1ee5:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/yum.repos.d\/microsoft-prod.repo\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2705 II.4. Ki\u1ec3m tra phi\u00ean b\u1ea3n repo b\u1eb1ng <code>dnf info<\/code><\/strong><\/h3>\n\n\n\n<p>V\u00ed d\u1ee5 ki\u1ec3m tra phi\u00ean b\u1ea3n repo GNU:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf info epel-release\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>II.5. N\u1ebf<\/strong>u b\u1ea1n c\u1ea7n ki\u1ec3m tra <strong>repo n\u00e0o ch\u1ee9a g\u00f3i .NET 8<\/strong>, d\u00f9ng:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf repoquery dotnet-sdk-8.0 --repoid=\"*\"\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u2705 III C\u00e0i .NET 8 tr\u00ean <strong>CentOS Stream 9<\/strong><\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>C\u00c1CH 1 \u2014 C\u00e0i .NET 8 b\u1eb1ng Microsoft RPM repo (C\u00e1ch chu\u1ea9n, h\u1ed7 tr\u1ee3 CentOS Stream 9)<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. C\u00e0i \u0111\u1eb7t c\u00e1c g\u00f3i ph\u1ee5 thu\u1ed9c<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y wget tar libicu zlib\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Th\u00eam kho Microsoft cho CentOS 9<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rpm -Uvh https:\/\/packages.microsoft.com\/config\/rhel\/9\/prod.repo\n<\/code><\/pre>\n\n\n\n<p>CentOS 9 d\u00f9ng chung repo <strong>RHEL 9<\/strong>, n\u00ean repo n\u00e0y ho\u1ea1t \u0111\u1ed9ng t\u1ed1t.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. C\u00e0i .NET SDK 8.0<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y dotnet-sdk-8.0\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Ki\u1ec3m tra phi\u00ean b\u1ea3n<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>dotnet --version\n<\/code><\/pre>\n\n\n\n<p>K\u1ebft qu\u1ea3 s\u1ebd l\u00e0:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>8.0.x\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2705 <strong>C\u00c1CH 2 \u2014 C\u00e0i \u0111\u1eb7t t\u1eeb binary (n\u1ebfu repo b\u1ecb l\u1ed7i)<\/strong><\/h3>\n\n\n\n<p>Th\u00edch h\u1ee3p khi b\u1ea1n kh\u00f4ng mu\u1ed1n d\u00f9ng repo ho\u1eb7c g\u1eb7p l\u1ed7i dependency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. T\u1ea3i SDK .NET 8<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/download.visualstudio.microsoft.com\/download\/pr\/622ab06a-c3bc-4d57-b9b8-314b5a6403d7\/0b86d37ba909eb56d32f45f8719c5e66\/dotnet-sdk-8.0.100-linux-x64.tar.gz\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. T\u1ea1o th\u01b0 m\u1ee5c c\u00e0i \u0111\u1eb7t<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/usr\/share\/dotnet\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Gi\u1ea3i n\u00e9n .NET v\u00e0o th\u01b0 m\u1ee5c<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tar -xzf dotnet-sdk-8.0.100-linux-x64.tar.gz -C \/usr\/share\/dotnet\/\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Th\u00eam l\u1ec7nh dotnet v\u00e0o PATH<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ln -s \/usr\/share\/dotnet\/dotnet \/usr\/bin\/dotnet<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>\u2705I. Ki\u1ec3m tra danh s\u00e1ch t\u1ea5t c\u1ea3 c\u00e1c repo \u0111ang b\u1eadt N\u1ebfu b\u1ea1n \u0111ang s\u1eed d\u1ee5ng m\u1ed9t m\u00f4i tr\u01b0\u1eddng desktop (GUI) nh\u01b0 GNOME, b\u1ea1n c\u00f3 <a class=\"mh-excerpt-more\" href=\"https:\/\/blogs.giamkichsan.com\/index.php\/2025\/11\/15\/cai-net-8-tren-centos-stream-9\/\" title=\"C\u00e0i .NET 8 tr\u00ean CentOS Stream 9\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-centos-he-dieu-hanh"],"_links":{"self":[{"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":2,"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":58,"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/posts\/39\/revisions\/58"}],"wp:attachment":[{"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.giamkichsan.com\/index.php\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}