用ports安裝apache13_modssl+mysql+php+phpmyadmin
http://tech.ddvip.com 2006年04月01日 社区交流
本文详细介绍用ports安裝apache13_modssl+mysql+php+phpmyadmin
of our demonstration-only Snake Oil CA) which later can replace
the conf/ssl.crt/server.crt file.
WARNING: Do not use this for real-life/production systems
CA 認證製作完成!!
2.2 設定apache #vi /usr/local/etc/apache/httpd.conf2.3 啓動apache
更改ServerName 為你的主機名或IP
#/usr/local/etc/rc.d/apache.sh start
apache# 三. 安裝及設定php
# ps -aux | grep www
www 70204 0.0 2.5 4888 3212 ?? S 2:56AM 0:00.00 /usr/local/sbin/
www 70205 0.0 2.5 4888 3212 ?? S 2:56AM 0:00.00 /usr/local/sbin/
www 70206 0.0 2.5 4888 3212 ?? S 2:56AM 0:00.00 /usr/local/sbin/
www 70207 0.0 2.5 4888 3212 ?? S 2:56AM 0:00.00 /usr/local/sbin/
www 70208 0.0 2.5 4888 3212 ?? S 2:56AM 0:00.00 /usr/local/sbin/
3.1 协调
由於FreeBSD預設已安裝了GETTEXT, 在安裝php時會出現error, 所以要在ports裏先卸下GETTEXT. 之後再在安裝php時選擇GETTEXT 一起安裝.
#cd /usr/ports/devel/gettext//make之後, 一會彈出一個像似以下的畫面, 根據自己需要選擇安裝軟件包.
#make deinstall clean
# cd /usr/ports/www/mod_php4
#make
//CTYPE, MYSQL, OVERLOAD, PCRE, POSIX, SESSION, TOKENIZER, XML, ZLIB 這幾個軟件是預設要安裝的.
//=========================================================\\3.2 設定php.
// PHP configuration options \\
|| Please select desired options: ||
|| [ ] BCMATH bc style precision math functions ||
|| [ ] BZIP2 bzip2 library support ||
|| [ ] CALENDAR calendar conversion support ||
|| [ ] CDB cdb database support (dba) ||
|| [ ] CRACK crack support ||
|| [X] CTYPE ctype functions ||
|| [ ] CURL CURL support ||
|| [ ] DB4 Berkeley DB4 support ||
|| [ ] DBASE dBase library support ||
|| [ ] DBX dbx support ||
|| [ ] DIO Direct I/O support ||
|| [ ] DOMXML DOM support ||
|| [ ] DOMXSLT DOM XSLT and EXSLT support (implies DOMXML) ||
|| [ ] EXIF EXIF support ||
|| [ ] FILEPRO filePro support ||
|| [ ] FRIBIDI FriBidi support ||
|| [ ] FTP FTP support ||
|| [X] GD GD library support ||
|| [ ] GDBM GDBM database support (dba) ||
|| [X] GETTEXT gettext library support ||
|| [ ] GMP GNU MP support ||
|| [ ] HYPERWAVE Hyperwave support ||
|| [ ] ICONV iconv support ||
|| [ ] IMAP IMAP support ||
|| [ ] INIFILE INI file support (dba) ||
|| [ ] INTERBASE Interbase 6 database support (Firebird) ||
|| [ ] MBSTRING multibyte string support ||
|| [ ] MCAL Modular Calendar Access Library support ||
|| [ ] MCVE MCVE support (implies OPENSSL) ||
|| [ ] MCRYPT Encryption support ||
|| [ ] MHASH Crypto-hashing support ||
|| [ ] MIME mime_magic support ||
|| [ ] MING ming shockwave flash support ||
|| [ ] MNOGOSEARCH mnoGoSearch support ||
|| [ ] MSSQL MS-SQL database support ||
|| [X] MYSQL MySQL database support ||
|| [ ] NCURSES ncurses support (CLI only) ||
|| [ ] OPENLDAP OpenLDAP support ||
|| [X] OPENSSL OpenSSL support ||
|| [ ] ORACLE Oracle support ||
|| [X] OVERLOAD user-space object overloading support ||
|| [ ] PCNTL pcntl support (CLI only) ||
|| [X] PCRE Perl Compatible Regular Expression support ||
|| [ ] PDFLIB PDFlib support ||
|| [X] POSIX POSIX-like functions ||
|| [ ] POSTGRESQL PostgreSQL database support ||
|| [ ] PSPELL pspell support ||
|| [ ] READLINE readline support (CLI only) ||
|| [ ] RECODE recode support ||
|| [X] SESSION session support ||
|| [ ] SHMOP shmop support ||
|| [ ] SNMP SNMP support (implies OPENSSL) ||
|| [ ] SOCKETS sockets support ||
|| [ ] SYBASEDB Sybase database support (DB-lib) ||
|| [ ] SYBASECT Sybase database support (CT-lib) ||
|| [ ] SYSVSEM System V semaphore support ||
|| [ ] SYSVSHM System V shared memory support ||
|| [X] TOKENIZER tokenizer support ||
|| [ ] UNIXODBC unixODBC support ||
|| [ ] WDDX WDDX support (implies XML) ||
|| [X] XML XML support ||
|| [ ] XMLRPC XMLRPC-EPI support ||
|| [ ] XSLT XSLT Sablotron support ||
|| [ ] YAZ YAZ support (ANSI/NISO Z39.50) ||
|| [ ] YP YP/NIS support ||
|| [ ] ZIP ZIP support ||
|| [X] ZLIB ZLIB support ||
\\ //
\\==========================================================//
[ OK ] Cancel
. . .
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).
#make install
===> Installing for mod_php4-4.3.4_6,1
===> mod_php4-4.3.4_6,1 depends on file: /usr/local/sbin/apxs - found
===> mod_php4-4.3.4_6,1 depends on shared library: expat.4 - found
===> mod_php4-4.3.4_6,1 depends on shared library: intl.6 - found
===> mod_php4-4.3.4_6,1 depends on shared library: mysqlclient.14 - found
===> Generating temporary packing list
===> Checking if www/mod_php4 already installed
Installing PHP SAPI module: apache
[activating module `php4' in /usr/local/etc/apache/httpd.conf]
cp libs/libphp4.so /usr/local/libexec/apache/libphp4.so
chmod 755 /usr/local/libexec/apache/libphp4.so
cp /usr/local/etc/apache/httpd.conf /usr/local/etc/apache/httpd.conf.bak
cp /usr/local/etc/apache/httpd.conf.new /usr/local/etc/apache/httpd.conf
rm /usr/local/etc/apache/httpd.conf.new
Installing shared extensions: /usr/local/lib/php/20020429/
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist
*****************************************************************************
Make sure index.php is part of your DirectoryIndex.
You should add the following lines to your Apache configuration file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
*****************************************************************************
===> Registering installation for mod_php4-4.3.4_6,1
责编:豆豆技术应用