Cherokee 是一个非常快速,灵活和易于配置的Web Server.它支持现今普遍的技术:FastCGI, SCGI, PHP, CGI, TLS and SSL 加密连接, virtual hosts, authentication, on the fly encoding, load balancing, Apache compatible log files, and much more. 本教程演示如何安装 Cherokee 在Ubuntu 10.04 服务器上PHP5(through FastCGI) and MySQL 的问题.
1 初步说明
下面配置都是以 root用户执行程序:
sudo su
2 安装 MySQL 5
首先安装 MySQL 5 :
aptitude install mysql-server mysql-client
安装过程中会提示你输入MySQL root user 和 password 用户为 user root@localhost as well as root@server1.example.com,所以我们没有指定MySQL的root密码
New password for the MySQL “root” user: <– yourrootsqlpassword
Repeat password for the MySQL “root” user: <– yourrootsqlpassword
3 安装 Cherokee
Cherokee 可以使用Ubuntu安装包进行安装. :
aptitude install cherokee
直接浏览http://192.168.0.100,
Cherokee可以通过配置一个基于Web的控制面板,我们可以开始如下:
cherokee-admin -b
(默认 cherokee-admin 登录 127.0.0.1 (localhost))
root@server1:~# cherokee-admin -b
Login:
User: admin
One-time Password: gU7dYa7zq31yjC6p
Web 连接:
URL: http://localhost:9090/
[12/05/2010 17:42:12.448] (error) rrd_tools.c:114 - Could not find the rrdtool binary.
Cherokee Web Server 0.99.39 (Feb 2 2010): Listening on port ALL:9090, TLS
disabled, IPv6 disabled, using epoll, 4096 fds system limit, max. 2041
connections, caching I/O, single thread
http://192.168.0.100:9090/:
这是如何在网络界面:
停止 cherokee-admin, 按CTRL+C中断.
4 安装 PHP5
在Cherokee上安装php5可以跑FastCGI, Ubuntu FastCGI-enabled PHP5 安装包进行安装:
aptitude install php5-cgi
5 配置 PHP5
修改 /etc/php5/cgi/php.ini 和添加 cgi.fix_pathinfo = 1
vi /etc/php5/cgi/php.ini
[...] cgi.fix_pathinfo = 1 |
重启 Cherokee:
/etc/init.d/cherokee restart
6 启动 PHP5 在 Cherokee上
PHP 默认没有启动在 Cherokee . 要启用它, 重新启动 Cherokee’s web-based 控制面板…
cherokee-admin -b
… 登录 (http://192.168.0.100:9090/).
查看 Virtual Servers, 选择默认的虚拟主机:
单击向导按钮:
Under Wizards > Languages,单击运行向导旁边的连结PHP图标:
7 测试 PHP5 / Getting 关于详细信息 PHP5 安装
默认的Web站点的根文件 /var/www.我们现在将创建一个小型PHP文件(info.php) .
vi /var/www/info.php
<?php phpinfo(); ?> |
在地址输入 (e.g. http://192.168.0.100/info.php):
知道 PHP5 , FastCGI可以工作了, 服务器所有显示 API 列表里,你会看到所有已在PHP5中启用的模块.
8 使MySQL 支持 PHP5
aptitude search php5
aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
重启 Cherokee:
/etc/init.d/cherokee restart
现在重新输入 http://192.168.0.100/info.php在下面你可以看到php支持.MySQL 模块:
9 相关资料连接
- Cherokee: http://www.cherokee-project.com/
- PHP: http://www.php.net/
- MySQL: http://www.mysql.com/
- Ubuntu: http://www.ubuntu.com/
原创文章,转载请注明: 转载自PT Ubuntu Blog

感谢楼主分享此教程,谢谢!
感谢分享,可是图片不知道为什么都看不见