{"id":13938,"date":"2015-05-04T13:34:49","date_gmt":"2015-05-04T06:34:49","guid":{"rendered":"http:\/\/tom.ji42.com\/?p=13938"},"modified":"2015-05-04T13:34:49","modified_gmt":"2015-05-04T06:34:49","slug":"install-dhcp-server-%e0%b8%9a%e0%b8%99-ubuntu-12-04","status":"publish","type":"post","link":"https:\/\/tom.tomwork.net\/?p=13938","title":{"rendered":"install dhcp server \u0e1a\u0e19 ubuntu 12.04"},"content":{"rendered":"<p>\u0e17\u0e35\u0e48\u0e21\u0e32 :\u00a0<a href=\"http:\/\/askubuntu.com\/questions\/140126\/how-do-i-configure-a-dhcp-server\">http:\/\/askubuntu.com\/questions\/140126\/how-do-i-configure-a-dhcp-server<\/a><\/p>\n<ul>\n<li>\u0e01\u0e32\u0e23\u0e25\u0e07 dhcp server \u0e1b\u0e01\u0e15\u0e34 ubuntu \u0e08\u0e30\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 \u00a0sudo apt-get install dhcp3-server \u00a0 \u0e41\u0e15\u0e48 ubuntu \u00a0version 12.04 \u0e17\u0e33\u0e41\u0e1a\u0e1a\u0e19\u0e35\u0e49\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49 \u0e15\u0e49\u0e2d\u0e07\u0e17\u0e33\u0e15\u0e32\u0e21\u0e02\u0e49\u0e32\u0e07\u0e25\u0e48\u0e32\u0e07 \u0e14\u0e31\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<\/li>\n<li>\u0e40\u0e23\u0e34\u0e48\u0e21\u0e25\u0e38\u0e22\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 dhcp server =&gt; \u00a0sudo apt-get install isc-dhcp-server<\/li>\n<li>\n<pre><code>\u0e41\u0e01\u0e49\u0e44\u0e02 file isc-dhcp-server =&gt; sudo vim \/etc\/default\/isc-dhcp-server <\/code><\/pre>\n<\/li>\n<li>\n<pre><code>\u0e14\u0e39\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14\u0e2a\u0e38\u0e14\u0e17\u0e49\u0e32\u0e22 INTERFACES=\"eth0\" \u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e41\u0e01\u0e49\u0e2d\u0e30\u0e44\u0e23 \u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e02\u0e2d\u0e07\u0e17\u0e48\u0e32\u0e19\u0e40\u0e1b\u0e47\u0e19 eth \u0e40\u0e25\u0e02\u0e2d\u0e37\u0e48\u0e19 \u0e01\u0e47\u0e41\u0e01\u0e49\u0e43\u0e2b\u0e49\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e0a\u0e48\u0e19 eth1 eth2... \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e01\u0e47 save.<\/code><\/pre>\n<pre><code>#Defaults for dhcp initscript #sourced by \/etc\/init.d\/dhcp #installed at \/etc\/default\/isc-dhcp-server by the maintainer scripts # #This is a POSIX shell fragment # #On what interfaces should the DHCP server (dhcpd) serve DHCP requests? #Separate multiple interfaces with spaces, e.g. \u201ceth0 eth1?. INTERFACES=\u201deth0\"<\/code><\/pre>\n<\/li>\n<li>\u0e41\u0e01\u0e49\u0e44\u0e02 file dhcpd.conf =&gt; \u00a0sudo vim \/etc\/dhcp\/dhcpd.conf \u00a0\u0e41\u0e01\u0e49\u0e44\u0e02\u0e43\u0e2b\u0e49\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e02\u0e49\u0e32\u0e07\u0e25\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49 \u00a0\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27 save<\/li>\n<\/ul>\n<p><!--more-->ddns-update-style none;<\/p>\n<p>option domain-name \u201cpsu.ac.th\u201d;<\/p>\n<p>option domain-name-servers 192.168.xx.xx, 192.168.xx.xx;<\/p>\n<p>default-lease-time 600;<\/p>\n<p>max-lease-time 7200;<\/p>\n<p>log-facility local7;<\/p>\n<p>subnet 192.168.xx.0 netmask 255.255.255.0 {<\/p>\n<p>range 192.168.xx.100 192.168.xx.199;<\/p>\n<p>option routers 192.168.xx.1;<\/p>\n<p>}<\/p>\n<ul>\n<li>\u00a0\u0e40\u0e2a\u0e23\u0e47\u0e08\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e41\u0e25\u0e49\u0e27 \u00a0retart dhcp server =&gt;\u00a0sudo service isc-dhcp-server restart<\/li>\n<li>\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 dhcp server \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e41\u0e25\u0e49\u0e27\u0e04\u0e23\u0e31\u0e1a<\/li>\n<\/ul>\n<div>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-<\/div>\n<div><\/div>\n<div><\/div>\n<ul>\n<li>\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 report dhcp \u0e14\u0e39\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e01\u0e32\u0e23\u0e41\u0e08\u0e01 IP<\/li>\n<li>\u0e17\u0e35\u0e48\u0e21\u0e32\u00a0<a href=\"http:\/\/opensource.cc.psu.ac.th\/%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87_reportdhcp_%E0%B8%9A%E0%B8%99_ubuntu\">http:\/\/opensource.cc.psu.ac.th\/%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87_reportdhcp_%E0%B8%9A%E0%B8%99_ubuntu<\/a><\/li>\n<\/ul>\n<p>\u0e2b\u0e32\u0e01\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 apache + cgi \u0e43\u0e2b\u0e49\u0e17\u0e33\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<ul>\n<li>sudo apt-get install apache2 apache2-doc libapache2-mod-perl2<\/li>\n<li>sudo a2enmod cgi<\/li>\n<li>sudo \/etc\/init.d\/apache2 reload<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u0e43\u0e2b\u0e49\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14\u0e41\u0e1f\u0e49\u0e21 ftp:\/\/ftp.psu.ac.th\/pub\/omar\/reportdhcp.pl-2.1.tar.gz \u0e21\u0e32\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 \u0e17\u0e33\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n<ul>\n<li>wget ftp:\/\/ftp.psu.ac.th\/pub\/omar\/reportdhcp.pl-2.1.tar.gz -P \/tmp<\/li>\n<li>sudo tar -zxvf \/tmp\/reportdhcp.pl-2.1.tar.gz -C \/usr\/lib\/cgi-bin<\/li>\n<li>sudo chmod +x \/usr\/lib\/cgi-bin\/reportdhcp.pl<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u0e41\u0e25\u0e49\u0e27\u0e41\u0e01\u0e49\u0e44\u0e02\u0e41\u0e1f\u0e49\u0e21 \/usr\/lib\/cgi-bin\/reportdhcp.pl \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<br \/>\nsudo vim \/usr\/lib\/cgi-bin\/erportdhcp.pl<\/p>\n<p>\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14\u0e17\u0e35\u0e48 31,32,41 \u00a0\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e40\u0e14\u0e34\u0e21\u0e27\u0e48\u0e32<\/p>\n<p>my $dhcpfile = \u201c\/var\/state\/dhcp\/dhcpd.leases\u201d;<\/p>\n<p>my $dhcpdconf = \u201c\/etc\/dhcpd.conf\u201d;<\/p>\n<p>my $sysname = \u201cHarrisonburg DSL\u201d;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0e43\u0e2b\u0e49\u0e41\u0e01\u0e49\u0e44\u0e02\u0e40\u0e1b\u0e47\u0e19\u0e27\u0e48\u0e32<\/p>\n<p>my $dhcpfile = \u201c\/var\/lib\/dhcp\/dhcpd.leases\u201d;<\/p>\n<p>my $dhcpdconf = \u201c\/etc\/dhcp\/dhcpd.conf\u201d;<\/p>\n<p>my $sysname = \u201camnat psu pattani\u201d; (\u0e42\u0e14\u0e22 sysname \u0e04\u0e37\u0e2d\u0e0a\u0e37\u0e48\u0e2d\u0e02\u0e2d\u0e07 DHCP Server \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e40\u0e2d\u0e07\u0e40\u0e0a\u0e48\u0e19 PSU-DHCP for LRC \u0e40\u0e1b\u0e47\u0e19\u0e15\u0e49\u0e19<\/p>\n<p>&nbsp;<\/p>\n<p>\u0e17\u0e33\u0e41\u0e04\u0e48\u0e19\u0e35\u0e49 \u0e41\u0e25\u0e49\u0e27\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e1c\u0e25\u0e07\u0e32\u0e19\u0e17\u0e35\u0e48\u0e40\u0e27\u0e1a\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e27\u0e48\u0e32 http:\/\/localhost\/cgi-bin\/reportdhcp.pl<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e17\u0e35\u0e48\u0e21\u0e32 :\u00a0http:\/\/askubuntu.com\/questions\/140126\/how-do-i-configure-a-dhcp-server \u0e01\u0e32\u0e23\u0e25\u0e07 dhcp server \u0e1b\u0e01\u0e15\u0e34 ubuntu \u0e08\u0e30\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 \u00a0sudo apt-get install dhcp3-server \u00a0 \u0e41\u0e15\u0e48 ubuntu \u00a0version 12.04 \u0e17\u0e33\u0e41\u0e1a\u0e1a\u0e19\u0e35\u0e49\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49 \u0e15\u0e49\u0e2d\u0e07\u0e17\u0e33\u0e15\u0e32\u0e21\u0e02\u0e49\u0e32\u0e07\u0e25\u0e48\u0e32\u0e07 \u0e14\u0e31\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49 \u0e40\u0e23\u0e34\u0e48\u0e21\u0e25\u0e38\u0e22\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 dhcp server =&gt; \u00a0sudo apt-get install isc-dhcp-server \u0e41\u0e01\u0e49\u0e44\u0e02 file isc-dhcp-server =&gt; sudo vim \/etc\/default\/isc-dhcp-server \u0e14\u0e39\u0e1a\u0e23\u0e23\u0e17\u0e31\u0e14\u0e2a\u0e38\u0e14\u0e17\u0e49\u0e32\u0e22 INTERFACES=&#8221;eth0&#8243; \u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e41\u0e01\u0e49\u0e2d\u0e30\u0e44\u0e23 \u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e02\u0e2d\u0e07\u0e17\u0e48\u0e32\u0e19\u0e40\u0e1b\u0e47\u0e19 eth \u0e40\u0e25\u0e02\u0e2d\u0e37\u0e48\u0e19 \u0e01\u0e47\u0e41\u0e01\u0e49\u0e43\u0e2b\u0e49\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e0a\u0e48\u0e19 eth1 eth2&#8230; \u0e40\u0e2a\u0e23\u0e47\u0e08\u0e41\u0e25\u0e49\u0e27\u0e01\u0e47 save. #Defaults for dhcp initscript #sourced by \/etc\/init.d\/dhcp #installed at [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-13938","post","type-post","status-publish","format-standard","hentry","category-13"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6cOVM-3CO","_links":{"self":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/13938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13938"}],"version-history":[{"count":1,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/13938\/revisions"}],"predecessor-version":[{"id":13939,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/13938\/revisions\/13939"}],"wp:attachment":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}