Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1900844
  • 博文数量: 237
  • 博客积分: 9995
  • 博客等级: 中将
  • 技术积分: 2890
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-30 10:33
文章分类

全部博文(237)

文章存档

2011年(1)

2007年(59)

2006年(177)

我的朋友

分类: BSD

2006-04-30 15:52:35

FreeBSD全能服务器安装手册之底层软件安装篇

更新记录

2006年3月29日增加相应软件的介绍

##############################安装perl5.8.X#####################################

Perl介绍

Perl(Practical Extraction and Report Language)是一种脚本语言。 最初的设计者为拉里•沃尔(Larry Wall),它于1987年12月18日发表。Perl借取了C、sed、awk、shell scripting以及很多其他程序语言的特性。

Perl原名pearl。在这个语言官方发表前,拉里•沃尔发现已经有个程序语言“pearl”,便改变将这个程序语言的名字改成Perl。Perl这个名字,出现了一些backronym的建议,包括充满幽默感的“Pathologically Eclectic Rubbish Lister”。今日,“Practical Extraction and Report Language”出现了在很多有关Perl的资料里,包括官方的man pages。它的名字第一个字母大写(Perl)时就指这个程序语言,无大写字母(perl)时就指它的直译器。将Perl写成“PERL”是不适当的,所为它并非一个缩写字。

Perl具有动态语言的强大灵活的特性,并起提供了许多冗余语法,也因此获得了write-only的“美誉”,因为许多Perl程序的代码令人难以阅读。但Perl同样可以将代码书写得像Python等语言一样优雅。

Perl主要应用在Unix平台和网页中(PHP,CGI)。Perl拥有海量的模块支持,在解决问题时非常方便。CPAN是Perl模块的集中营。和C一样,在Perl界,难以读懂的程序码大赛是个有名的活动。近似难以读懂的程序码,但方向不同,Perl Poetry是可以被perl编译的诗。新的诗经通常会在Perl Monks (%20Poetry)网站发表。另一个Perl hackers的有趣活动是写JAPHs。

##############################################################################################################################################################

 

cd /usr/ports/lang/perl5.8

 

make WITH_DEBUGGING=yes \

WITH_GDBM=yes \

WITHOUT_PERL_MALLOC=yes \

WITHOUT_PERL_64BITINT=yes \

WITH_THREADS=yes \

ENABLE_SUIDPERL=yes

(注意:以上命令及参数是按行输入)

make test

make install

make clean

make rmconfig

rehash

perl -v

ps auwx|grep perl

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_perl5.8.txt

 

 

 

 

###############更改ports软件包的默认下载路径(因为只有安装了perl后才会有/etc/make.conf)#######

ee /etc/make.conf

 

添加

MASTER_SITE_OVERRIDE= \

ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp4.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp10.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp13.tw.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp3.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp5.jp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp.jaist.ac.jp/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR} \

ftp://ftp.freebsdchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}

 

(更改ports默认的下载路径,可以根据自己的实际情况进行设置)

rehash

 

 

################################安装openssl####################################

OpenSSL简介

OpenSSL项目是共同努力开发出来的一个健全的、商业级的、全开放的和开放源代码的工具包,实现安全套接层协议(SSL v2/v3)和传输层安全协议(TLS v1)以及形成一个功效完整的通用目的的加密技术库。该项目是由全世界范围内团体的志愿者管理着,他们使用因特网进行交流、策划和开发这个OpenSSL工具和相关的文档。

OpenSSL基于Eric A. Young 和 Tim J. Hudson开发的优秀的SSLeay库(~ariel/ssleay/)。OpenSSL工具包使用许可类似Apache,这意味着任何人在服从一些简单的许可协议下,可以免费的获取并且应用于商业、非商业目的。

##############################################################################################################################################################cd /usr/ports/security/openssl

make

make install

make clean

make rmconfig

rehash

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_openssl.txt

 

 

 

#################################安装web管理系统##############################

WEBMIN介绍

“Webmin 是一个基于 Web 的 Unix 系统管理界面。借助任何支持表格和表单的浏览器(和 File Manager 模块所需要的 Java),您就可以设置用户帐号、Apache、DNS、文件共享,等等。Webmin 包括一个简单的 Web 服务器和许多 CGI 程序,这些程序可以直接修改系统文件,比如 /etc/inetd.conf 和 /etc/passwd。Web 服务器和所有的 CGI 程序都是用 Perl 5 编写的,没有使用任何非标准 Perl 模块。”

Webmin 事实上可以运行于所有的类 Unix 平台,包括 Linux、AIX、HPUX、Solaris、OS X,等等。它具有一个 Web 前端,可以完成 Linux 中的诸多管理任务。它可以以本地方式或者远程方式运行于任意图形化浏览器中。Webmin 使用 SSL 来保证安全,防止侦听。当您学习 Linux 管理时,Webmin 将为您节省很多时间。Webmin 还可以帮您完成那些还不能自动执行的繁琐的任务。Webmin 是可扩展的。作者提供了一个开发向导,而且已经出现了一些第三方的模块。您也可以设计您自己的模块,以使 Webmin 永远可以按您的需要进行调整。

##############################################################################################################################################################

 

cd /usr/ports/sysutils/webmin

make

make install

make clean

make rmconfig

 

配置webmin(用户名、密码、端口等)

/usr/local/lib/webmin/setup.sh

 

启动webmin

/usr/local/etc/webmin/start

 

测试webmin

或

 

使webmin同系统一起启动

ee /etc/rc.conf

添加

webmin_enable="YES"

 

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_webmin.txt

 

 

 

#################################安装数据库mysql4.0############################

MySQL介绍

MySQL是一个开放源码的小型关系型数据库管理系统,开发者为MySQL AB公司。目前MySQL被广泛地应用在Internet上的中小型网站中。由于其体积小、速度快、总体拥有成本低,尤其是开放源码这一特点,许多中小型网站为了降低网站总体拥有成本而选择了MySQL作为网站数据库。

MySQL的特性

使用C和C++编写,并使用了多种编译器进行测试,保证源代码的可移植性

支持AIX、FreeBSD、HP-UX、Linux、Mac OS、Novell Netware、OpenBSD、OS/2 Wrap、Solaris、Windows等多种操作系统

为多种编程语言提供了API。这些编程语言包括C、C++、Eiffel、Java、Perl、PHP、Python、Ruby和Tcl等。

支持多线程,充分利用CPU资源

优化的SQL查询算法,有效地提高查询速度

既能够作为一个单独的应用程序应用在客户端服务器网络环境中,也能够作为一个库而嵌入到其他的软件中

提供多语言支持,常见的编码如中文的GB2312、GB18030、BIG5,日文的SJIS等都可以用作数据表名和数据列名

提供TCP/IP、ODBC和JDBC等多种数据库连接途径

提供用于管理、检查、优化数据库操作的管理工具

可以处理拥有上千万条记录的大型数据库

 

MySQL的应用

与其他的大型数据库例如Oracle、DB2、SQL Server等相比,MySQL自有它的不足之处,如规模小、功能有限(MySQL不支持视图(已经被列入5.1版的开发计划)、存储过程、事件等)等,但是这丝毫也没有减少它受欢迎的程度。对于一般的个人使用者和中小型企业来说,MySQL提供的功能已经绰绰有余,而且由于MySQL是开放源码软件,因此可以大大降低总体拥有成本。

 

目前Internet上流行的网站构架方式是LAMP(Linux+Apache+MySQL+PHP),即使用Linux作为操作系统,Apache作为Web服务器,MySQL作为数据库,PHP作为服务器端脚本解释器。由于这四个软件都是遵循GPL的开放源码软件,因此使用这种方式不用花一分钱就可以建立起一个稳定、免费的网站系统。

 

MySql管理

可以使用命令行工具管理MySQL 数据库(命令mysql 和 mysqladmin),你也可以从MySQL 的网站下载图形管理工具MySQL Administrator () 和 MySQL Query Browser ().

 

phpMyAdmin是由php写成的,很流行的开源web程序。

 

hpMyBackupPro, 也是由PHP写成的,可以创建和管理数据库。它可以创建伪cronjobs,可以用来自动在某个时间或周期备份MySQL 数据库

##############################################################################################################################################################

 

cd /usr/ports/databases/mysql40-server

make WITH_CHARSET=gbk \

WITH_XCHARSET=all \

SKIP_DNS_CHECK=yes \

BUILD_OPTIMIZED=yes \

BUILD_STATIC=yes

make install

make clean

make rmconfig

 

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_mysql40-server.txt

 

 

 

%%%%%%%%%%%%安装mysql40组件%%%%%%%%%%%%%%

cd /usr/ports/databases/p5-DBD-mysql40

make

make install

make clean

make rmconfig

 

%%%%%%%%%%%使mysql40和系统一起启动%%%%%%%%%%%

ee /etc/rc.conf

mysql_enable="YES"

 

%%%%%%%%%%启动mysql40%%%%%%%%%%%%%%%%%%%

/usr/local/etc/rc.d/mysql-server.sh start

 

%%%%%%%%%%%设置mysql40的密码%%%%%%%%%%%%%%

/usr/local/bin/mysqladmin -u root password 'password'

 

%%%%%%%%%%%测试数据库登陆%%%%%%%%%%%%%%%%

mysql -u root -ppassword

 

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_mysql40.txt

 

 

###############################安装expat2#####################################

cd /usr/ports/textproc/expat2

make

make install

make clean

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_expat2.txt

 

###############################安装web服务器apache1.33######################

APACHE介绍

Apache是一个历史悠久并且功能十分强大的WEB服务器,但其丰富的功能对于一个新手来说往往不知道从何下手。我个人感觉Apache的设计充分体现了模块化设计的优势,通过在动态模块加载(DSO)模式下的安装,任何子应用模块都可以通过配置文件的简单修改进行积木式的灵活配置。安装的过程可以从简单的静态html服务开始,一个模块一个模块的学习使用。从单纯的HTML静态服务(core),到复杂的动态页面服务(core + php, core + resin, core + php + mod_gzip, core + resin + mod_expire)。

##############################################################################################################################################################

 

 

cd /usr/ports/www/apache13

make

make install

make clean

 

%%%%%%%%%%%使apache和系统一起启动%%%%%%%%%%%

ee /etc/rc.conf

添加

apache_enable="YES"

 

%%%%%%%%%%%%更改apache的相应设置%%%%%%%%%%%

ee /usr/local/etc/apache/httpd.conf

change 330 

ServerAdmin you@your.address ==>ServerAdmin b.s.d@163.com 

change 348 

#ServerName  

添加             794  

AddLanguage zh-cn .zh-cn

添加             822  

AddCharset GB2312 .gb2312

添加            976

NameVirtualHost 192.168.0.205 (your hosts ip)

 

%%%%%%%%%%%%启动apache%%%%%%%%%%%%%%%%%

/usr/local/sbin/apachectl start

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_apache.txt

 

 

####################################安装php###################################

PHP介绍

 

PHP 的全名就蛮有趣的,它是一个递归的缩写名称,"PHP: Hypertext Preprocessor",打开缩写还是缩写。PHP 是一种 HTML 内嵌式的语言 (类似 IIS 上的 ASP)。而 PHP 独特的语法混合了 C、Java、Perl 以及 PHP 式的新语法。它可以比 CGI 或者 Perl 更快速的执行动态网页。

PHP 最初是在公元 1994 年 Rasmus Lerdorf 开始计划发展。在 1995 年以 Personal Home Page Tools (PHP Tools) 开始对外发表第一个版本。在这早期的版本中,提供了访客留言本、访客计数器等简单的功能。随后在新的成员加入开发行列之后,在 1995 年中,第二版的 PHP 问市。第二版定名为 PHP/FI(Form Interpreter)。PHP/FI 并加入了 mSQL 的支持,自此奠定了 PHP 在动态网页开发上的影响力。在 1996 年底,有一万五千个 Web 网站使用 PHP/FI;在 1997 年中,使用 PHP/FI 的 Web 网站成长到超过五万个。而在 1997 年中,开始了第三版的开发计划,开发小组加入了 Zeev Suraski 及 Andi Gutmans,而第三版就定名为 PHP3。

 

PHP3 跟 Apache 服务器紧密结合的特性;加上它不断的更新及加入新的功能;并且它几乎支持所有主流与非主流数据库;再以它能高速的执行效率,使得 PHP 在 1999 年中的使用网站超过了十五万!!它的源代码完全公开,在 Open Source 意识抬头的今天,它更是这方面的中流砥柱。不断地有新的函数库加入,以及不停地更新的活力,使得 PHP 无论在 UNIX 或是 Win32 的平台上都可以有更多新的功能。它提供丰富的函数,使得在程序设计方面有着更好的支持。

 

PHP 的第四代 Zend 核心引擎已经进入测试阶段。整个脚本程序的核心大幅改动,让程序的执行速度,满足更快的要求。在最佳化之后的效率,已较传统 CGI 或者 ASP 等程序有更好的表现。而且还有更强的新功能、更丰富的函数库。无论您接不接受,PHP 都将在 Web CGI 的领域上,掀起巅覆性的革命。对于一位专职 Web Master 而言,它将也是必修课程之一。

##############################################################################################################################################################

cd /usr/ports/lang/php4

make

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk

x                     Options for php4 4.4.2_1                       x

x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x

x x         [X] DEBUG      Enable debug                            x x

x x         [X] MULTIBYTE  Enable zend multibyte support           x x

x x         [X] IPV6       Enable ipv6 support                     x x

x x         [X] OPENSSL    Build static OpenSSL extension          x x

x x                                                                x x

tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu

x                       [  OK  ]       Cancel                        x

mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

make install

make clean

make rmconfig

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_php4.txt

 

 

 

###################################安装php扩展################################

cd /usr/ports/lang/php4-extensions

make (+  bz2)

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk

x                 Options for php4-extensions 1.0                    x

x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x

x x  [ ] BCMATH       bc style precision math functions            x x

x x  [ ] BZ2          bzip2 library support                        x x

x x  [ ] CALENDAR     calendar conversion support                  x x

x x  [ ] CRACK        crack support                                x x

x x  [X] CTYPE        ctype functions                              x x

x x  [ ] CURL         CURL support                                 x x

x x  [ ] DBA          dba support                                  x x

x x  [ ] DBASE        dBase library support                        x x

x x  [ ] DBX          dbx support                                  x x

x x  [ ] DIO          Direct I/O support                           x x

x x  [ ] DOMXML       DOM support                                  x x

x x  [ ] EXIF         EXIF support                                 x x

x x  [ ] FILEINFO     fileinfo support                             x x

x x  [ ] FILEPRO      filePro support                              x x

x x  [ ] FRIBIDI      FriBidi support                              x x

x x  [ ] FTP          FTP support                                  x x

x x  [ ] GD           GD library support                           x x

x x  [ ] GETTEXT      gettext library support                      x x

x x  [ ] GMP          GNU MP support                               x x

x x  [ ] ICONV        iconv support                                x x

x x  [ ] IMAGICK      ImageMagick support                          x x

x x  [ ] IMAP         IMAP support                                 x x

x x  [ ] INTERBASE    Interbase 6 database support (Firebird)      x x

x x  [ ] LDAP         OpenLDAP support                             x x

x x  [ ] MBSTRING     multibyte string support                     x x

x x  [ ] MCAL         Modular Calendar Access Library support      x x

x x  [ ] MCRYPT       Encryption support                           x x

x x  [ ] MCVE         MCVE support                                 x x

x x  [ ] MHASH        Crypto-hashing support                       x x

x x  [ ] MING         ming shockwave flash support                 x x

x x  [ ] MNOGOSEARCH  mnoGoSearch support                          x x

x x  [ ] MSSQL        MS-SQL database support                      x x

x x  [X] MYSQL        MySQL database support                       x x

x x  [ ] NCURSES      ncurses support (CLI only)                   x x

x x  [ ] ODBC         unixODBC support                             x x

x x  [ ] OPENSSL      OpenSSL support                              x x

x x  [ ] ORACLE       Oracle support                               x x

x x  [X] OVERLOAD     user-space object overloading support        x x

x x  [ ] PANDA        panda support                                x x

x x  [ ] PCNTL        pcntl support (CLI only)                     x x

x x  [X] PCRE         Perl Compatible Regular Expression support   x x

x x  [ ] PDF          PDFlib support (implies GD)                  x x

x x  [ ] PFPRO        PayFlow Pro support                          x x

x x  [ ] PGSQL        PostgreSQL database support                  x x

x x  [X] POSIX        POSIX-like functions                         x x

x x  [ ] PSPELL       pspell support                               x x

x x  [ ] READLINE     readline support (CLI only)                  x x

x x  [ ] RECODE       recode support                               x x

x x  [X] SESSION      session support                              x x

x x  [ ] SHMOP        shmop support                                x x

x x  [ ] SNMP         SNMP support                                 x x

x x  [ ] SOCKETS      sockets support                              x x

x x  [ ] SYBASE_CT    Sybase database support                      x x

x x  [ ] SYSVMSG      System V message support                     x x

x x  [ ] SYSVSEM      System V semaphore support                   x x

x x  [ ] SYSVSHM      System V shared memory support               x x

x x  [X] TOKENIZER    tokenizer support                            x x

x x  [ ] WDDX         WDDX support (implies XML)                   x x

x x  [X] XML          XML support                                  x x

x x  [ ] XMLRPC       XMLRPC-EPI support                           x x

x x  [ ] XSLT         XSLT Sablotron support                       x x

x x  [ ] YAZ          YAZ support (ANSI/NISO Z39.50)               x x

x x  [ ] YP           YP/NIS support                               x x

x x  [ ] ZIP          ZIP support                                  x x

x x  [X] ZLIB         ZLIB support                                 x x

tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu

x                       [  OK  ]       Cancel                        x

mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

 

make install

make clean

make rmconfig

cd /usr/local/etc

cp php.ini-dist php.ini

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_php4-extensions.txt

 

 

########################安装phpSysInfo基于php的系统监测#######################

PhpSysInfo简介

简介:PhpSysInfo是用php脚本编写的,能显示关于主机硬件及当前状态的信息。包括运行时间,CPU,内存,SCSI,IDE,PCI,网卡,软驱和显卡等各方面的信息。并且它还可以自定义语言和界面风格等相关内容。是基于web的查看界面。

##############################################################################################################################################################

 

cd /usr/ports/www/phpSysInfo/

make

make install

make clean

cd /usr/local/www/data/phpSysInfo/

cp config.php.new config.php

chown www:www config.php

(改变config.php的所属组和用户)

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_phpSysInfo.txt

 

%%%%%%%%%%%%%%%%%测试phpSysInfo%%%%%%%%%%%%%%%%%

 

 

####################安装phpmyadmin基于php的数据库web管理系统##################

phpMyAdmin是一个用PHP编写的,可以通过互联网控制和操作MySQL。通过phpMyAdmin可以完全对数据库进行操作,例如建立、复制/删除数据等等。

##############################################################################################################################################################

 

cd /usr/ports/databases/phpmyadmin/

make

 

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk

x                  Options for phpMyAdmin 2.8.0.2                    x

x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x

x x     [X] BZ2       bzip2 library support                        x x

x x     [X] GD        GD library support                           x x

x x     [ ] MYSQLI    Improved MySQL support                       x x

x x     [X] OPENSSL   OpenSSL support                              x x

x x     [X] PDF       PDFlib support (implies GD)                  x x

x x     [X] ZLIB      ZLIB support                                 x x

x x     [X] MCRYPT    MCrypt library support                       x x

x x     [X] MBSTRING  Multi-byte character-set string support      x x

tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu

x                       [  OK  ]       Cancel                        x

mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

 

 

make install

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk

x                   Options for php4-gd 4.4.2_1                      x

x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x

x x     [X] T1LIB     Include T1lib support                        x x

x x     [X] TRUETYPE  Enable TrueType string function              x x

x x     [ ] JIS       Enable JIS-mapped Japanese font support      x x

tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu

x                       [  OK  ]       Cancel                        x

mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

make clean

make rmconfig

 

 

%%%%%%%%%%%%%更改phpMyAdmin的配置%%%%%%%%%%%%

cd /usr/local/www/phpMyAdmin

chmod 755 config.inc.php

ee /usr/local/www/phpMyAdmin/config.inc.php

将84行 

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? 

改成 

$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)? 

[#将39行 

#$cfg['PmaAbsoluteUri'] = ' ';

#改成

#$cfg['PmaAbsoluteUri'] = ''; 

pkg_info

pkg_info | col -b > /usr/home/chb/pkg_info/pkg_info_phpmyadmin.txt ]

 

(我现在不建议更改39行的内容虽然phpMyAdmin提示更改!但并没有发现39行对phpMyAdmin的运行有影响!改不好反而使phpMyAdmin不能正常显示)

 

/* $Id: config.inc.php,v 2.53 2005/06/07 16:44:39 lem9 Exp $ */

// vim: expandtab sw=4 ts=4 sts=4:

 

/**

 * phpMyAdmin Configuration File

 *

 * All directives are explained in Documentation.html

 */

 

 

/**

 * Sets the php error reporting - Please do not change this line!

 */

if (!isset($old_error_reporting)) {

    error_reporting(E_ALL);

    @ini_set('display_errors', '1');

}

 

 

/**

 * Your phpMyAdmin url

 *

 * Complete the variable below with the full url ie

 *   

 *

 * It must contain characters that are valid for a URL, and the path is

 * case sensitive on some Web servers, for example Unix-based servers.

 *

 * In most cases you can leave this variable empty, as the correct value

 * will be detected automatically. However, we recommend that you do

 * test to see that the auto-detection code works in your system. A good

 * test is to browse a table, then edit a row and save it.  There will be

 * an error message if phpMyAdmin cannot auto-detect the correct value.

 *

 * If the auto-detection code does work properly, you can set to TRUE the

 * $cfg['PmaAbsoluteUri_DisableWarning'] variable below.

 */

$cfg['PmaAbsoluteUri'] = '';

 

 

/**

 * Disable the default warning about $cfg['PmaAbsoluteUri'] not being set

 * You should use this if and ONLY if the PmaAbsoluteUri auto-detection

 * works perfectly.

 */

$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;

 

/**

 * Disable the default warning that is displayed on the DB Details Structure page if

 * any of the required Tables for the relationfeatures could not be found

 */

$cfg['PmaNoRelation_DisableWarning']  = FALSE;

 

/**

 * The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If

 * at least one server configuration uses 'cookie' auth_type, enter here a

 * passphrase that will be used by blowfish. The maximum length seems to be 46

 * characters.

 */

$cfg['blowfish_secret'] = '';

 

/**

 * Server(s) configuration

 */

$i = 0;

// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].

// You can disable a server config entry by setting host to ''.

$i++;

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address

$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port

$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket

$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')

$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')

$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection

                                                    // (requires PHP >= 4.3.0)

$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings

                                                    // (this user must have read-only

$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"

                                                    // and "mysql/db" tables).

                                                    // The controluser is also

                                                    // used for all relational

                                                    // features (pmadb)

$cfg['Servers'][$i]['auth_type']     = 'http';    // Authentication method (config, http or cookie based)?

$cfg['Servers'][$i]['user']          = 'root';      // MySQL user

$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed

                                                    // with 'config' auth_type)

$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only

                                                    // this db is displayed in left frame

                                                    // It may also be an array of db-names, where sorting order is relevant.

$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname

 

$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features

                                                    // (see scripts/create_tables.sql)

                                                    //   - leave blank for no support

                                                    //     DEFAULT: 'phpmyadmin'

$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table

                                                    //   - leave blank for no bookmark support

                                                    //     DEFAULT: 'pma_bookmark'

$cfg['Servers'][$i]['relation']      = '';          // table to describe the relation between links (see doc)

                                                    //   - leave blank for no relation-links support

                                                    //     DEFAULT: 'pma_relation'

$cfg['Servers'][$i]['table_info']    = '';          // table to describe the display fields

                                                    //   - leave blank for no display fields support

                                                    //     DEFAULT: 'pma_table_info'

$cfg['Servers'][$i]['table_coords']  = '';          // table to describe the tables position for the PDF schema

                                                    //   - leave blank for no PDF schema support

                                                    //     DEFAULT: 'pma_table_coords'

$cfg['Servers'][$i]['pdf_pages']     = '';          // table to describe pages of relationpdf

                                                    //   - leave blank if you don't want to use this

                                                    //     DEFAULT: 'pma_pdf_pages'

$cfg['Servers'][$i]['column_info']   = '';          // table to store column information

                                                    //   - leave blank for no column comments/mime types

                                                    //     DEFAULT: 'pma_column_info'

$cfg['Servers'][$i]['history']       = '';          // table to store SQL history

                                                    //   - leave blank for no SQL query history

                                                    //     DEFAULT: 'pma_history'

$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables

                                                    // are up to date. This prevents compatibility

                                                    // checks and thereby increases performance.

$cfg['Servers'][$i]['AllowRoot']     = TRUE;        // whether to allow root login

$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use

                                     = '';

$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults

                                     = array();

 

 

$i++;

$cfg['Servers'][$i]['host']            = '';

$cfg['Servers'][$i]['port']            = '';

$cfg['Servers'][$i]['socket']          = '';

$cfg['Servers'][$i]['connect_type']    = 'tcp';

$cfg['Servers'][$i]['extension']       = 'mysql';

$cfg['Servers'][$i]['compress']        = FALSE;

$cfg['Servers'][$i]['controluser']     = '';

$cfg['Servers'][$i]['controlpass']     = '';

$cfg['Servers'][$i]['auth_type']       = 'config';

$cfg['Servers'][$i]['user']            = 'root';

$cfg['Servers'][$i]['password']        = '';

$cfg['Servers'][$i]['only_db']         = '';

$cfg['Servers'][$i]['verbose']         = '';

$cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql

$cfg['Servers'][$i]['bookmarktable']   = ''; // 'pma_bookmark'

$cfg['Servers'][$i]['relation']        = ''; // 'pma_relation'

$cfg['Servers'][$i]['table_info']      = ''; // 'pma_table_info'

$cfg['Servers'][$i]['table_coords']    = ''; // 'pma_table_coords'

$cfg['Servers'][$i]['pdf_pages']       = ''; // 'pma_pdf_pages'

$cfg['Servers'][$i]['column_info']     = ''; // 'pma_column_info'

$cfg['Servers'][$i]['history']         = ''; // 'pma_history'

$cfg['Servers'][$i]['verbose_check']   = TRUE;

$cfg['Servers'][$i]['AllowRoot']       = TRUE;

$cfg['Servers'][$i]['AllowDeny']['order']

                                       = '';

$cfg['Servers'][$i]['AllowDeny']['rules']

                                       = array();

 

$i++;

$cfg['Servers'][$i]['host']            = '';

$cfg['Servers'][$i]['port']            = '';

$cfg['Servers'][$i]['socket']          = '';

$cfg['Servers'][$i]['connect_type']    = 'tcp';

$cfg['Servers'][$i]['extension']       = 'mysql';

$cfg['Servers'][$i]['compress']        = FALSE;

$cfg['Servers'][$i]['controluser']     = '';

$cfg['Servers'][$i]['controlpass']     = '';

$cfg['Servers'][$i]['auth_type']       = 'config';

$cfg['Servers'][$i]['user']            = 'root';

$cfg['Servers'][$i]['password']        = '';

$cfg['Servers'][$i]['only_db']         = '';

$cfg['Servers'][$i]['verbose']         = '';

$cfg['Servers'][$i]['pmadb']           = ''; // 'phpmyadmin' - see scripts/create_tables.sql

$cfg['Servers'][$i]['bookmarktable']   = ''; // 'pma_bookmark'

$cfg['Servers'][$i]['relation']        = ''; // 'pma_relation'

$cfg['Servers'][$i]['table_info']      = ''; // 'pma_table_info'

$cfg['Servers'][$i]['table_coords']    = ''; // 'pma_table_coords'

$cfg['Servers'][$i]['pdf_pages']       = ''; // 'pma_pdf_pages'

$cfg['Servers'][$i]['column_info']     = ''; // 'pma_column_info'

$cfg['Servers'][$i]['history']         = ''; // 'pma_history'

$cfg['Servers'][$i]['verbose_check']   = TRUE;

$cfg['Servers'][$i]['AllowRoot']       = TRUE;

 

$cfg['Servers'][$i]['AllowDeny']['order']

                                       = '';

$cfg['Servers'][$i]['AllowDeny']['rules']

                                       = array();

 

// If you have more than one server configured, you can set $cfg['ServerDefault']

// to any one of them to autoconnect to that server when phpMyAdmin is started,

// or set it to 0 to be given a list of servers without logging in

// If you have only one server configured, $cfg['ServerDefault'] *MUST* be

// set to that server.

$cfg['ServerDefault'] = 1;              // Default server (0 = no default server)

$cfg['Server']        = '';

unset($cfg['Servers'][0]);

 

 

/**

 * Other core phpMyAdmin settings

 */

$cfg['OBGzip']                  = 'auto'; // use GZIP output buffering if possible (TRUE|FALSE|'auto')

$cfg['PersistentConnections']   = FALSE;  // use persistent connections to MySQL database

$cfg['ExecTimeLimit']           = 300;    // maximum execution time in seconds (0 for no limit)

$cfg['SkipLockedTables']        = FALSE;  // mark used tables, make possible to show

                                          // locked tables (since MySQL 3.23.30)

$cfg['ShowSQL']                 = TRUE;   // show SQL queries as run

$cfg['AllowUserDropDatabase']   = FALSE;  // show a 'Drop database' link to normal users

$cfg['Confirm']                 = TRUE;   // confirm 'DROP TABLE' & 'DROP DATABASE'

$cfg['LoginCookieRecall']       = TRUE;   // recall previous login in cookie auth. mode or not

$cfg['LoginCookieValidity']     = 1800;   // validity of cookie login (in seconds)

$cfg['UseDbSearch']             = TRUE;   // whether to enable the "database search" feature

                                          // or not

$cfg['IgnoreMultiSubmitErrors'] = FALSE;  // if set to true, PMA continues computing multiple-statement queries

                                          // even if one of the queries failed

$cfg['VerboseMultiSubmit']      = TRUE;   // if set to true, PMA will show the affected rows of EACH statement on

                                          // multiple-statement queries. See the read_dump.php file for hardcoded

                                          // defaults on how many queries a statement may contain!

$cfg['AllowArbitraryServer']    = FALSE;  // allow login to any user entered server in cookie based auth

 

// Left frame setup

$cfg['LeftFrameLight']        = TRUE;    // use a select-based menu and display only the

                                         // current tables in the left frame.

$cfg['LeftFrameTableSeparator']= '__';   // Which string will be used to generate table prefixes

                                         // to split/nest tables into multiple categories

$cfg['LeftFrameTableLevel']   = '1';     // How many sublevels should be displayed when splitting

                                         // up tables by the above Separator

$cfg['ShowTooltip']           = TRUE;    // display table comment as tooltip in left frame

$cfg['ShowTooltipAliasDB']    = FALSE;   // if ShowToolTip is enabled, this defines that table/db comments

$cfg['ShowTooltipAliasTB']    = FALSE;   // are shown (in the left menu and db_details_structure) instead of

                                         // table/db names. Setting ShowTooltipAliasTB to 'nested' will only

                                         // use the Aliases for nested descriptors, not the table itself.

 

$cfg['LeftDisplayLogo']       = TRUE;   // display logo at top of left frame

$cfg['LeftDisplayServers']    = FALSE;  // display server choice at top of left frame

$cfg['DisplayServersList']    = FALSE;  // server choice as links

 

// In the main frame, at startup...

$cfg['ShowStats']             = TRUE;   // allow to display statistics and space usage in

                                        // the pages about database details and table

                                        // properties

$cfg['ShowMysqlInfo']         = FALSE;  // whether to display the "MySQL runtime

$cfg['ShowMysqlVars']         = FALSE;  // information", "MySQL system variables", "PHP

$cfg['ShowPhpInfo']           = FALSE;  // information" and "change password" links for

$cfg['ShowChgPassword']       = FALSE;  // simple users or not

$cfg['SuggestDBName']         = TRUE;   // suggest a new DB name if possible (false = keep empty)

 

// In browse mode...

$cfg['ShowBlob']              = FALSE;  // display blob field contents

$cfg['NavigationBarIconic']   = TRUE;   // do not display text inside navigation bar buttons

$cfg['ShowAll']               = FALSE;  // allows to display all the rows

$cfg['MaxRows']               = 30;     // maximum number of rows to display

$cfg['Order']                 = 'ASC';  // default for 'ORDER BY' clause (valid

                                        // values are 'ASC', 'DESC' or 'SMART' -ie

                                        // descending order for fields of type

                                        // TIME, DATE, DATETIME & TIMESTAMP,

                                        // ascending order else-)

 

// In edit mode...

$cfg['ProtectBinary']         = 'blob'; // disallow editing of binary fields

                                        // valid values are:

                                        //   FALSE  allow editing

                                        //   'blob' allow editing except for BLOB fields

                                        //   'all'  disallow editing

$cfg['ShowFunctionFields']    = TRUE;   // Display the function fields in edit/insert mode

$cfg['CharEditing']           = 'input';

                                        // Which editor should be used for CHAR/VARCHAR fields:

                                        //  input - allows limiting of input length

                                        //  textarea - allows newlines in fields

$cfg['InsertRows']            = 2;      // How many rows can be inserted at one time

 

// For the export features...

$cfg['ZipDump']               = TRUE;   // Allow the use of zip/gzip/bzip

$cfg['GZipDump']              = TRUE;   // compression for

$cfg['BZipDump']              = TRUE;   // dump files

$cfg['CompressOnFly']         = TRUE;   // Will compress gzip/bzip2 exports on

                                        // fly without need for much memory.

                                        // If you encounter problems with

                                        // created gzip/bzip2 files disable

                                        // this feature.

 

// Tabs display settings

$cfg['LightTabs']             = FALSE;  // use graphically less intense menu tabs

$cfg['PropertiesIconic']      = TRUE;   // Use icons instead of text for the table display of a database (TRUE|FALSE|'both')

$cfg['PropertiesNumColumns']  = 1;      // How many columns should be used for table display of a database?

                                        // (a value larger than 1 results in some information being hidden)

 

$cfg['DefaultTabServer']      = 'main.php';

                                   // Possible values:

                                   // 'main.php' = the welcome page

                                   // (recommended for multiuser setups)

                                   // 'server_databases.php' = list of databases

                                   // 'server_status.php' = runtime information

                                   // 'server_variables.php' = MySQL server variables

                                   // 'server_privileges.php' = user management

                                   // 'server_processlist.php' = process list

$cfg['DefaultTabDatabase']    = 'db_details_structure.php';

                                   // Possible values:

                                   // 'db_details_structure.php' = tables list

                                   // 'db_details.php' = sql form

                                   // 'db_search.php' = search query

                                   // 'db_operations.php' = operations on database

$cfg['DefaultTabTable']       = 'tbl_properties_structure.php';

                                   // Possible values:

                                   // 'tbl_properties_structure.php' = fields list

                                   // 'tbl_properties.php' = sql form

                                   // 'tbl_select.php = select page

                                   // 'tbl_change.php = insert row page

 

/**

 * Export defaults

 */

 

$cfg['Export']['format']                    = 'sql';  // sql/latex/excel/csv/xml/xls/htmlexcel/htmlword

$cfg['Export']['compression']               = 'none'; // none/zip/gzip/bzip2

 

$cfg['Export']['asfile']                    = FALSE;

$cfg['Export']['onserver']                  = FALSE;

$cfg['Export']['onserver_overwrite']        = FALSE;

$cfg['Export']['remember_file_template']    = TRUE;

 

$cfg['Export']['htmlexcel_columns']         = FALSE;

$cfg['Export']['htmlexcel_null']            = 'NULL';

 

$cfg['Export']['htmlword_structure']        = TRUE;

$cfg['Export']['htmlword_data']             = TRUE;

$cfg['Export']['htmlword_columns']          = FALSE;

$cfg['Export']['htmlword_null']             = 'NULL';

 

$cfg['Export']['xls_columns']               = FALSE;

$cfg['Export']['xls_null']                  = 'NULL';

 

$cfg['Export']['csv_columns']               = FALSE;

$cfg['Export']['csv_null']                  = 'NULL';

$cfg['Export']['csv_separator']             = ';';

$cfg['Export']['csv_enclosed']              = '"';

$cfg['Export']['csv_escaped']               = '\\';

$cfg['Export']['csv_terminated']            = 'AUTO';

$cfg['Export']['excel_columns']             = FALSE;

$cfg['Export']['excel_null']                = 'NULL';

$cfg['Export']['excel_edition']             = 'win'; // win/mac

 

$cfg['Export']['latex_structure']           = TRUE;

$cfg['Export']['latex_data']                = TRUE;

$cfg['Export']['latex_columns']             = TRUE;

$cfg['Export']['latex_relation']            = TRUE;

$cfg['Export']['latex_comments']            = TRUE;

$cfg['Export']['latex_mime']                = TRUE;

$cfg['Export']['latex_null']                = '\textit{NULL}';

$cfg['Export']['latex_caption']             = TRUE;

$cfg['Export']['latex_data_label']          = 'tab:__TABLE__-data';

$cfg['Export']['latex_structure_label']     = 'tab:__TABLE__-structure';

 

$cfg['Export']['sql_structure']             = TRUE;

$cfg['Export']['sql_data']                  = TRUE;

$cfg['Export']['sql_compat']                = 'NONE';

$cfg['Export']['sql_disable_fk']            = FALSE;

$cfg['Export']['sql_use_transaction']       = FALSE;

$cfg['Export']['sql_drop_database']         = FALSE;

$cfg['Export']['sql_drop_table']            = FALSE;

$cfg['Export']['sql_if_not_exists']         = FALSE;

$cfg['Export']['sql_auto_increment']        = TRUE;

$cfg['Export']['sql_backquotes']            = TRUE;

$cfg['Export']['sql_dates']                 = FALSE;

$cfg['Export']['sql_relation']              = FALSE;

$cfg['Export']['sql_columns']               = FALSE;

$cfg['Export']['sql_delayed']               = FALSE;

$cfg['Export']['sql_ignore']                = FALSE;

$cfg['Export']['sql_hex_for_binary']        = TRUE;

$cfg['Export']['sql_type']                  = 'insert'; // insert/update/replace

$cfg['Export']['sql_extended']              = FALSE;

$cfg['Export']['sql_comments']              = FALSE;

$cfg['Export']['sql_mime']                  = FALSE;

$cfg['Export']['sql_header_comment']        = ''; // \n is replaced by new line

 

/**

 * Link to the official MySQL documentation.

 * Be sure to include no trailing slash on the path.

 * See http://dev.mysql.com/doc/ for more information

 * about MySQL manuals and their types.

 */

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/mysql/en';

 

/**

 * Type of MySQL documentation:

 *   old        - old style used in phpMyAdmin 2.3.0 and sooner

 *   searchable - "Searchable, with user comments"

 *   chapters   - "HTML, one page per chapter"

 *   big        - "HTML, all on one page"

 *   none       - do not show documentation links

 */

$cfg['MySQLManualType'] = 'searchable';

 

 

/**

 * PDF options

 */

$cfg['PDFPageSizes']        = array('A3', 'A4', 'A5', 'letter', 'legal');

$cfg['PDFDefaultPageSize']  = 'A4';

 

 

/**

 * Language and charset conversion settings

 */

// Default language to use, if not browser-defined or user-defined

$cfg['DefaultLang'] = 'en-iso-8859-1';

 

// Force: always use this language - must be defined in

//        libraries/select_lang.lib.php

// $cfg['Lang']     = 'en-iso-8859-1';

 

// Default charset to use for recoding of MySQL queries, does not take

// any effect when charsets recoding is switched off by

// $cfg['AllowAnywhereRecoding'] or in language file

// (see $cfg['AvailableCharsets'] to possible choices, you can add your own)

$cfg['DefaultCharset'] = 'iso-8859-1';

 

// Allow charset recoding of MySQL queries, must be also enabled in language

// file to make harder using other language files than unicode.

// Default value is FALSE to avoid problems on servers without the iconv

// extension and where dl() is not supported

$cfg['AllowAnywhereRecoding'] = FALSE;

 

// You can select here which functions will be used for charset conversion.

// Possible values are:

//      auto   - automatically use available one (first is tested iconv, then

//               recode)

//      iconv  - use iconv or libiconv functions

//      recode - use recode_string function

$cfg['RecodingEngine'] = 'auto';

 

// Specify some parameters for iconv used in charset conversion. See iconv

// documentation for details:

// http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html

$cfg['IconvExtraParams'] = '';

 

// Available charsets for MySQL conversion. currently contains all which could

// be found in lang/* files and few more.

// Charsets will be shown in same order as here listed, so if you frequently

// use some of these move them to the top.

$cfg['AvailableCharsets'] = array(

    'iso-8859-1',

    'iso-8859-2',

    'iso-8859-3',

    'iso-8859-4',

    'iso-8859-5',

    'iso-8859-6',

    'iso-8859-7',

    'iso-8859-8',

    'iso-8859-9',

    'iso-8859-10',

    'iso-8859-11',

    'iso-8859-12',

    'iso-8859-13',

    'iso-8859-14',

    'iso-8859-15',

    'windows-1250',

    'windows-1251',

    'windows-1252',

    'windows-1256',

    'windows-1257',

    'koi8-r',

    'big5',

    'gb2312',

    'utf-8',

    'utf-7',

    'x-user-defined',

    'euc-jp',

    'ks_c_5601-1987',

    'tis-620',

    'SHIFT_JIS'

);

 

/**

 * Customization & design

 *

 * The graphical settings are now located in themes/themename/layout.inc.php

 */

 

$cfg['LeftPointerEnable']   = TRUE;         // enable the left panel pointer

                                            // (used when LeftFrameLight is FALSE)

                                            // see also LeftPointerColor

                                            // in layout.inc.php

 

$cfg['BrowsePointerEnable'] = TRUE;        // enable the browse pointer

                                            // see also BrowsePointerColor

                                            // in layout.inc.php

 

$cfg['BrowseMarkerEnable'] = TRUE;         // enable the browse marker

                                            // see also BrowseMarkerColor

                                            // in layout.inc.php

 

$cfg['TextareaCols']        = 40;           // textarea size (columns) in edit mode

                                            // (this value will be emphasized (*2) for sql

                                            // query textareas and (*1.25) for query window)

$cfg['TextareaRows']        = 7;            // textarea size (rows) in edit mode

$cfg['LongtextDoubleTextarea'] = TRUE;      // double size of textarea size for longtext fields

$cfg['TextareaAutoSelect']  = TRUE;         // autoselect when clicking in the textarea of the querybox

$cfg['CharTextareaCols']    = 40;           // textarea size (columns) for CHAR/VARCHAR

$cfg['CharTextareaRows']    = 2;            // textarea size (rows) for CHAR/VARCHAR

$cfg['CtrlArrowsMoving']    = TRUE;         // Enable Ctrl+Arrows moving between fields when editing?

$cfg['LimitChars']          = 50;           // Max field data length in browse mode for all non-numeric fields

$cfg['ModifyDeleteAtLeft']  = TRUE;         // show edit/delete links on left side of browse

                                            // (or at the top with vertical browse)

$cfg['ModifyDeleteAtRight'] = FALSE;        // show edit/delete links on right side of browse

                                            // (or at the bottom with vertical browse)

$cfg['DefaultDisplay']      = 'horizontal'; // default display direction

                                            // (horizontal|vertical|horizontalflipped)

$cfg['DefaultPropDisplay']  = 'horizontal'; // default display direction for altering/

                                            // creating columns (tbl_properties)

                                            // (horizontal|vertical)

 

$cfg['HeaderFlipType']      = 'css';        // table-header rotation via faking or css? (css|fake)

                                            // NOTE: CSS only works in IE browsers!

$cfg['ShowBrowseComments']  = TRUE;         // shows stored relation-comments in 'browse' mode.

$cfg['ShowPropertyComments']= TRUE;         // shows stored relation-comments in 'table property' mode.

$cfg['RepeatCells']         = 100;          // repeat header names every X cells? (0 = deactivate)

 

$cfg['QueryFrame']          = TRUE;         // displays a link or icon in the left frame to open the querybox, and activates the querybox when clicking on [Edit] on the results page.

$cfg['QueryFrameJS']        = TRUE;         // whether to use JavaScript functions for opening a new window for SQL commands.

                                            // if set to 'false', the target of the querybox is always the right frame.

$cfg['QueryWindowWidth']    = 550;          // Width of Query window

$cfg['QueryWindowHeight']   = 310;          // Height of Query window

$cfg['QueryHistoryDB']      = FALSE;         // Set to TRUE if you want DB-based query history.

                                            // If FALSE, this utilizes JS-routines to display

                                            // query history (lost by window close)

$cfg['QueryWindowDefTab']   = 'sql';        // which tab to display in the querywindow on startup

                                            // (sql|files|history|full)

$cfg['QueryHistoryMax']     = 25;           // When using DB-based query history, how many entries

                                            // should be kept?

$cfg['BrowseMIME']          = TRUE;         // Use MIME-Types (stored in column comments table) for

$cfg['MaxExactCount']       = 20000;        // When approximate count < this, PMA will get exact count for

                                            // table rows.

$cfg['WYSIWYG-PDF']         = TRUE;         // Utilize DHTML/JS capabilities to allow WYSIWYG editing of

                                            // the PDF page editor. Requires an IE6/Mozilla based browser.

 

$cfg['NaturalOrder']        = TRUE;         // Sort table and database in natural order

 

 

//-----------------------------------------------------------------------------

// custom-setup by mkkeck: 2004-05-04

//    some specials for new icons and scrollings

// FIXME:

// 2004-05-08 rabus: We need to rearrange these variables.

 

$cfg['ShowHttpHostTitle']   = TRUE;            // show HttpHost in browsers window title (true|false)?

$cfg['SetHttpHostTitle']    = '';              // if ShowHttpHostTitle=true, please set your host (server)

                                             // or an other string, wich should be shown in browsers window title.

                                             // If not set (or empty), the PMA will get your real Host-Adress.

 

$cfg['ErrorIconic']          = TRUE;    // show some icons for warning, error and information messages (true|false)?

$cfg['MainPageIconic']       = TRUE;    // show icons in list on main page, on right panel top menu (server db table)  and on menu tabs (true|false)?

$cfg['ReplaceHelpImg']       = TRUE;    // show help button instead of strDocumentation (true|false)?

 

// theme manager

$cfg['ThemePath']           = './themes';    // using themes manager please set up here the path to 'themes'

                                             // else leave empty

$cfg['ThemeManager']        = TRUE;          // if you want to use selectable themes and if ThemesPath not empty

                                             // set it to true, else set it to false (default is false);

$cfg['ThemeDefault']        = 'original';         // set up default theme, if ThemePath not empty

                                             // you can set up here an valid path to themes or 'original' for

                                             // the original pma-theme

 

//-----------------------------------------------------------------------------

 

 

/**

 * Default queries

 * %d will be replaced by the database name.

 * %t will be replaced by the table name.

 * %f will be replaced by a list of field names.

 * (%t and %f only applies to DefaultQueryTable)

 */

$cfg['DefaultQueryTable']    = 'SELECT * FROM %t WHERE 1';

$cfg['DefaultQueryDatabase'] = '';

 

/**

 * SQL Query box settings

 * These are the links display in all of the SQL Query boxes

 */

$cfg['SQLQuery']['Edit']      = TRUE;       // Edit link to change a query

$cfg['SQLQuery']['Explain']   = TRUE;       // EXPLAIN on SELECT queries

$cfg['SQLQuery']['ShowAsPHP'] = TRUE;       // Wrap a query in PHP

$cfg['SQLQuery']['Validate']  = FALSE;      // Validate a query (see $cfg['SQLValidator'] as well)

$cfg['SQLQuery']['Refresh']   = TRUE;       // Refresh the results page

 

 

/**

 * Webserver upload/save/import directories

 */

$cfg['UploadDir']             = '';         // Directory for uploaded files that can be executed by

                                            // phpMyAdmin. For example './upload'. Leave empty for

                                            // no upload directory support

$cfg['SaveDir']               = '';         // Directory where phpMyAdmin can save exported data on

                                            // server. For example './save'. Leave empty for no save

                                            // directory support.

$cfg['docSQLDir']             = '';         // Directory for docSQL imports, phpMyAdmin can import

                                            // docSQL files from that directory. For example

                                            // './docSQL'. Leave empty for no docSQL import support.

$cfg['TempDir']               = '';         // Directory where phpMyAdmin can save temporary files.

                                            // This is needed for MS Excel export, see documentation

                                            // how to enable that.

 

 

/**

 * Misc. settings

 */

$cfg['GD2Available']          = 'auto';     // Is GD >= 2 available? Set to yes/no/auto. 'auto'

                                            // does autodetection, which is a bit expensive for

                                            // php < 4.3.0, but it is the only safe vay how to

                                            // determine GD version.

