DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Penetration Testing: A Comprehensive Guide
  • Understanding the Basics of Neural Networks and Deep Learning
  • Simple Privacy Tweaks: Fast and Effective Methods To Secure Your Personal Information
  • Risk Assessment Using Blockchain

Trending

  • Decoding Business Source Licensing: A New Software Licensing Model
  • How TIBCO Is Evolving Its Platform To Embrace Developers and Simplify Cloud Integration
  • Message Construction: Enhancing Enterprise Integration Patterns
  • How To Simplify Multi-Cluster Istio Service Mesh Using Admiral
  1. DZone
  2. Data Engineering
  3. IoT
  4. CentOS Minimal Installation Network Configuration

CentOS Minimal Installation Network Configuration

Kasia Gogolek user avatar by
Kasia Gogolek
·
Nov. 26, 12 · Tutorial
Like (1)
Save
Tweet
Share
88.82K Views

Join the DZone community and get the full member experience.

Join For Free

By default CentOS minimal install does not come with pre-configured network, here’s how to make it work:

$ ping google.com
ping: unknown host google.com

To fix this we’ll need to edit the set up for the ethernet. Let’s start with editing this file:

$ vim /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=x.x.x.x
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=y.y.y.y
DNS1=y.y.y.y
DNS2=y.y.y.y
USERCTL=yes
HWADDR='your mac address'

where x.x.x.x is your static ip, and y.y.y.y is your router ip

If you’re not sure what your mac address is, run this command

$ ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'

now edit the networks config and make sure you added the line below:

$ vi /etc/sysconfig/network

Add the line:

GATEWAY = y.y.y.y

Now restart the network interface:

$ /etc/init.d/networking restart

Now ping the router:

$ ping y.y.y.y
Request timeout for icmp_seq 0
64 bytes from y.y.y.y: icmp_seq=1 ttl=56 time=1.792 ms
Request timeout for icmp_seq 1
64 bytes from y.y.y.y: icmp_seq=3 ttl=56 time=1.790 ms
64 bytes from y.y.y.y: icmp_seq=4 ttl=56 time=1.762 ms

Looks good, now let’s see if we can see anything outside.

$ ping google.com
PING google.com (173.194.67.138) 56(84) bytes of data.
64 bytes from wi-in-f138.1e100.net (173.194.67.138): icmp_seq=1 ttl=49 time=7.88 ms
64 bytes from wi-in-f138.1e100.net (173.194.67.138): icmp_seq=2 ttl=49 time=7.35 ms
64 bytes from wi-in-f138.1e100.net (173.194.67.138): icmp_seq=3 ttl=49 time=7.13 ms

Now you can connect to the internet, and get all the packages you need.




Network

Published at DZone with permission of Kasia Gogolek, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Penetration Testing: A Comprehensive Guide
  • Understanding the Basics of Neural Networks and Deep Learning
  • Simple Privacy Tweaks: Fast and Effective Methods To Secure Your Personal Information
  • Risk Assessment Using Blockchain

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: