SlideShare una empresa de Scribd logo
1 de 25
Centos Networking

         By
 Mohd yasin Abd Karim
   yasin@yasin.my
Connecting to the Network with
        NetworkManager
• The NetworkManager applet icon (upper left)
  shows that NetworkManager is running.
• Check for NetworkManager
• $ rpm -qa NetworkManager*
• Install NetworkManager
• # yum install NetworkManager-gnome
  NetworkManager-glib
• Start NetworkManager
• # service NetworkManager start
• # chkconfig NetworkManager on
Local Area Networks
• Planning, Getting, and Setting Up LAN hardware—
  This entails choosing a network topology, purchasing the
  equipment you need, and installing it (adding cards and
  connecting wires or using wireless antennas).

• Configuring TCP/IP —To use most of the networking
  applications and tools that come with Linux, you must
  have TCP/IP configured. TCP/IP lets you communicate
  not only with computers on your LAN, but also with any
  computers that you can reach on your LAN, modem, or
  other network connection (particularly via the Internet).
Is Your Ethernet Connection Up?
• Using the ifconfig command, you can determine
  whether your Ethernet (and other network
  interfaces) is up and running.
• # ifconfig
• # ifconfig eth0 up
• If your network interfaces are not running at all,
  you can try to start them from the network
  initialization script.
• # /etc/init.d/network restart
Watching LAN Traffic with
            Wireshark
• Wireshark Network Analyzer.
• # wireshark &
Setting Web Server
• The Apache Web Server (httpd)
• Others web server
  – Lighttpd
  – Tclhttpd
  – Thttpd
  – XSP – can run ASP.NET
  – Zope
Apache Server
• Make sure that Apache is installed
• $ rpm -qa | grep httpd
• A valid hostname is recommended if it is a
  public Apache server.
• can edit the /etc/httpd/conf/httpd.conf file
  and define the ServerName as your
  computer’s IP address.
Apache Server
• To make the Web Server available to your
  LAN, you can use your IP address instead
  of www.example.com (e.g., ServerName
  10.0.0.1). The :80 represents the port
  number (which is the default)
Apache Server
• Start the httpd server. As root user, type the
  following:
• # service httpd start
• To have httpd start every time you boot your
  system, run the command as root user.
• # chkconfig httpd on
• To make sure that the Web Server is working,
  open Firefox (or another Web browser),
• http://localhost/
• Check SELinux
Monitoring Server Activities
• adding the following lines to the /etc/httpd/conf/httpd.conf
  file:
   <Location /server-status>
   SetHandler server-status
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
   </Location>
   <Location /server-info>
   SetHandler server-info
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1
   </Location>
Analyzing Web-Server Traffic
• The webalizer package can take Apache
  log files and produce usage reports for
  your server.
• Those reports are created in HTML format
  so you can display the information
  graphically.
• # yum install webalizer
• # webalizer
• http://localhost/usage
MySQL
             Database Server
• You need at least the mysql and mysql-server
  packages installed
• mysql—This software package contains a lot of
  MySQL client programs (in /usr/bin)
• mysql-server—This software package contains
  the MySQL server daemon (mysqld) and the
  mysqld startup script (/etc/init.d/mysqld)
• mysql-devel—This software package contains
  libraries and header files required for developing
  MySQL applications.
MySQL
• If MySQL isn’t installed yet, type the
  following:
• # yum install mysql-server
• GUI software for connecting to a MySQL
  server
• # yum install mysql-administrator
• To launch the MySQL Administrator
  window, type mysql-administrator.
Starting the MySQL Server
• To start the MySQL server immediately,
• # service mysqld start
• To set the MySQL server to start each
  time the computer reboots
• # chkconfig mysqld on
Checking That MySQL Server Is
             Working
• # mysqladmin -u root -p version proc
• If the server were not running at the
  moment
• # service mysqld restart
Working with MySQL Databases
• The mysql_install_db command starts you
  off with two databases: mysql and test.
• Starting the mysql Command
• $ mysql -u root -p mysql
MySQL Command
• mysql> status
• To create a new database name, use the
  CREATE DATABASE
• mysql> CREATE DATABASE allusers;
• mysql> SHOW DATABASES;
• mysql> USE allusers;
Create table
•   mysql> CREATE TABLE name (
•   -> firstname varchar(20) not null,
•   -> lastname varchar(20) not null,
•   -> streetaddr varchar(30) not null,
•   -> city varchar(20) not null,
•   -> state varchar(20) not null,
•   -> zipcode varchar(10) not null
•   -> );
Insert/View Data
• mysql> INSERT INTO name
• -> VALUES (’Jerry’,’Wingnut’,’167 E
  Street’,
• -> ‘Roy’,’UT’,’84103’);
• mysql> SELECT * FROM name;
Displaying Selected Columns
• mysql> SELECT
  firstname,lastname,zipcode FROM name;
Sorting Data
• mysql> SELECT * FROM name ORDER
  BY lastname;
Updating and Deleting MySQL
            Records
• mysql> UPDATE name SET
  streetaddr="933 3rd Avenue" WHERE
  firstname="Chris";
• mysql> DELETE FROM name WHERE
  firstname="Chris";
Adding Users and Granting Access
• mysql> GRANT USAGE ON *.*
• -> TO yason@localhost IDENTIFIED BY
  “yason123";
• #mysql -u yason –p
• have no privilege to work with any of the
  databases
• mysql> GRANT
  DELETE,INSERT,SELECT,UPDATE ON
  allusers.*
• -> TO yason@localhost;
Opening Your Firewall
• Web Server—Port 80
• Mail Server—Port 25 (and possibly port 587)
• FTP Server—Ports 20 and 21
• DNS Server—Port 53 (if you’re supporting your
  own DNS)
• SSH Server—Port 22 (allows secure login
  service to administer the computer remotely or
  remote users to add Web content or other server
  content to the server)
Thank you
• http://www.yasin.my

Más contenido relacionado

La actualidad más candente

Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
Kuldeep Tiwari
 
Centos operating system
Centos operating systemCentos operating system
Centos operating system
Agbada
 

La actualidad más candente (20)

Linux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiLinux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbai
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)
 
Rhce ppt
Rhce pptRhce ppt
Rhce ppt
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
 
Linux Training Workshop
Linux Training WorkshopLinux Training Workshop
Linux Training Workshop
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux beginner's Workshop
Linux beginner's WorkshopLinux beginner's Workshop
Linux beginner's Workshop
 
Linux system administration
Linux system administrationLinux system administration
Linux system administration
 
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Rhel7 vs rhel6
Rhel7 vs rhel6Rhel7 vs rhel6
Rhel7 vs rhel6
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
Centos operating system
Centos operating systemCentos operating system
Centos operating system
 
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
 

Destacado

Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
B Sasi Kumar
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
Amandeep Kaur
 
Chapter 4 configuring and managing the dns server role
Chapter 4   configuring and managing the dns server roleChapter 4   configuring and managing the dns server role
Chapter 4 configuring and managing the dns server role
Luis Garay
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dns
Anand Grewal
 

Destacado (20)

Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
 
Configuring RAID 1 on CentOs
Configuring RAID 1 on CentOsConfiguring RAID 1 on CentOs
Configuring RAID 1 on CentOs
 
Building a Linux IPv6 DNS Server Project review PPT v3.0 First review
Building a Linux IPv6 DNS Server Project review PPT v3.0 First reviewBuilding a Linux IPv6 DNS Server Project review PPT v3.0 First review
Building a Linux IPv6 DNS Server Project review PPT v3.0 First review
 
Presentation
PresentationPresentation
Presentation
 
Dns
DnsDns
Dns
 
DNS (BIND) on CentOS
DNS (BIND) on CentOSDNS (BIND) on CentOS
DNS (BIND) on CentOS
 
Dns centos
Dns centosDns centos
Dns centos
 
70 640
70 64070 640
70 640
 
6421 b Module-03
6421 b Module-036421 b Module-03
6421 b Module-03
 
Seo2 india devang barot - google public dns
Seo2 india   devang barot - google public dnsSeo2 india   devang barot - google public dns
Seo2 india devang barot - google public dns
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
 
Chapter 4 configuring and managing the dns server role
Chapter 4   configuring and managing the dns server roleChapter 4   configuring and managing the dns server role
Chapter 4 configuring and managing the dns server role
 
Domain Name Server
Domain Name ServerDomain Name Server
Domain Name Server
 
How To Install CentOS 7
How To Install CentOS 7How To Install CentOS 7
How To Install CentOS 7
 
Presentation on dns
Presentation on dnsPresentation on dns
Presentation on dns
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNS
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
Domain Name System DNS
Domain Name System DNSDomain Name System DNS
Domain Name System DNS
 

Similar a 6. centos networking

Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Puppet Camp Charlotte 2015: Exporting Resources: There and Back AgainPuppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Puppet
 
Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016
Xavier Ashe
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring
Abhishek Kumar
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
franbow
 

Similar a 6. centos networking (20)

TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Puppet Camp Charlotte 2015: Exporting Resources: There and Back AgainPuppet Camp Charlotte 2015: Exporting Resources: There and Back Again
Puppet Camp Charlotte 2015: Exporting Resources: There and Back Again
 
Application and Server Security
Application and Server SecurityApplication and Server Security
Application and Server Security
 
Hadoop on osx
Hadoop on osxHadoop on osx
Hadoop on osx
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016Lateral Movement - Hacker Halted 2016
Lateral Movement - Hacker Halted 2016
 
Hosting Ruby Web Apps
Hosting Ruby Web AppsHosting Ruby Web Apps
Hosting Ruby Web Apps
 
An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring An Express Guide ~ Zabbix for IT Monitoring
An Express Guide ~ Zabbix for IT Monitoring
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Advanced data migration techniques for Amazon RDS
Advanced data migration techniques for Amazon RDSAdvanced data migration techniques for Amazon RDS
Advanced data migration techniques for Amazon RDS
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Getting started into mySQL
Getting started into mySQLGetting started into mySQL
Getting started into mySQL
 

Más de Mohd yasin Karim (6)

1. centos tutorial
1. centos tutorial1. centos tutorial
1. centos tutorial
 
Microsoft<sup>®</sup> office training
Microsoft<sup>®</sup> office trainingMicrosoft<sup>®</sup> office training
Microsoft<sup>®</sup> office training
 
Phpmyadmin administer mysql
Phpmyadmin administer mysqlPhpmyadmin administer mysql
Phpmyadmin administer mysql
 
Mysql workbench 5
Mysql workbench 5Mysql workbench 5
Mysql workbench 5
 
My sql administration
My sql administrationMy sql administration
My sql administration
 
Mysql an introduction
Mysql an introductionMysql an introduction
Mysql an introduction
 

6. centos networking

  • 1. Centos Networking By Mohd yasin Abd Karim yasin@yasin.my
  • 2. Connecting to the Network with NetworkManager • The NetworkManager applet icon (upper left) shows that NetworkManager is running. • Check for NetworkManager • $ rpm -qa NetworkManager* • Install NetworkManager • # yum install NetworkManager-gnome NetworkManager-glib • Start NetworkManager • # service NetworkManager start • # chkconfig NetworkManager on
  • 3. Local Area Networks • Planning, Getting, and Setting Up LAN hardware— This entails choosing a network topology, purchasing the equipment you need, and installing it (adding cards and connecting wires or using wireless antennas). • Configuring TCP/IP —To use most of the networking applications and tools that come with Linux, you must have TCP/IP configured. TCP/IP lets you communicate not only with computers on your LAN, but also with any computers that you can reach on your LAN, modem, or other network connection (particularly via the Internet).
  • 4. Is Your Ethernet Connection Up? • Using the ifconfig command, you can determine whether your Ethernet (and other network interfaces) is up and running. • # ifconfig • # ifconfig eth0 up • If your network interfaces are not running at all, you can try to start them from the network initialization script. • # /etc/init.d/network restart
  • 5. Watching LAN Traffic with Wireshark • Wireshark Network Analyzer. • # wireshark &
  • 6. Setting Web Server • The Apache Web Server (httpd) • Others web server – Lighttpd – Tclhttpd – Thttpd – XSP – can run ASP.NET – Zope
  • 7. Apache Server • Make sure that Apache is installed • $ rpm -qa | grep httpd • A valid hostname is recommended if it is a public Apache server. • can edit the /etc/httpd/conf/httpd.conf file and define the ServerName as your computer’s IP address.
  • 8. Apache Server • To make the Web Server available to your LAN, you can use your IP address instead of www.example.com (e.g., ServerName 10.0.0.1). The :80 represents the port number (which is the default)
  • 9. Apache Server • Start the httpd server. As root user, type the following: • # service httpd start • To have httpd start every time you boot your system, run the command as root user. • # chkconfig httpd on • To make sure that the Web Server is working, open Firefox (or another Web browser), • http://localhost/ • Check SELinux
  • 10. Monitoring Server Activities • adding the following lines to the /etc/httpd/conf/httpd.conf file: <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
  • 11. Analyzing Web-Server Traffic • The webalizer package can take Apache log files and produce usage reports for your server. • Those reports are created in HTML format so you can display the information graphically. • # yum install webalizer • # webalizer • http://localhost/usage
  • 12. MySQL Database Server • You need at least the mysql and mysql-server packages installed • mysql—This software package contains a lot of MySQL client programs (in /usr/bin) • mysql-server—This software package contains the MySQL server daemon (mysqld) and the mysqld startup script (/etc/init.d/mysqld) • mysql-devel—This software package contains libraries and header files required for developing MySQL applications.
  • 13. MySQL • If MySQL isn’t installed yet, type the following: • # yum install mysql-server • GUI software for connecting to a MySQL server • # yum install mysql-administrator • To launch the MySQL Administrator window, type mysql-administrator.
  • 14. Starting the MySQL Server • To start the MySQL server immediately, • # service mysqld start • To set the MySQL server to start each time the computer reboots • # chkconfig mysqld on
  • 15. Checking That MySQL Server Is Working • # mysqladmin -u root -p version proc • If the server were not running at the moment • # service mysqld restart
  • 16. Working with MySQL Databases • The mysql_install_db command starts you off with two databases: mysql and test. • Starting the mysql Command • $ mysql -u root -p mysql
  • 17. MySQL Command • mysql> status • To create a new database name, use the CREATE DATABASE • mysql> CREATE DATABASE allusers; • mysql> SHOW DATABASES; • mysql> USE allusers;
  • 18. Create table • mysql> CREATE TABLE name ( • -> firstname varchar(20) not null, • -> lastname varchar(20) not null, • -> streetaddr varchar(30) not null, • -> city varchar(20) not null, • -> state varchar(20) not null, • -> zipcode varchar(10) not null • -> );
  • 19. Insert/View Data • mysql> INSERT INTO name • -> VALUES (’Jerry’,’Wingnut’,’167 E Street’, • -> ‘Roy’,’UT’,’84103’); • mysql> SELECT * FROM name;
  • 20. Displaying Selected Columns • mysql> SELECT firstname,lastname,zipcode FROM name;
  • 21. Sorting Data • mysql> SELECT * FROM name ORDER BY lastname;
  • 22. Updating and Deleting MySQL Records • mysql> UPDATE name SET streetaddr="933 3rd Avenue" WHERE firstname="Chris"; • mysql> DELETE FROM name WHERE firstname="Chris";
  • 23. Adding Users and Granting Access • mysql> GRANT USAGE ON *.* • -> TO yason@localhost IDENTIFIED BY “yason123"; • #mysql -u yason –p • have no privilege to work with any of the databases • mysql> GRANT DELETE,INSERT,SELECT,UPDATE ON allusers.* • -> TO yason@localhost;
  • 24. Opening Your Firewall • Web Server—Port 80 • Mail Server—Port 25 (and possibly port 587) • FTP Server—Ports 20 and 21 • DNS Server—Port 53 (if you’re supporting your own DNS) • SSH Server—Port 22 (allows secure login service to administer the computer remotely or remote users to add Web content or other server content to the server)