亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1186 | 回復(fù): 0
打印 上一主題 下一主題

安裝DHCP服務(wù)器 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2005-04-03 20:07 |只看該作者 |倒序瀏覽
安裝DHCP服務(wù)器
  1、源程序下載地址是:ftp://ftp.isc.org/isc/dhcp/dhcp-3.0.tar.gz ,我們的版本是:dhcpd-3.0
  2、復(fù)制到:/usr/local/scr后解壓:tar zxvf dhcp-3.0.tar.gz
  3、cd /usr/local/src/dhcp-3.0.tar.gz
  4、./configure
  5、make(如果不是第一次編譯,先make clean)
  6、make install
  7、cp ./server/dhcpd.conf /etc
  8、編輯這個文件,看起來類似下面這樣:(要更改的地方用粗體標(biāo)出)
  # dhcpd.conf
  #
  # Sample configuration file for ISC dhcpd
  #
  # option definitions common to all supported networks...
  option domain-name "rd.21vianet.com";
  option domain-name-servers compaq.rd.21vianet.com;
  default-lease-time 86400;
  max-lease-time 172800;
  ddns-update-style ad-hoc;
  # If this DHCP server is the official DHCP server for the local
  # network, the authoritative directive should be uncommented.
  #authoritative;
  # Use this to send dhcp log messages to a different log file (you also
  # have to hack syslog.conf to complete the redirection).
  log-facility local7;
  # No service will be given on this subnet, but declaring it helps the
  # DHCP server to understand the network topology.
  # This is a very basic subnet declaration.
  subnet 211.99.223.0 netmask 255.255.255.224 {
    range 211.99.223.2 211.99.223.6;
    option routers 211.99.223.1;
  }
  # This declaration allows BOOTP clients to get dynamic addresses,
  # which we don't really recommend.
  #subnet 10.254.239.32 netmask 255.255.255.224   {
    # range dynamic-bootp 10.254.239.40 10.254.239.60;
    # option broadcast-address 10.254.239.31;
    # option routers rtr-239-32-1.example.org;
  #}
  # A slightly different configuration for an internal subnet.
  #subnet 10.5.5.0 netmask 255.255.255.224 {
  # range 10.5.5.26 10.5.5.30;
  # option domain-name-servers ns1.internal.example.org;
  # option domain-name "internal.example.org";
  # option routers 10.5.5.1;
  # option broadcast-address 10.5.5.31;
  # default-lease-time 600;
  # max-lease-time 7200;
  #}
  # Hosts which require special configuration options can be listed in
  # host statements. If no address is specified, the address will be
  # allocated dynamically (if possible), but the host-specific information
  # will still come from the host declaration.
  #host passacaglia {
  # hardware ethernet 0:0:c0:5d:bd:95;
  # filename "vmunix.passacaglia";
  # server-name "toccata.fugue.com";
  #}
  # Fixed IP addresses can also be specified for hosts. These addresses
  # should not also be listed as being available for dynamic assignment.
  # Hosts for which fixed IP addresses have been specified can boot using
  # BOOTP or DHCP. Hosts for which no fixed address is specified can only
  # be booted with DHCP, unless there is an address range on the subnet
  # to which a BOOTP client is connected which has the dynamic-bootp flag
  # set.
  #host fantasia {
  # hardware ethernet 08:00:07:26:c0:a5;
  # fixed-address fantasia.fugue.com;
  #}
  # You can declare a class of clients and then do address allocation
  # based on that. The example below shows a case where all clients
  # in a certain class get addresses on the 10.17.224/24 subnet, and all
  # other clients get addresses on the 10.0.29/24 subnet.
  
  #class "foo" {
  # match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
  #}
  #shared-network 224-29 {
  # subnet 10.17.224.0 netmask 255.255.255.0 {
  # option routers rtr-224.example.org;
  # }
  # subnet 10.0.29.0 netmask 255.255.255.0 {
  # option routers rtr-29.example.org;
  # }
  # pool {
  # allow members of "foo";
  # range 10.17.224.10 10.17.224.250;
  # }
  # pool {
  # deny members of "foo";
  # range 10.0.29.10 10.0.29.230;
  # }
  上面這個文件中后面都是注釋,是原來系統(tǒng)給你的配置做的例子,可以不要。當(dāng)然除非你用到它們,并且清楚它們的含義。
  9、建立空文件:touch /var/state/dhcp/dhcpd.leases空文件
  10、檢查內(nèi)核編譯選項:Networking options-----Packet socket: mmapped IO和Socket
