Rails框架应用软件系列:在Kubuntu上安装和使用博客软件Mephisto
Posted by cnruby Tue, 19 Dec 2006 22:49:00 GMT
在Kubuntu上安装和使用博客软件Mephisto
目录
(一)系统环境:
- 操作系统 Kubuntu 6.06 标准版 VMware及其相关软件资料,请看这里。该系统是安装在Windows XP上。
- Ruby语言运行环境1.8.4,请看这里。
- 开发网络应用软件Rails框架1.1.6,请看这里。
- 数据库系统SQLite3,请看这里。
- 网络服务器Apache2,请看这里。
- 软件版本管理控制系统Subversion客户端软件,请看这里。
- 浏览器Firefox,请看这里。
- Windows XP 或者 Windows 2000操作系统
(二)前提条件:
- 在本机VMware Kubuntu操作系统上,我们的工作目录为/opt/daoxi/。
- 你的电脑必须在线。
(三)目的:
- 在Kubuntu上安装博客软件Mephisto基本上与Windows XP一样,不同的是,在这里使用Apache2作为Mephisto的网络服务器。安装它的前提条件:操作系统Kubuntu;数据库SQLite;Mephisto最新SVN版本;网络服务器Apache2。在这个文章中,没有使用网络服务器mongrel等问题。
- 姐妹篇:在Windows XP上安装和使用博客Mephisto
- 实例网站:www.mammox.com
(四)解决方案:
- 通过SVN方法,下载Mephisto软件到指定的安装目录:
图01svn co http://svn.techno-weenie.net/projects/mephisto/trunk mephisto
cd mephisto
rake freeze_edge
gem install tzinfo --remote
图02
图03
- 接下来的这些命令是为了创建和安装SQLite3的数据库。数据库配置文件下载:
图04sqlite3 mephisto.db
vi config/database.yml
rake db:bootstrap RAILS_ENV=production
图05
图06
图07
- 安装Mephisto已经结束。启动网络服务器WEBrick:
./script/server -e production - 打开网络浏览器Firefox,输入下面网站地址:
这里仅仅是测试一下安装Mephisto是否正确。http://localhost:3000 - 修改目录和文件的权限
图08chown -R www-data:www-date /opt/daoxi/mephisto/
- 创建系统连接:
图09mkdir /var/www/mephisto
ln -s /opt/daoxi/mephisto/public/ /var/www/mephisto/public
ln -s /opt/daoxi/mephisto/db/ /var/www/mephisto/db
图10
- 创建Apache2的配置文件:
图11cd /etc/apache2/sites-available
touch mephisto
vi mephisto
图12
- 创建系统连接:
cd /etc/apache2/sites-enabled
rm 000-default
ln -s ../sites-available/mephisto ./mephisto
图13 - 编辑软件mephisto的文件:
图14vi /var/www/mephisto/public/dispatch.rb
vi /var/www/mephisto/public/dispatch.cgi
vi /var/www/mephisto/public/dispatch.fcgi
图15
图16
图17
- 重启网络服务器Apache2:
图23/etc/init.d/apache2 restart
- 通过Linux命令:
图24ifconfig
可以知道Kubuntu系统的在局域网的IP地址,例如其地址为192.168.1.13。 - 从Windows XP的浏览器Firefox,输入下面地址:
图25http://192.168.1.13
(五)视听教学:
(六)必须注意的问题:
- 网络服务器Apache2还有一些网络安全问题在这里也没有涉及到。
(七)参考资料:
(八)命令清单:
svn co http://svn.techno-weenie.net/projects/mephisto/trunk mephisto
cd mephisto
rake freeze_edge
gem install tzinfo --remote
sqlite3 mephisto.db
vi config/database.yml
rake db:bootstrap RAILS_ENV=production
./script/server -e production
http://localhost:3000
chown -R www-data:www-date /opt/daoxi/mephisto/
mkdir /var/www/mephisto
ln -s /opt/daoxi/mephisto/public/ /var/www/mephisto/public
ln -s /opt/daoxi/mephisto/db/ /var/www/mephisto/db
cd /etc/apache2/sites-available
touch mephisto
vi mephisto
cd /etc/apache2/sites-enabled
rm 000-default
ln -s ../sites-available/mephisto ./mephisto
vi /var/www/mephisto/public/dispatch.rb
vi /var/www/mephisto/public/dispatch.cgi
vi /var/www/mephisto/public/dispatch.fcgi
/etc/init.d/apache2 restart
http://192.168.1.13
(九)下载文件pdf:



![Validate my RSS feed [Valid RSS]](/blog1/files/valid-rss.png)