/**

 * SQL Parser Settings

 */

$cfg['SQP']['fmtType']      = 'html';       // Pretty-printing style to use on queries (html, text, none)

$cfg['SQP']['fmtInd']       = '1';          // Amount to indent each level (floats ok)

$cfg['SQP']['fmtIndUnit']   = 'em';         // Units for indenting each level (CSS Types - {em,px,pt})

// The graphical settings are now located in themes/themename/layout.inc.php

 

/**

 * If you wish to use the SQL Validator service, you should be

 * aware of the following:

 * All SQL statements are stored anonymously for statistical purposes.

 * Mimer SQL Validator, Copyright 2002 Upright Database Technology.

 * All rights reserved.

 */

$cfg['SQLValidator']['use']      = FALSE;   // Make the SQL Validator available

$cfg['SQLValidator']['username'] = '';      // If you have a custom username, specify it here (defaults to anonymous)

$cfg['SQLValidator']['password'] = '';      // Password for username

 

/**

 * Developers ONLY!

 * To use the following, please install the DBG extension from

 */

$cfg['DBG']['enable'] = FALSE;              // Make the DBG stuff available

$cfg['DBG']['profile']['enable'] = FALSE;   // Produce profiling results of PHP

$cfg['DBG']['profile']['threshold'] = 0.5;  // Threshold of long running code to display

                                            // Anything below the threshold is not displayed

 

 

/**

 * MySQL settings

 */

// Column types;

// varchar, tinyint, text and date are listed first, based on estimated popularity

$cfg['ColumnTypes'] = array(

   'VARCHAR',

   'TINYINT',

   'TEXT',

   'DATE',

   'SMALLINT',

   'MEDIUMINT',

   'INT',

   'BIGINT',

   'FLOAT',

   'DOUBLE',

   'DECIMAL',

   'DATETIME',

   'TIMESTAMP',

   'TIME',

   'YEAR',

   'CHAR',

   'TINYBLOB',

   'TINYTEXT',

   'BLOB',

   'MEDIUMBLOB',

   'MEDIUMTEXT',

   'LONGBLOB',

   'LONGTEXT',

   'ENUM',

   'SET'

);

 

// Attributes

// Note: the "ON UPDATE CURRENT_TIMESTAMP" attribute is added dynamically

// for MySQL >= 4.1.2, in tbl_properties.inc.php

 

$cfg['AttributeTypes'] = array(

   '',

   'BINARY',

   'UNSIGNED',

   'UNSIGNED ZEROFILL'

);

 

// Available functions

if ($cfg['ShowFunctionFields']) {

    $cfg['Functions'] = array(

       'ASCII',

       'CHAR',

       'SOUNDEX',

       'LCASE',

       'UCASE',

       'NOW',

       'PASSWORD',

       'MD5',

       'SHA1',

       'ENCRYPT',

       'RAND',

       'LAST_INSERT_ID',

       'COUNT',

       'AVG',

       'SUM',

       'CURDATE',

       'CURTIME',

       'FROM_DAYS',

       'FROM_UNIXTIME',

       'PERIOD_ADD',

       'PERIOD_DIFF',

       'TO_DAYS',

       'UNIX_TIMESTAMP',

       'USER',

       'WEEKDAY',

       'CONCAT'

    );

 

    // Which column types will be mapped to which Group?

    $cfg['RestrictColumnTypes'] = array(

       'VARCHAR'      => 'FUNC_CHAR',

       'TINYINT'      => 'FUNC_NUMBER',

       'TEXT'         => 'FUNC_CHAR',

       'DATE'         => 'FUNC_DATE',

       'SMALLINT'     => 'FUNC_NUMBER',

       'MEDIUMINT'    => 'FUNC_NUMBER',

       'INT'          => 'FUNC_NUMBER',

       'BIGINT'       => 'FUNC_NUMBER',

       'FLOAT'        => 'FUNC_NUMBER',

       'DOUBLE'       => 'FUNC_NUMBER',

       'DECIMAL'      => 'FUNC_NUMBER',

       'DATETIME'     => 'FUNC_DATE',

       'TIMESTAMP'    => 'FUNC_DATE',

       'TIME'         => 'FUNC_DATE',

       'YEAR'         => 'FUNC_DATE',

       'CHAR'         => 'FUNC_CHAR',

       'TINYBLOB'     => 'FUNC_CHAR',

       'TINYTEXT'     => 'FUNC_CHAR',

       'BLOB'         => 'FUNC_CHAR',

       'MEDIUMBLOB'   => 'FUNC_CHAR',

       'MEDIUMTEXT'   => 'FUNC_CHAR',

       'LONGBLOB'     => 'FUNC_CHAR',

       'LONGTEXT'     => 'FUNC_CHAR',

       'ENUM'         => '',

       'SET'          => ''

    );

 

    // Map above defined groups to any function

    $cfg['RestrictFunctions'] = array(

        'FUNC_CHAR'   => array(

            'ASCII',

            'CHAR',

            'SOUNDEX',

            'LCASE',

            'UCASE',

            'PASSWORD',

            'MD5',

            'SHA1',

            'ENCRYPT',

            'LAST_INSERT_ID',

            'USER',

            'CONCAT'

        ),

 

        'FUNC_DATE'   => array(

            'NOW',

            'CURDATE',

            'CURTIME',

            'FROM_DAYS',

            'FROM_UNIXTIME',

            'PERIOD_ADD',

            'PERIOD_DIFF',

            'TO_DAYS',

            'UNIX_TIMESTAMP',

            'WEEKDAY'

        ),

 

        'FUNC_NUMBER' => array(

            'ASCII',

            'CHAR',

            'MD5',

            'SHA1',

            'ENCRYPT',

            'RAND',

            'LAST_INSERT_ID',

            'UNIX_TIMESTAMP',

            'COUNT',

            'AVG',

            'SUM'

        )

    );

 

    // Default functions for above defined groups

    $cfg['DefaultFunctions'] = array(

        'FUNC_CHAR'         => '',

        'FUNC_DATE'         => '',

        'FUNC_NUMBER'       => '',

        'first_timestamp'   => 'NOW'

    );

 

 

} // end if

 

// Search operators

$cfg['NumOperators'] = array(

   '=',

   '>',

   '>=',

   '<',

   '<=',

   '!=',

   'LIKE',

   'NOT LIKE'

);

 

$cfg['TextOperators'] = array(

   'LIKE',

   'LIKE %...%',

   'NOT LIKE',

   '=',

   '!=',

   'REGEXP',

   'NOT REGEXP'

);

 

$cfg['EnumOperators'] = array(

   '=',

   '!='

);

 

$cfg['NullOperators'] = array(

   'IS NULL',

   'IS NOT NULL'

);

 

$cfg['UnaryOperators'] = array(

   'IS NULL'     => 1,

   'IS NOT NULL' => 1

);

 

/**

 * Unset magic_quotes_runtime - do not change!

 */

set_magic_quotes_runtime(0);

 

/**

 * File Revision - do not change either!

 */

$cfg['FileRevision'] = '$Revision: 2.53 $';

?>

阅读(5339) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~