Chinaunix首页 | 论坛 | 博客
  • 博客访问: 621258
  • 博文数量: 139
  • 博客积分: 826
  • 博客等级: 少校
  • 技术积分: 1367
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-25 17:30
文章分类

全部博文(139)

文章存档

2016年(2)

2015年(2)

2014年(1)

2012年(15)

2011年(41)

2007年(33)

2006年(45)

分类: BSD

2011-07-05 13:41:07

OpenBSD内核中已经集成了Apache,而且内置了对PHP的支持,
所以安装MySQL、PHP环境非常的简单。
首先令我惊讶的是,只需要2条命令可以把这个环境需要的东西,包括依赖关系
下载安装好。真的为服务器安装带来了很大的方便,比起之前自己使用过的Linux方便很多。
当然首先你要确定你的BSD系统,网络没有问题的,可以链接到互联网。
下面开始演示了,
export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.9/packages/i386/
pkg_add wget mysql-server php5-gd-5.2.17-no_x11 phpMyAdmin pecl-APC
就是上面2条命令,这个我也不知道具体要多长时间,不过这个ftp服务器挺快的吧。

其实这个ftp上面提供了很多的包,可以通过浏览器登陆上去看,
我的网速也并不是很快,只能等了,没办法。如果下载太长时间,视频也只能截取了。
呵呵,我人走开一下。。让它自己慢慢下吧。
现在好像正在下载mysql5.0客户端,
如果是服务器端可能是最大的一个吧,下载时间最长。。。
现在下载gd库了,想起以前Linux下一个个安装的情形,真的感觉现在方便多了。
现在开始下载 phpMyAdmin 经典的web形式管理mysql数据库。
好了,所需的软件都安装完成,
libiconv-1.12: complete
gettext-0.17: complete
wget-1.11.3: complete
mysql-server-5.0.51ap1:mysql-client-5.0.51ap0: complete
mysql-server-5.0.51ap1:p5-Net-Daemon-0.43: complete
mysql-server-5.0.51ap1:p5-PlRPC-0.2018p0: complete
mysql-server-5.0.51ap1:p5-DBI-1.604: complete
mysql-server-5.0.51ap1:p5-DBD-mysql-4.005: complete
mysql-server-5.0.51ap1: complete
php5-gd-5.2.6-no_x11:t1lib-5.1.0p1: complete
php5-gd-5.2.6-no_x11:jpeg-6bp3: complete
php5-gd-5.2.6-no_x11:png-1.2.28: complete
php5-gd-5.2.6-no_x11:libxml-2.6.32p1: complete
php5-gd-5.2.6-no_x11:php5-core-5.2.6: complete
php5-gd-5.2.6-no_x11: complete
phpMyAdmin-2.11.7.1:php5-mbstring-5.2.6: complete
phpMyAdmin-2.11.7.1:libltdl-1.5.26: complete
phpMyAdmin-2.11.7.1:mhash-0.9.1p1: complete
phpMyAdmin-2.11.7.1:libmcrypt-2.5.7p1: complete
phpMyAdmin-2.11.7.1:php5-mcrypt-5.2.6: complete
phpMyAdmin-2.11.7.1:php5-mysql-5.2.6: complete
phpMyAdmin-2.11.7.1: complete
pecl-APC-3.0.19: complete
--- mysql-server-5.0.51ap1 -------------------
You can find detailed instructions on how to install a database
in /usr/local/share/doc/mysql/README.OpenBSD.
--- pecl-APC-3.0.19 -------------------
You can enable this module by creating a symbolic
link from /var/www/conf/php5.sample/apc.ini to
/var/www/conf/php5/apc.ini.
ln -fs /var/www/conf/php5.sample/apc.ini \
        /var/www/conf/php5/apc.ini
If you already have Apache running on your machine,
you should not use "apachectl restart" - instead,
you should fully stop and then restart the server.
You'll also need to configure APC using various
settings in php.ini.  See /var/www/pecl-APC/INSTALL
for details.
--- php5-core-5.2.6 -------------------
To enable the php5 module please create a symbolic
link from /var/www/conf/modules.sample/php5.conf
to /var/www/conf/modules/php5.conf.
ln -s /var/www/conf/modules.sample/php5.conf \
        /var/www/conf/modules
The recommended php configuration has been installed
to /var/www/conf/php.ini.
Don't forget that the default OpenBSD httpd is chrooted
into /var/www by default, so you may need to create support
directories such as /var/www/tmp for PHP to work correctly.
--- php5-gd-5.2.6-no_x11 -------------------
You can enable this module by creating a symbolic
link from /var/www/conf/php5.sample/gd.ini to
/var/www/conf/php5/gd.ini.
ln -fs /var/www/conf/php5.sample/gd.ini \
        /var/www/conf/php5/gd.ini
--- php5-mbstring-5.2.6 -------------------
You can enable this module by creating a symbolic
link from /var/www/conf/php5.sample/mbstring.ini to
/var/www/conf/php5/mbstring.ini.
ln -fs /var/www/conf/php5.sample/mbstring.ini \
        /var/www/conf/php5/mbstring.ini
--- php5-mcrypt-5.2.6 -------------------
You can enable this module by creating a symbolic
link from /var/www/conf/php5.sample/mcrypt.ini to
/var/www/conf/php5/mcrypt.ini.
ln -fs /var/www/conf/php5.sample/mcrypt.ini \
        /var/www/conf/php5/mcrypt.ini
--- php5-mysql-5.2.6 -------------------
You can enable this module by creating a symbolic
link from /var/www/conf/php5.sample/mysql.ini to
/var/www/conf/php5/mysql.ini.
ln -fs /var/www/conf/php5.sample/mysql.ini \
        /var/www/conf/php5/mysql.ini
--- phpMyAdmin-2.11.7.1 -------------------
The phpMyAdmin has been installed into /var/www/phpMyAdmin
You should point this to the DocumentRoot of your web-server:
   # ln -s ../phpMyAdmin /var/www/htdocs/phpMyAdmin
(make sure you use a relative symlink since Apache is chrooted)
You can ensure you have a working install by accessing:

现在提示作链接并创建PHP临时目录:(下面是我参看网络上面的。)
ln -s /var/www/conf/modules.sample/php5.conf /var/www/conf/modules
ln -fs /var/www/conf/php5.sample/apc.ini /var/www/conf/php5/apc.ini
ln -fs /var/www/conf/php5.sample/gd.ini /var/www/conf/php5/gd.ini
ln -fs /var/www/conf/php5.sample/mbstring.ini /var/www/conf/php5/mbstring.ini
ln -fs /var/www/conf/php5.sample/mcrypt.ini /var/www/conf/php5/mcrypt.ini
ln -fs /var/www/conf/php5.sample/mysql.ini /var/www/conf/php5/mysql.ini
mkdir /var/www/tmp
chmod 0777 /var/www/tmp
 
#pkg_info    检查一下系统中安装了些什么软件包
下面是 安装包的信息:
# pkg_info
gettext-0.17        GNU gettext
jpeg-6bp3           IJG's JPEG compression utilities
libiconv-1.12       character set conversion library
libltdl-1.5.26      GNU libtool system independent dlopen wrapper
libmcrypt-2.5.7p1   interface to access block/stream encryption algorithms
libxml-2.6.32p1     XML parsing library
mhash-0.9.1p1       strong hash library
mysql-client-5.0.51ap0 multithreaded SQL database (client)
mysql-server-5.0.51ap1 multithreaded SQL database (server)
p5-DBD-mysql-4.005  MySQL drivers for the Perl DBI
p5-DBI-1.604        unified perl interface for database access
p5-Net-Daemon-0.43  extension for portable daemons
p5-PlRPC-0.2018p0   module for writing rpc servers and clients
pecl-APC-3.0.19     Alternative PHP Cache
php5-core-5.2.6     server-side HTML-embedded scripting language
php5-gd-5.2.6-no_x11 image manipulation extensions for php5
php5-mbstring-5.2.6 multibyte characters extensions for php5
php5-mcrypt-5.2.6   mcrypt encryption/decryption extensions for php5
php5-mysql-5.2.6    mysql database access extensions for php5
phpMyAdmin-2.11.7.1 tool to handle the administration of MySQL over the web
png-1.2.28          library for manipulating PNG images
t1lib-5.1.0p1       Type 1 rasterizer library for UNIX/X11
wget-1.11.3         retrieve files from the web via HTTP, HTTPS and FTP
由于这个视频有点长,配置方面我们留在下一个视频中演示。
谢谢大家观看。
阅读(986) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~