Filtering選項是否被選中(不知道怎么看?看看前面的文章,用make menuconfig呀),如果沒有就需要重新編譯內(nèi)核了。
  11、route add -host 255.255.255.255 dev eth0
  12、roote add -host localhost dev eth0
  13、在/etc/rc.d/rc.local最后增加一行route add -host 255.255.255.255 dev eth0
  14、reboot系統(tǒng)
  15、用dhcpd命令啟動DHCP,用其他的機(jī)器試試看能不能自動配置網(wǎng)絡(luò)了。
(4) 安裝apache+mysql+php+gd+png+zlib+jpeg+freetype+sslmod
  這么一大堆東西為什么要一塊說呢?因為他們中間是有緊密聯(lián)系的,尤其是那個PHP,用到其他所有的模塊。要想PHP功能全,只能一步步來了。
  1、首先安裝MYSQL:從http://www.mysql.com/downloads/index.html下載自己覺得合適的版本。這里用3.23.42版本。
  2、進(jìn)入目錄/usr/local/src(這個以后就不用說了吧?)解壓縮:tar zxvf mysql-3.23.42.tar.gz
  3、cd mysql-3.23.42/
  4、configure --prefix=/usr/local/mysql
  5、make
  6、make install
  7、useradd mysql ; groupadd mysql ; su mysql ;(建立命名為mysql的用戶和組,并切換為mysql身份)
  8、scripts/mysql_install_db (建立數(shù)據(jù)庫結(jié)構(gòu))
  9、cd /usr/local/mysql/bin
  10、./safe_mysqld & (啟動了)
  11、./mysqladmin -u root password "new-password"(你的新密碼,記住MYSQL的密碼核系統(tǒng)密碼是獨立的,缺省是沒有密碼)
  12、用mysql程序試試看。
  下面的步驟都很程式化,我盡量簡潔地寫出。
  13、下載相關(guān)的軟件包:地址表格如下
  軟件     版本     地址
jpegsrc.v6b.tar.gz  6b
ftp://ftp.uu.net/graphics/jpeg
zlib.tar.gz 1.1.3
ftp://ftp.uu.net/graphics/png/src
freetype-2.0.8.tar.gz 2.0.8
http://www.freetype.org
libpng-1.0.10.tar.gz 1.0.10
ftp://ftp.uu.net/graphics/png/src
gd-1.8.4.tar.gz 1.8.4
http://www.boutell.com/gd
apache_1.3.23.tar.gz 1.3.23
http://www.apache.org
php-4.1.1.tar.gz 4.1.1
http://www.php.net
number4.tar.gz 4
http://www.php.net/extra
rsaref20.tar.Z 2.0
ftp://ftp.ai.mit.edu/pub/deberg
openssl-engine-0.9.6c.tar.gz 0.9.6c
http://www.openssl.org/source
mod_ssl-2.8.6-1.3.23.tar.gz 2.8.6
http://www.modssl.org
  下齊了就放在/usr/local/src目錄下,除了number4.tar.gz和rsaref20.tar.Z以外,其他一律用tar zxvf XXXX.tar.gz解壓縮。(過癮吧?)
  特殊的,rsaref20.tar.Z
需要先建立一個rsaref-2.0目錄,然后把rsaref20.tar.Z復(fù)制到改目錄下用tar zxvf
rsaref30.tar.Z釋放壓縮。Number4.tar.gz需要復(fù)制到php-4.1.1目錄內(nèi),然后用tar zxvf
number4.tar.gz解壓縮。
  下面的描述我想簡單一點,只寫出進(jìn)入目錄后執(zhí)行的命令。那些目錄都是釋放的時候自己建立的,如果你這些操作都在/usr/local/src
