<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="lyceum/1.0.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Solaris Cool Stack, Cool Tool</title>
	<link>http://samp.nalai.net</link>
	<description>Innovation comes from Share</description>
	<pubDate>Wed, 30 May 2007 15:41:26 +0000</pubDate>
	<generator>http://lyceum.ibiblio.org/?v=1.0.3</generator>
	<language>en</language>
			<item>
		<title>用 Sun 的 AMP 组合(Cool Stack) 搭建自己的Blog 服务器</title>
		<link>http://samp.nalai.net/57600</link>
		<comments>http://samp.nalai.net/57600#comments</comments>
		<pubDate>Wed, 30 May 2007 15:41:26 +0000</pubDate>
		<dc:creator>albertxu</dc:creator>
		
		<category>AMP</category>

		<guid isPermaLink="false">http://samp.nalai.net/57600</guid>
		<description><![CDATA[对于那些和我一样，喜欢马上自己动手的人来说，甚至不需要知道它到底是干什么的，最想知道的就是下载地址了。
Sun 的 Cool Stack 组合可以从下面的连接下载：
http://cooltools.sunsource.net/coolstack/
Cool Stack 是 经过 Sun 优化以后的一套开放源代码软件组合，最新版本 1.1 包含
* CSKamp. 加入了  Apache2, MySQL5 和 PHP5
* CSKmysql.  如果需要运行 64 位的 MySQL，请安装本包
* CSKperl.  包含了很多 Perl 的扩展
* CSKphplibsBundle. 如果需要 PHP 其他扩展的话，就要安装该包
* CSKmemcached.   memcached, 分布式对象缓冲系统
* CSKruby. 包含 ruby, rubygems and rails.
* CSKsquid. 包含 Squid Web Proxy Cache.
* CSKtomcat. 包含 Apache Tomcat
本文将通过介绍安装 WordPress 2.0 的过程以对 Cool Stack [...]]]></description>
			<content:encoded><![CDATA[<p>对于那些和我一样，喜欢马上自己动手的人来说，甚至不需要知道它到底是干什么的，最想知道的就是下载地址了。</p>
<p>Sun 的 Cool Stack 组合可以从下面的连接下载：<br />
<a target="_blank" href="http://cooltools.sunsource.net/coolstack/">http://cooltools.sunsource.net/coolstack/</a></p>
<p>Cool Stack 是 经过 Sun 优化以后的一套开放源代码软件组合，最新版本 1.1 包含</p>
<p>* CSKamp. 加入了  Apache2, MySQL5 和 PHP5<br />
* CSKmysql.  如果需要运行 64 位的 MySQL，请安装本包<br />
* CSKperl.  包含了很多 Perl 的扩展<br />
* CSKphplibsBundle. 如果需要 PHP 其他扩展的话，就要安装该包<br />
* CSKmemcached.   memcached, 分布式对象缓冲系统<br />
* CSKruby. 包含 ruby, rubygems and rails.<br />
* CSKsquid. 包含 Squid Web Proxy Cache.<br />
* CSKtomcat. 包含 Apache Tomcat</p>
<p>本文将通过介绍安装 WordPress 2.0 的过程以对 Cool Stack 有比较详细的了解。<br />
<a id="more-57600"></a><br />
本文介绍的软件需要 Solaris 10 操作系统的支持。</p>
<p>1、下载：<br />
# mkdir /var/tmp/CoolStack<br />
# cd /var/tmp/CoolStack<br />
# ftp ftp.sunfreeware.com<br />
user:ftp<br />
password:youremail@yourcompany.com<br />
cd /pub/freeware/CSK/<br />
bin<br />
get CSKamp_x86.pkg.bz2<br />
get CSKmysql_x86.pkg.bz2<br />
bye</p>
<p>2、安装：<br />
# bunzip2 CSKamp_x86.pkg.bz2 CSKmysql_x86.pkg.bz2<br />
# pkgadd -d CSKamp_x86.pkg.bz2<br />
# pkgadd -d CSKmysql_x86.pkg</p>
<p>3、配置 Apache<br />
# vi /opt/coolstack/apache2/conf/httpd.conf</p>
<p>修改运行 Web Server 的用户名和组<br />
修改 ServerName<br />
修改 ServerAdmin<br />
修改 DirectoryIndex 为<br />
DirectoryIndex index.html index.php<br />
启动： # /opt/coolstack/apache2/bin/apachectl start<br />
如果启动有错误，查看 ErrorLog:<br />
# tail -100f /opt/coolstack/apache2/logs/error_log</p>
<p>如果原先安装有 Sun 的 Apache 包，建议禁用<br />
# svcadm disable apache2<br />
# svcadm refresh apache2</p>
<p>然后再移除下面的包（选作）：<br />
SUNWapchd<br />
SUNWapchu<br />
SUNWapchr<br />
SUNWapch2d<br />
SUNWapch2u<br />
SUNWapch2r<br />
SUNWaclg</p>
<p>4、测试 PHP<br />
在 Web 目录下建立一个 test.php<br />
<?php<br />
phpinfo()?<br />
?><br />
本文假设 Web Server Name 为 freelamp.com，<br />
在浏览器输入： http://freelamp.com/test.php 应该会显示 PHP 的编译参数等。</p>
<p>5、配置 MySQL<br />
用 # isainfo -b 检查服务器是否 64 位<br />
如果是64 则 MySQL 目录为 /opt/coolstack/mysql，32的话则为： /opt/coolstack/mysql_32bit</p>
<p>添加 mysql 用户：<br />
#groupadd mysql;useradd -g mysql mysql</p>
<p>安装初始数据库：<br />
# $MYSQL_DIR/bin/mysql_install_db<br />
# chown -R mysql $MYSQL_DIR/var<br />
启动：<br />
# $MYSQL_DIR/bin/mysqld_safe &#038;</p>
<p>如果启动失败，请检查 $MYSQL_DIR/var 目录下的 `hostname`.err 文件<br />
# tail -100f `hostname`.err</p>
<p>6、下载并安装  WordPress<br />
下载：<br />
# cd /var/tmp<br />
# wget http://wordpress.org/latest.tar.gz</p>
<p>解压：<br />
# cd /opt/coolstack/apache2/htdocs<br />
# gzcat /var/tmp/latest.tar.gz|tar xf -</p>
<p>建立配置文件：<br />
# cd wordpress<br />
# mv wp-config-sample.php wp-config.php<br />
# vi wp-config.php<br />
define(&#8217;DB_NAME&#8217;, &#8216;wordpress&#8217;);    // The name of the database<br />
define(&#8217;DB_USER&#8217;, &#8216;wordpress&#8217;);     // Your MySQL username<br />
define(&#8217;DB_PASSWORD&#8217;, &#8216;wordpress&#8217;); // &#8230;and password</p>
<p>建立数据库：<br />
进入 MySQL 命令行：<br />
# /opt/coolstack/mysql/bin/mysql -uroot<br />
mysql> create database wordpress<br />
mysql> grant all on wordpress.* to wordpress@localhost identified by &#8216;wordpress&#8217;;</p>
<p>进入 Web 界面配置：<br />
http://freelamp.com/wordpress/<br />
如果数据库配置没有错误的话，系统会提示进入 install.php 安装数据，<br />
安装成功后，记录 admin 的密码登录即可管理自己的 Blog 了。</p>
<p>Sun 的这套 Cool Stack 最为抢眼的应该是经过优化后的 MySQL 64 位版本。美中不足的是</p>
<p>Apache 提供的不是 worker 模块，而是老的 prefork.c 模块。<br />
PHP 没有提供 Zend Optimizer</p>
<p>附录：</p>
<p>A. 检查数据库程序的版本(32 还是 64)：</p>
<p>bash-3.00# file bin/mysqld<br />
bin/mysqld:     ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available<br />
bash-3.00# file ../mysql_32bit/bin/mysqld<br />
../mysql_32bit/bin/mysqld:      ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information available</p>
<p>B.查看数据库支持的引擎：</p>
<p>mysql> show engines;<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| Engine     | Support | Comment                                                        |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         |<br />
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      |<br />
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     |<br />
| BerkeleyDB | NO      | Supports transactions and page-level locking                   |<br />
| BLACKHOLE  | NO      | /dev/null storage engine (anything you write to it disappears) |<br />
| EXAMPLE    | NO      | Example storage engine                                         |<br />
| ARCHIVE    | YES     | Archive storage engine                                         |<br />
| CSV        | NO      | CSV storage engine                                             |<br />
| ndbcluster | NO      | Clustered, fault-tolerant, memory-based tables                 |<br />
| FEDERATED  | NO      | Federated MySQL storage engine                                 |<br />
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          |<br />
| ISAM       | NO      | Obsolete storage engine                                        |<br />
+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+</p>
<p>C.查看 Apache 编译的模块：</p>
<p>bash-3.00# /opt/coolstack/apache2/bin/httpd -l<br />
Compiled in modules:<br />
core.c<br />
prefork.c<br />
http_core.c<br />
mod_so.c
</p>
]]></content:encoded>
			<wfw:commentRss>http://samp.nalai.net/57600/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
