wayne's blog

在一秒钟的时间里,也可以突然很感动!~

  DonewsBlog  |  Donews首页  |  Donews社区  |  Donews邮箱  |  我的首页  |  联系作者  |  聚合   |  登录
  139篇文章 :: 0篇收藏:: 54篇评论:: 1个Trackbacks

公告


使用 POTU 订阅!


Subscribe in My MSN

文章

收藏

相册

友情

存档


正在读取评论……


w为了测试squid反向代理加速昨天搞掉了原来的FB5.4老系统,当时竟然没有备份kernel.old,惭愧。等IDC这边重新安装后,决定把web server改成apache1.3,打算做个lighttpd apache1.3 apache 2.0 的比较

一、安装mysq
用ports安装mysql4.1
shell> cd /usr/ports/databases/mysql41-server/
先用如下命令进行编译!负责mysql将认不到gbk编码!(我的亲身经历)
shell> make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_PROC_SCOPE_PTH=yes BUILD_OPTIMIZED=yes BUILD_STATIC=yes
shell> make install
shell> /usr/local/bin/mysql_install_db --user=mysql
shell> /usr/local/bin/mysqld_safe --user=mysql &
shell> ln -s /usr/local/bin/mysql /usr/local/sbin/mysql

make时的说明
        WITH_CHARSET=charset    Define the primary built-in charset (latin1).
        WITH_XCHARSET=list      Define other built-in charsets (may be 'all').
        WITH_OPENSSL=yes        Enable secure connections.
        DB_DIR=directory        Set alternate directory for database files
                                (default is /var/db/mysql).
        WITH_LINUXTHREADS=yes   Use the linuxthreads pthread library.
        WITH_PROC_SCOPE_PTH=yes Use process scope threads
                                (try it if you use libpthread).
        OVERWRITE_DB=yes        Re-initialize default databases.
        BUILD_OPTIMIZED=yes     Enable compiler optimizations
                                (use it if you need speed).
        BUILD_STATIC=yes        Build a static version of mysqld.
                                (use it if you need even more speed).

配置文件
shell> cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf

让mysql自动启动,并修改数据库存放位置
shell> ee /etc/rc.conf        // 在/etc/rc.conf里面加入 mysql_enable="YES"

mysql的data放在/var/db/mysql目录
 安装mysql41-server后他将自动安装mysql41-client



二、以CLI方式安装php
也可以直接选择安装 php4
shell> cd /usr/ports/lang/php4
shell> make config
shell> make install clean
安装完成php


但是现在有些PHP程序不能运行,所以要去安装一下
shell> cd /usr/ports/lang/php4-extensions
选择gd
shell> make install clean

三、安装apache13
shell> cd /usr/ports/www/apache13
shell> make WITH_APACHE_SUEXEC=YES APACHE_PERF_TUNING=YES APACHE_HARD_SERVER_LIMIT=2048
shell> make install

配置/usr/local/etc/apache/httpd.conf
#################################
// 加入中文
DefaultLanguage zh-cn
AddLanguage zh-CN .zh-cn
AddCharset GBK    .gb2312 .gb .gbk



//

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






四、安装Zend
shell> cd /usr/ports/devel/ZendOptimizer
shell> make install clean


五、安装eaccelerator
shell> cd /usr/ports/www/eaccelerator
shell> make install clean
##########################################################
zend_extension="/usr/local/lib/php/20050922/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
#############################################################

mkdir /tmp/eaccelerator
chown www /tmp/eaccelerator
chmod 0700 /tmp/eaccelerator





Trackback: http://tb.donews.net/TrackBack.aspx?PostId=997872


[点击此处收藏本文]  发表于2006年08月13日 11:06 AM




正在读取评论……

发表评论

大名:
网址:
验证码
评论