{"id":4495,"date":"2013-03-24T23:49:09","date_gmt":"2013-03-24T15:49:09","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=4495"},"modified":"2023-04-28T09:48:22","modified_gmt":"2023-04-28T09:48:22","slug":"how-to-configure-static-ip-address-on-centos-6-4","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-configure-static-ip-address-on-centos-6-4\/","title":{"rendered":"How to Configure Static IP Address on CentOS 6.4"},"content":{"rendered":"<p>When you run one or more of any type of Web, DNS, Email, FTP or any other application server&#8217;s directly on your site, then you are require Static IP address. If you run a website hosting in Virtual Private Server (VPS), end user will types the domain name (e.g www.example.com) into their web browser it is translated via a DNS service to a specific IP address of your web server. Rules of thumb, any type of server is mandatory to have static IP Address because it is constant, otherwise the end user or the websites visitors will experience inaccessible website. This post will share how to setup Static IP Address on CentOS 6.4.<\/p>\n<p>1. Configure static IP address on eth0 :<\/p>\n<pre>[root@centos64 ~]# vi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/pre>\n<p>Original :<\/p>\n<pre>DEVICE=eth0\nHWADDR=00:0C:29:F1:24:F0\nTYPE=Ethernet\nUUID=324bfeb3-2a7c-409c-98d0-5cf1607596c4\nONBOOT=no\nNM_CONTROLLED=yes\nBOOTPROTO=dhcp<\/pre>\n<p>Set to the following :<\/p>\n<pre>DEVICE=eth0\nHWADDR=00:0C:29:F1:24:F0\nTYPE=Ethernet\nUUID=324bfeb3-2a7c-409c-98d0-5cf1607596c4\nONBOOT=yes\nNM_CONTROLLED=yes\nBOOTPROTO=none\nIPADDR=192.168.2.62\nNETMASK=255.255.0.0<\/pre>\n<p>2. Configure gateway :<\/p>\n<pre>[root@centos64 ~]# vi \/etc\/sysconfig\/network<\/pre>\n<p>Add gateway line :<\/p>\n<pre>NETWORKING=yes\nHOSTNAME=centos64.ehowstuff.local\nGATEWAY=192.168.2.1<\/pre>\n<p>3. Configure DNS :<\/p>\n<pre>; generated by \/sbin\/dhclient-script\nsearch Belkin ehowstuff.local\nnameserver 192.168.2.1<\/pre>\n<p>Update to the following :<\/p>\n<pre>search ehowstuff.local\nnameserver 8.8.8.8<\/pre>\n<p>4. Restart network service to apply the changes :<\/p>\n<pre>\n[root@centos64 ~]# service network restart\nShutting down interface eth0: [ OK ]\nShutting down loopback interface: [ OK ]\nBringing up loopback interface: [ OK ]\nBringing up interface eth0: [ OK ]\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>When you run one or more of any type of Web, DNS, Email, FTP or any other application server&#8217;s directly on your site, then you are require Static IP address&#8230;.<\/p>\n","protected":false},"author":6,"featured_media":3845,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055],"tags":[1244,1255,1536],"class_list":["post-4495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos","tag-centos-6-4","tag-linux"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=4495"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4495\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/3845"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=4495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=4495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=4495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}