OpenBSD安装 - 未完待续...

发表于:2007-06-09来源:作者:点击数: 标签:
前言. 本意是想把这台机器装成一个透明代理,然后用mrtg监控端口流量和squid本身的一些信息,装来装去,有些乱套,:(。算了,装着玩吧,装成什么样算什么样吧。只是对OpenBSD不熟悉,用的人也少... 安装. 1.zlib ./configure make test make install 2.lib

前言.

本意是想把这台机器装成一个透明代理,然后用mrtg监控端口流量和squid本身的一些信息,装来装去,有些乱套,:(。算了,装着玩吧,装成什么样算什么样吧。只是对OpenBSD不熟悉,用的人也少...

安装.

1.zlib
  ./configure
  make test
  make install

2.libpng
  ./make -f scripts/makefile.std CC=gcc ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include
  ./make install -f scripts/makefile.std CC=gcc ZLIBLIB=/usr/local/lib ZLIBINC=/usr/local/include
  出现创建目录错误,不要理会就是。

3.GD
  ./configure 
  CC=gcc 
  CPPFLAGS="-I../zlib-1.2.1 -I../libpng-1.2.0"
  LDFLAGS="-L../zlib-1.2.1 -L../libpng-1.2.0"
  --disable-shared
  --without-freetype
  --without-jpeg
  ==============出现如下内容===========
  ** Configuration summary for gd 2.0.33:

   Support for PNG library:          yes
   Support for JPEG library:         no
   Support for Freetype 2.x library: no
   Support for Fontconfig library:   no
   Support for Xpm library:          no
   Support for pthreads:             yes
  ==================================
  make
  make install

4.mrtg
  ./configure

  --prefix=/home/app/mrtg

  --with-gd-lib=/usr/local/lib

  --with-gd-inc=/usr/local/include
  make
  make install

5.mysql
  ./configure

  --prefix=/home/app/mysql

  --with-zlib-dir=/usr/local

  --with-charset=gb2312
  make
  make install
  =================================================
  注意:要将的CPPFLAGS/LDFLAGS环境变量unset掉,如果你定义了的话。
  =================================================

6.apache
  ./configure --prefix=/home/app/www

7.php
  ./configure

  --prefix=/home/app/php
  --with-config-file-path=/home/app/php/etc
  --enable-sockets
  --with-mysql=/home/app/mysql
  --with-apache=/home/ftpuser/appsoft/apache_1.3.33
  --enable-track-vars

  make
  make install

8.apache(continue...)
  ./configure

  --prefix=/home/app/www
  --server-uid=www
  --server-gid=www
  --enable-module=so
  --enable-shared=max
  --enable-rule=SHARED_CORE
  --activate-module=src/modules/php4/libphp4.a

9.修理httpd.conf

  AddType application/x-httpd-php .php .phtml .php3

10.测试Apache和php的安装情况
  ~/htdocs/test.php

  #==测试脚本==
    phpinfo();
  ?>
  #==========

11.squid
  ./configure

  --prefix=/home/app/squid
  --enable-snmp
  --enable-gnuregex
  --enable-err-languages="Simplify_Chinese English"
  --disable-ident-lookups
  --disable-hostname-checks

12.mysql_auth
  配置mysql数据库
 
  配置mysql_auth.c文件:
  mysql_real_connect(&mysql, "gwsvr.richance.com.cn", "squidadmin", "bsd*squid","squid_users", 0, 0, 0)

原文转自:http://www.ltesting.net