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:?gU7dYa7zq31yjC6pWeb 连接:
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
重启 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 安装
vi /var/www/info.php
在地址输入 (e.g.?http://192.168.0.100/info.php):
知道 PHP5 在工作, and it’s working through FastCGI, as shown in the?Server API?line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don’t have MySQL support in PHP5 yet.
8 Getting MySQL Support In PHP5
To get MySQL support in PHP, we can install the?php5-mysql?package. It’s a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:
aptitude search php5
Pick the ones you need and install them like this:
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
Now restart Cherokee:
/etc/init.d/cherokee restart
Now reload?http://192.168.0.100/info.php?in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:
9 Links
- Cherokee:?
- PHP:?
- MySQL:?
- Ubuntu:?
相关日志
回复自“ubuntu10.04安装Cherokee 在PHP5 MySQL”
发表回复