下面執(zhí)行,所有的目錄就都在這里面。最好按照順序執(zhí)行。再羅嗦一句:如果不是第一次編譯,一般情況請執(zhí)行一次make clean后再編譯。
  14、[jpeg-6b]:生成JPEG圖像的函數(shù)庫。
  ./configure
  make
  make test
  make install
  15、[zlib-1.1.3]:壓縮算法庫,是PNG和JPEG需要的
  make test
  make install
  16、[freetype-2.0.8]:字體庫,在圖像上使用字體的時候需要用到,
  ./configure --prefix=/usr/local
  make
  make install
  17、[libpng-1.0.10]:生成PNG圖像的函數(shù)庫
  cp scripts/makefile.linux makefile
  make test
  pngtest pngnow.png
  (如果都通過測試了,請繼續(xù)。否則,看看錯誤提示,改正錯誤)
  make install
  18、[gd-1.8.4]:GD庫,用來動態(tài)生成圖像用,這里主要是配合PHP生成圖像。
  編輯Makefile 文件:
  把下列行取消注釋符號(#):
  CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBPNG -DHAVE_LIBJPEG
  -DHAVE_LIBFREETYPE -DHAVE_LIBTTF
  LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm -lttf
  注釋下列行(增加#):
  CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
  LIBS=-lgd -lpng -lz -lm
  修改下列行:
  INCLUDEDIRS=-I. -I/usr/local/include/freetype2 -I/usr/include/X11
    -I/usr/X11R6/include/X11 -I/usr/local/include
     -I/usr/include/freetype
  保存后執(zhí)行:
  make
  make install
  19、[apache_1.3.23]:步驟一 ./configure --prefix=/usr/local/apache
  20、[php-4.1.1]:
  如果不是第一次安裝,請刪除:config.cache文件,然后執(zhí)行先執(zhí)行make clean
  接下來配置環(huán)境,輸入一個比較長的命令:
  ./configure
    --with-apache=/usr/local/src/apache_1.3.23
    --with-config-file-path=/local/apache/conf
    --with-enable-versioning
    --with-mysql=/usr/local/mysql
    --with-ftp
    --with-gd=/usr/local/src/gd-1.8.4
    --with-enabled-bcmath=yes
    --with-disable-debug
    --enable-memory-limit=yes
    --enable-track-vars
    --with-zlib
    --with-jpeg-dir=/usr/local/src/jpeg-6b
    --with-png-dir=/usr/local/src/libpng-1.0.10
    --with-freetype-dir=/usr//local/src/freetype-2.0.8
  當(dāng)然你也可以實現(xiàn)準(zhǔn)備一個含有上述命令的sh文件,這樣改起來方便些。我就是這樣做的。
  make
  make install
  21、[rsaref-2.0]:RSA加密模塊
  前面說過,這個目錄的釋放是特殊的,先見目錄后釋放,希望你是這樣做的。
  cp -rp install/unix local
  cd local
  make
  mv rsaref.a librsaref.a
  22、[openssl-engine-0.9.6c]:openssl引擎
  ./config -prefix=/usr/local/ssl -L`pwd`/../rsaref-2.0/local/ rsaref –fPIC
  make
  make test
  make install
  23、[mod_ssl-2.8.6-1.3.23]
  ./configure --with-apache=../apache_1.3.23
  24、[apache_1.3.23]步驟二
  ./configure --prefix=/usr/local/apache --enable-shared=ssl
     --enable-module=ssl --activate-module=src/modules/php4/libphp4.a
  make
  make certificate TYPE=custom(回答一些問題)
  make install
  25、收尾工作:
  編輯/usr/local/apache/conf/httpd.conf文件,增加一行:
  AddType application/x-httpd-php .php
  26、用命令/usr/local/apache/bin/apachectl configtest檢查一下配置文件的正確性。
  27、用/usr/lcoal/apache/bin/apachectl start啟動apache服務(wù)器
  28、在/usr/local/apache/htdocs建立一個test.php文件包含下列內(nèi)容:
  
    phpinfo();
  ?>
  29、在別的機(jī)器上用瀏覽器看一下這個機(jī)器:http://xxx.xxx.xxx.xxx/test.php會出現(xiàn)php的配置總匯,看看前面編譯的模塊都在不在。
  30、檢驗ssl很麻煩,需要用apachectl startssl啟動apache然后還要生成一大堆證書。這里就不討論了。
  31、把/usr/local/apache/bin/apachectl文件復(fù)制到/etc/rc.d/init.d中,然后在/etc/rc.d/rd3.d中建立個符號連接指向/etc/rc.d/init.d中的上述文件:
  ln -s ../init.d/apachectl S70apachectl
  這樣系統(tǒng)啟動的時候就可以自動啟動apache和她的哪一大堆模塊了。
  呼~~~~(喘口氣)到這里,就基本上完成了一個功能很全的WEB服務(wù)器系統(tǒng)了。
  (5)安裝 ftp 服務(wù)器
  (6)安裝 pop3服務(wù)器
  有的郵件服務(wù)器自己帶pop3功能(比如Qmail、Xmail),如果你用這幾種郵件服務(wù)器軟件,當(dāng)然就不用安裝pop3了。目前,常用的
郵件服務(wù)器里面不帶pop3的好象只有sendmail和postfix等少數(shù)幾種。這幾種郵件服務(wù)器軟件使用的都是系統(tǒng)用戶,而我們安裝的pop3也只
是對系統(tǒng)用戶的郵件進(jìn)行彈出操作的。這里我們使用的版本和下載地址是:
  qpopper4.0.3.tar.gz   
  http://www.eudora.com/qpopper_general/
  同樣的,把文件下載到/usr/local/src中,按照下列步驟安裝:
  tar zxvf qpopper4.0.3.tar.gz
  cd qpopper4.0.3
  ./configure
  make
  make install
  完成后,qpopper安裝在/usr/local/sbin中(如果你愿意把它放在其他地方,可以在前面用./configure
–prefix=/your_path指定),文件名叫作popper。通常情況下,popper是作為一個inetd(超級網(wǎng)絡(luò)服務(wù)進(jìn)程)的子進(jìn)程加載
的。這樣需要編輯文件/etc/inetd.conf并做下面改動: ...
  # POP3 mail server
  #pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d
  pop-3 stream tcp nowait root /usr/local/sbin/popper qpopper –s
  ...
  增加黑體的這一行,注釋掉原來的(上面這一行),注意,如果你的安裝路經(jīng)不同,記著改過來呀。然后,用下面的命令得到inetd的進(jìn)程號:
  ps –ax | grep inetd
  得到結(jié)果類似:
  248 ? S 0:00 inetd
  什么?哪個是進(jìn)程號?就是最前面那個數(shù)字。然后用下面的命令重新啟動inetd:
  kill –HUP 248
  用下面的命令看看pop3是不是啟動了。
  netstat -ln|grep 110
  如果結(jié)果是這樣,就恭喜了。
  tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
  這里還要補(bǔ)充一點,少數(shù)情況下,pop3進(jìn)程需要獨立的監(jiān)聽端口,也就是不作為inetd的子進(jìn)程裝載,上面過程需要做如下改動:
  ./configure的時候加上--enable-standalone參數(shù)。
  編輯/etc/inetd.conf不增加黑體一行,但需要注釋掉原來的pop-3一行(如果有的話)。
  啟動的時候,直接運行/usr/local/sbin/popper
xxx.xxx.xxx.xxx:110即可。后面的參數(shù)是本地需要幾監(jiān)聽的IP地址和端口。注意,沒有特殊需要,端口必須是110。最后要說的是:其實
最簡單的辦法就是用你使用的Linux發(fā)行包帶的pop3軟件,安裝的時候直接選上即可。


本文來自ChinaUnix博客,如果查看原文請點:http://blog.chinaunix.net/u/3865/showart_19239.html
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP