{"id":6260,"date":"2022-02-14T12:41:09","date_gmt":"2022-02-14T18:41:09","guid":{"rendered":"https:\/\/www.knownhost.com\/kb\/?p=6260"},"modified":"2022-08-19T09:06:29","modified_gmt":"2022-08-19T14:06:29","slug":"installing-git-on-a-directadmin-centos-server","status":"publish","type":"post","link":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/","title":{"rendered":"Installing Git On A DirectAdmin CentOS Server"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_1 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #212121;color:#212121\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #212121;color:#212121\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#git_source_install\" >Git (Source Install)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<div class=\"kb-shortcode kb-shortcode_warning\">\n                    <div class=\"kb-shortcode-icon\">\n                        <i class=\"fa fa-exclamation-triangle fa-2x\"><\/i>\n                    <\/div>\n                    <div class=\"kb-shortcode-content_warning\"> Due to CentOS maintaing and providing the RPM&#8217;s for its service, 1.8 is the default version if installed by the OS.<\/div>\n                <\/div>\n\n\n\n<p>Git is available via yum and can be installed with the following command,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install git -y<\/code><\/pre>\n\n\n\n<p>You can now confirm git is installed using the following command,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git --version<\/code><\/pre>\n\n\n\n<p>Expected result should look like this,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;root@duplicate]# git --version\n<strong>git version 1.8.3.1<\/strong><\/code><\/pre>\n\n\n\n<p>You could quickly get up and running with Git via Yum, as demonstrated above. For most users, this is perfectly fine, but if there is some feature that you need that is only present in the later versions, you will need to install it from the source to have that feature.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"git-source-install\"><span class=\"ez-toc-section\" id=\"git_source_install\"><\/span>Git (Source Install)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"kb-shortcode kb-shortcode_warning\">\n                    <div class=\"kb-shortcode-icon\">\n                        <i class=\"fa fa-exclamation-triangle fa-2x\"><\/i>\n                    <\/div>\n                    <div class=\"kb-shortcode-content_warning\"> Version 2.28 requires asciidoc and xmlto packages and may require a 3rd party repo to install.<\/p>\n<p>We recommend using 2.26 for now with CentOS 7 unless you&#8217;re savvy with repo additions.<\/div>\n                <\/div>\n\n\n\n<p>To install from source, go ahead and log into your server via SSH as the root user.<\/p>\n\n\n\n<p>First, we&#8217;ll need to grab the latest available version,<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/git\/git\/archive\/v2.26.0.tar.gz\">github.com\/git\/git\/archive\/v2.26.0.tar.gz<\/a><\/p>\n\n\n\n<p>For other releases use: <a href=\"https:\/\/github.com\/git\/git\/releases\">github.com\/git\/git\/releases<\/a><\/p>\n\n\n\n<p>Left-click on the tar.gz link for that version and &#8216;<strong>Copy Link Location<\/strong>&#8216;. Now, back in the terminal, run the following commands (but change the wget url\/version accordingly for the version you are installing),<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install gettext-devel -y\ncd \/usr\/local\/bin\/\nwget https:\/\/github.com\/git\/git\/archive\/v2.26.0.tar.gz\ntar -zxf v2.26.0.tar.gz\ncd git-*\nmake configure\n.\/configure --prefix=\/usr\nmake all doc info\nmake install install-doc install-html install-info<\/code><\/pre>\n\n\n\n<p>Now confirm the version of git installed,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;root@duplicate git-2.26.0]# git --version\ngit version 2.26.0<\/code><\/pre>\n\n\n\n<p>You have successfully installed Git on CentOS server.<\/p>\n\n\n\n<p>Note that you can use Git itself from now onward to update Git, like so,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/bin\/\ngit clone https:\/\/github.com\/git\/git.git<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;root@duplicate bin]# git clone https:\/\/github.com\/git\/git.git\nCloning into 'git'...\nremote: Enumerating objects: 271307, done.\nremote: Total 271307 (delta 0), reused 0 (delta 0), pack-reused 271307\nReceiving objects: 100% (271307\/271307), 120.29 MiB | 12.03 MiB\/s, done.\nResolving deltas: 100% (201377\/201377), done.\n&#091;root@duplicate bin]# \n&#091;root@duplicate bin]# git --version\ngit version 2.26.0<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\"><span class=\"ez-toc-section\" id=\"conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now that we\u2019ve gone over installing Git on a DirectAdmin CentOS server. We have covered both the methods for installing Git as well as elaborating steps for updating Git from the existing Git itself.<\/p>\n\n\n\n<p>KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you with requests should you need our assistance. You\u2019re not using KnownHost for the best webhosting experience? Well, why not? Check with&nbsp;<a href=\"https:\/\/www.knownhost.com\/contact\">our Sales team<\/a>&nbsp;to see what can&nbsp;<a href=\"https:\/\/www.knownhost.com\/\">KnownHost<\/a>&nbsp;do for you in improving your webhosting experience.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git is available via yum and can be installed with the following command, You can now confirm git is installed using the following command, Expected result should look like this, You could quickly get up and running with Git via Yum, as demonstrated above. For most users, this is perfectly fine, but if there is [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[597,128,412,501],"class_list":["post-6260","post","type-post","status-publish","format-standard","hentry","category-directadmin","tag-centos","tag-directadmin","tag-git","tag-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Installing Git On A DirectAdmin CentOS Server - KnownHost<\/title>\n<meta name=\"description\" content=\"Deploy application based on Git. Learn more about installing Git on a DirectAdmin control panel CentOS server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing Git On A DirectAdmin CentOS Server - KnownHost\" \/>\n<meta property=\"og:description\" content=\"Deploy application based on Git. Learn more about installing Git on a DirectAdmin control panel CentOS server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\" \/>\n<meta property=\"og:site_name\" content=\"KnownHost\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-14T18:41:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-19T14:06:29+00:00\" \/>\n<meta name=\"author\" content=\"Somesh Z\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Somesh Z\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\"},\"author\":{\"name\":\"Somesh Z\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1\"},\"headline\":\"Installing Git On A DirectAdmin CentOS Server\",\"datePublished\":\"2022-02-14T18:41:09+00:00\",\"dateModified\":\"2022-08-19T14:06:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\"},\"wordCount\":358,\"keywords\":[\"centos\",\"directadmin\",\"git\",\"server\"],\"articleSection\":[\"DirectAdmin\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\",\"url\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\",\"name\":\"Installing Git On A DirectAdmin CentOS Server - KnownHost\",\"isPartOf\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/#website\"},\"datePublished\":\"2022-02-14T18:41:09+00:00\",\"dateModified\":\"2022-08-19T14:06:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1\"},\"description\":\"Deploy application based on Git. Learn more about installing Git on a DirectAdmin control panel CentOS server.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.knownhost.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing Git On A DirectAdmin CentOS Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/#website\",\"url\":\"https:\/\/www.knownhost.com\/kb\/\",\"name\":\"KnownHost\",\"description\":\"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1\",\"name\":\"Somesh Z\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g\",\"caption\":\"Somesh Z\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing Git On A DirectAdmin CentOS Server - KnownHost","description":"Deploy application based on Git. Learn more about installing Git on a DirectAdmin control panel CentOS server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/","og_locale":"en_US","og_type":"article","og_title":"Installing Git On A DirectAdmin CentOS Server - KnownHost","og_description":"Deploy application based on Git. Learn more about installing Git on a DirectAdmin control panel CentOS server.","og_url":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/","og_site_name":"KnownHost","article_published_time":"2022-02-14T18:41:09+00:00","article_modified_time":"2022-08-19T14:06:29+00:00","author":"Somesh Z","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Somesh Z","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#article","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/"},"author":{"name":"Somesh Z","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1"},"headline":"Installing Git On A DirectAdmin CentOS Server","datePublished":"2022-02-14T18:41:09+00:00","dateModified":"2022-08-19T14:06:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/"},"wordCount":358,"keywords":["centos","directadmin","git","server"],"articleSection":["DirectAdmin"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/","url":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/","name":"Installing Git On A DirectAdmin CentOS Server - KnownHost","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/#website"},"datePublished":"2022-02-14T18:41:09+00:00","dateModified":"2022-08-19T14:06:29+00:00","author":{"@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1"},"description":"Deploy application based on Git. Learn more about installing Git on a DirectAdmin control panel CentOS server.","breadcrumb":{"@id":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.knownhost.com\/kb\/installing-git-on-a-directadmin-centos-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knownhost.com\/kb\/"},{"@type":"ListItem","position":2,"name":"Installing Git On A DirectAdmin CentOS Server"}]},{"@type":"WebSite","@id":"https:\/\/www.knownhost.com\/kb\/#website","url":"https:\/\/www.knownhost.com\/kb\/","name":"KnownHost","description":"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/8b518f13cf69dd00d147e577d63ff3b1","name":"Somesh Z","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/276c97317c2d6905cc5a1bd9ceb10a0fd121cc4da22126f648fa88f95dcf32dd?s=96&d=mm&r=g","caption":"Somesh Z"}}]}},"_links":{"self":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/6260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/comments?post=6260"}],"version-history":[{"count":0,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/6260\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/media?parent=6260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/categories?post=6260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/tags?post=6260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}