freebsd8.1 apache mysql php phpmyadmin 部署

–>

 

 

安装mysql

 

mail# cd /usr/ports/databases/mysql51-server
mail# make WITH_CHARSET=utf8 WITH_XCHARSET=all WITH_PROC_SCOPE_PTH=yes BUILD_OPTIMIZED=yes BUILD_STATIC=yes SKIP_DNS_CHECK=yes WITHOUT_INNODB=yes install clean
make安装时候的参数:
WITH_XCHARSET=all 不加这个的话会不支持GBK编码
BUILD_OPTIMIZED=yes
BUILD_STATIC=yes 这2项都是起到优化作用,都加上的好

启动mysql,一个在 /etc/rc.conf加入mysql_enable=”yes” ,或者

用 onestart 代替start,我选择第一个

mail# echo ‘mysql_enable=”yes”‘ >> /etc/rc.conf

 

启动mysql

mail# /usr/local/etc/rc.d/mysql-server start

 

启动 mysql服务:
mail # /usr/local/bin/mysqld_safe &

 

 

 

Apache

安装

mail# cd /usr/ports/www/apache22
mail# make WITH_MPM=worker WITH_THREADS=yes WITHOUT_SSL=yes install clean
由于没有安装其他软件,所以在安装Apache软件时会附加安装一些其它软件,这是系统自动解决,注意取消IPV6模块

 

 

 

 

设置Apache为开机启动.
echo ‘apache22_enable=”yes”‘>> /etc/rc.conf

 

备份httpd.conf文件

cp /usr/local/etc/apache22/httpd.conf /usr/local/etc/apache22/httpd.conf.bak

 

 

php5-extensions: # cd /usr/ports/lang/php5-extensions # make config | +—————————————————————-+ |
     | |    [ ] BCMATH      bc style precision math functions           | |
     | |    [ ] BZ2         bzip2 library support                       | |
     | |    [ ] CALENDAR    calendar conversion support                 | |
     | |    [X] CTYPE       ctype functions                             | |
     | |    [ ] CURL        CURL support                                | |
     | |    [ ] DBA         dba support                                 | |
     | |    [X] DOM         DOM support                                 | |
     | |    [ ] EXIF        EXIF support                                | |
     | |    [ ] FILEINFO    fileinfo support                            | |
     | |    [X] FILTER      input filter support                        | |
     | |    [ ] FRIBIDI     FriBidi support                             | |

 

     | |    [X] FTP         FTP support                                 | |
     | |    [X] GD          GD library support                          | |
     | |    [ ] GETTEXT     gettext library support                     | |
     | |    [ ] GMP         GNU MP support                              | |
     | |    [X] HASH        HASH Message Digest Framework               | |
     | |    [X] ICONV       iconv support                               | |
     | |    [ ] IMAP        IMAP support                                | |
     | |    [ ] INTERBASE   Interbase 6 database support (Firebird)     | |
     | |    [X] JSON        JavaScript Object Serialization support     | |
     | |    [ ] LDAP        OpenLDAP support                            | |
     | |    [ ] MBSTRING    multibyte string support                    | |
     | |    [ ] MCRYPT      Encryption support                          | |

 

 

| |    [ ] MSSQL       MS-SQL database support                     | |
     | |    [X] MYSQL       MySQL database support                      | |
     | |    [X] MYSQLI      MySQLi database support                     | |
     | |    [ ] ODBC        unixODBC support                            | |
     | |    [ ] OPENSSL     OpenSSL support                             | |
     | |    [ ] PCNTL       pcntl support (CLI only)                    | |
     | |    [ ] PDF         PDFlib support (implies GD)                 | |
     | |    [X] PDO         PHP Data Objects Interface (PDO)            | |
     | |    [X] PDO_SQLITE PDO sqlite driver                           | |
     | |    [ ] PGSQL       PostgreSQL database support                 | |
     | |    [X] POSIX       POSIX-like functions                        | |
     | |    [ ] PSPELL      pspell support                              | |
     | |    [ ] READLINE    readline support (CLI only)                 | |

 

 

9楼

     | |    [ ] RECODE      recode support                              | |
     | |    [X] SESSION     session support                             | |
     | |    [ ] SHMOP       shmop support                               | |
     | |    [X] SIMPLEXML   simplexml support                           | |
     | |    [ ] SNMP        SNMP support                                | |
     | |    [ ] SOAP        SOAP support                                | |
     | |    [ ] SOCKETS     sockets support                             | |
     | |    [X] SQLITE      sqlite support                              | |
     | |    [ ] SYBASE_CT   Sybase database support                     | |
     | |    [ ] SYSVMSG     System V message support                    | |
     | |    [ ] SYSVSEM     System V semaphore support                  | |
     | |    [ ] SYSVSHM     System V shared memory support              | |

 

 

| |    [ ] TIDY        TIDY support                                | |
     | |    [X] TOKENIZER   tokenizer support                           | |
     | |    [ ] WDDX        WDDX support (implies XML)                  | |
     | |    [X] XML         XML support                                 | |
     | |    [X] XMLREADER   XMLReader support                           | |
     | |    [ ] XMLRPC      XMLRPC-EPI support                          | |
     | |    [X] XMLWRITER   XMLWriter support                           | |
     | |    [ ] XSL         XSL support (Implies DOM)                   | |
     | |    [ ] YAZ         YAZ support (ANSI/NISO Z39.50)              | |
     | |    [ ] ZIP         ZIP support                                 | |
     | |    [X] ZLIB        ZLIB support                                | |
     +-+——–v(+)—————————————————-+-+
     |                       [ OK ]       Cancel                        |
     +——————————————————————–+

#make install clean

 

 

# cp php.ini-production php.ini

 

启动失败,

FreeBSD# kldload accf_http
FreeBSD# echo ‘accf_data_load=”yes”‘>>/boot/defaults/loader.conf
FreeBSD# echo ‘accf_http_load=”yes”‘>>/boot/defaults/loader.conf
FreeBSD# echo ‘accf_http_load=”yes”‘>>/boot/loader.conf

 

 

 

 

 

ok,成功勒。

安装eAcceletrator

eAcceletrator 可以预编译你的 PHP,这样执行的时候,就会起到加速作用。

 

cd /usr/ports/www/eacceletrator

make install clean

重启Apache服务,去看phpinfo那里,有了。

 

 

 

 

在httpd.conf 中加入

 

 

可以勒。

转载于:https://blog.51cto.com/luoaiyl/510662

本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章