Ubuntu安装使用系列:安装JRuby语言运行环境1.1beta

Posted by cnruby Mon, 05 Nov 2007 19:53:00 GMT

Ubuntu安装使用系列: 目录和说明

安装JRuby语言运行环境

  • JRuby首页
    http://jruby.codehaus.org/
  • 前提条件
    1. Java语言开发环境版本5.0
    2. 安装7zip压缩软件
      sudo apt-get install p7zip-full
  • 下载
    wget http://dist.codehaus.org/jruby/jruby-bin-1.1b1.zip
  • 安装
    sudo 7za x -o/opt jruby-bin-1.1b1.zip
  • 配置
    1. sudo vim /etc/profile
      ...
      JRUBY_HOME=/opt/jruby-1.1b1
      export JRUBY_HOME
      export CLASSPATH=.:$JRUBY_HOME/lib/jruby.jar:$JRUBY_HOME/lib/bsf.jar

      export PATH=$PATH:$JAVA_HOME/bin:$JRUBY_HOME/bin
      ...
    2. source /etc/profile



________________________________________________________________ 您只要点击下面图标,就可以把本文加入到您喜欢的公共收藏库中去。
del.icio.us Digg | FURL | Yahoo! My Web 2.0 | Reddit | Blinklist | Fark

Posted in  | Tags , ,

虚拟器运行软件VMWare安装使用系列:在Windows XP上自己创建应用于虚拟器VMWare的Ubuntu 6.10桌面系统软件

Posted by cnruby Fri, 02 Mar 2007 13:40:00 GMT

虚拟器运行软件VMWare安装使用系列:目录和说明

在Windows XP上自己创建应用于虚拟器VMWare的Ubuntu 6.10桌面系统软件

(一)前提条件
  • 需要安装软件VMWare Player version 1.0.2,安装方法请看上面目录的内容。
  • 需要安装软件QEME for Winodws XP,下载请点击这里。在安装好以后,请将QEMU安装目录加入环境变量PATH中,请看下图:

(二)使用说明
  1. 创建Ubuntu桌面系统软件目录:
    mkdir C:\VMWareUbuntu
    cd C:\VMWareUbuntu
    Ubuntu
  2. 创建文件create_disk.bat来生成一个VMware disk文件,该文件最重要是确定该软件需要多大的硬盘空间(我定义了8GB):
    vi create_disk.bat
  3. 执行文件create_disk.bat:
    create_disk.bat
  4. 创建VMWare运行器配置文件Ubuntu.6.10.vmx,该文件需要调整的参数是内存空间大小(我定义了512MB):
    vi Ubuntu.6.10.vmx
  5. 获取下面的Ubuntu桌面系统文件,并与文件Ubuntu.6.10.vmx放在同一目录下
    wget http://ftp-stud.fht-esslingen.de/Mirrors/releases.ubuntu.com/edgy/ubuntu-6.10-desktop-i386.iso
  6. 执行文件Ubuntu.6.10.vmx有如下二种方法:
    (一)在DOS Shell下输入命令“start .”按回车键,之后在Windows Explorer中,点击该文件Ubuntu.6.10.vmx;
    (二)在DOS Shell下输入Ubuntu.6.10.vmx后按回车键;
    这样就开始安装Ubuntu桌面系统,并生成Ubuntu桌面系统虚拟软件。
  7. 安装好了之后,先退出Ubuntu系统(Shutdown),再退出虚拟机运行器。请最好做个备份,备份目录C:\VMWareUbuntu下的所有文件。
  8. 使用它,只要执行文件Ubuntu.6.10.vmx,即可。
(三)相关网站



________________________________________________________________ 您只要点击下面图标,就可以把本文加入到您喜欢的公共收藏库中去。
del.icio.us Digg | FURL | Yahoo! My Web 2.0 | Reddit | Blinklist | Fark

Posted in ,  | Tags , , ,

Ubuntu安装使用系列: 安装和使用数据库系统PostgreSQL

Posted by cnruby Wed, 14 Feb 2007 09:29:00 GMT

Ubuntu安装使用系列: 目录和说明

在Ubuntu 6.0.6版本上安装和使用数据库系统PostgreSQL

  1. [确定软件方位]
    vi /etc/apt/sources.list
    deb http://archive.ubuntu.com/ubuntu dapper-backports main universe multiverse restricted
    apt-get update
  2. [安装PostgreSQL数据库服务器和客户器]
    apt-get install postgresql-8.1 postgresql-client-8.1 postgresql-client-common postgresql-common
    apt-get install postgresql-8.2 postgresql-client-8.2 postgresql-client-common postgresql-common
  3. [检测PostgreSQL数据库服务器]
    /etc/init.d/postgresql-8.1 --help
    /etc/init.d/postgresql-8.1 status
  4. [进入和退出PostgreSQL客户器]
    su postgres -c psql
    \q
  5. [修改用户"postgres"的密码]
    su postgres -c psql
    ALTER USER postgres WITH PASSWORD 'yourdbpassword';
    \q
  6. [在Shell上创建自己的数据库]
    su postgres -c createdb yourdbname
  7. a[简单安装PosrgreSQL的纯Ruby语言驱动器]
    gem install postgres-pr -r
  8. b[或者专业安装PosrgreSQL的Ruby语言驱动器,注意这是另一个不同的实现。]
    apt-get install postgresql-dev
    gem install postgres -- --with-pgsql-include=/usr/include/postgresql/ --with-pgsql-dir=/usr/lib/postgresql/8.1/lib/
  9. [检测PostgreSQL版本]
    psql -v
  10. [启动PostgreSQL服务器]
    /etc/init.d/postgresql-8.1 start
  11. [停止PostgreSQL服务器]
    /etc/init.d/postgresql-8.1 stop
  12. [帮助命令]
    find / -name postgresql

参考资料




________________________________________________________________ 您只要点击下面图标,就可以把本文加入到您喜欢的公共收藏库中去。
del.icio.us Digg | FURL | Yahoo! My Web 2.0 | Reddit | Blinklist | Fark

Posted in  | Tags , , , ,

Rails框架应用软件系列:在Kubuntu上安装和使用博客软件Mephisto

Posted by cnruby Tue, 19 Dec 2006 22:49:00 GMT

在Kubuntu上安装和使用博客软件Mephisto

目录
 (一)系统环境:

  1. 操作系统 Kubuntu 6.06 标准版 VMware及其相关软件资料,请看这里。该系统是安装在Windows XP上。
  2. Ruby语言运行环境1.8.4,请看这里
  3. 开发网络应用软件Rails框架1.1.6,请看这里
  4. 数据库系统SQLite3,请看这里
  5. 网络服务器Apache2,请看这里
  6. 软件版本管理控制系统Subversion客户端软件,请看这里
  7. 浏览器Firefox,请看这里
  8. Windows XP 或者 Windows 2000操作系统

 (二)前提条件:

  1. 在本机VMware Kubuntu操作系统上,我们的工作目录为/opt/daoxi/。
  2. 你的电脑必须在线。

 (三)目的:

  1. 在Kubuntu上安装博客软件Mephisto基本上与Windows XP一样,不同的是,在这里使用Apache2作为Mephisto的网络服务器。安装它的前提条件:操作系统Kubuntu;数据库SQLite;Mephisto最新SVN版本;网络服务器Apache2。在这个文章中,没有使用网络服务器mongrel等问题。
  2. 姐妹篇:在Windows XP上安装和使用博客Mephisto
  3. 实例网站:www.mammox.com

 (四)解决方案:

  1. 通过SVN方法,下载Mephisto软件到指定的安装目录:
    svn co http://svn.techno-weenie.net/projects/mephisto/trunk mephisto
    cd mephisto
    rake freeze_edge
    gem install tzinfo --remote
    图01

    图02

    图03
  2. 接下来的这些命令是为了创建和安装SQLite3的数据库。数据库配置文件下载:
    sqlite3 mephisto.db
    vi config/database.yml
    rake db:bootstrap RAILS_ENV=production
    图04

    图05

    图06

    图07

  3. 安装Mephisto已经结束。启动网络服务器WEBrick:
    ./script/server -e production
  4. 打开网络浏览器Firefox,输入下面网站地址:
    http://localhost:3000
    这里仅仅是测试一下安装Mephisto是否正确。
  5. 修改目录和文件的权限
    chown -R www-data:www-date /opt/daoxi/mephisto/
    图08
  6. 创建系统连接:
    mkdir /var/www/mephisto
    ln -s /opt/daoxi/mephisto/public/ /var/www/mephisto/public
    ln -s /opt/daoxi/mephisto/db/ /var/www/mephisto/db
    图09

    图10
  7. 创建Apache2的配置文件:
    cd /etc/apache2/sites-available
    touch mephisto
    vi mephisto
    图11
    图12
  8. 创建系统连接:
    cd /etc/apache2/sites-enabled
    rm 000-default
    ln -s ../sites-available/mephisto ./mephisto
  9. 图13
  10. 编辑软件mephisto的文件:
    vi /var/www/mephisto/public/dispatch.rb
    vi /var/www/mephisto/public/dispatch.cgi
    vi /var/www/mephisto/public/dispatch.fcgi
    图14
    图15
    图16
    图17
  11. 重启网络服务器Apache2:
    /etc/init.d/apache2 restart
    图23
  12. 通过Linux命令:
    ifconfig
    图24

    可以知道Kubuntu系统的在局域网的IP地址,例如其地址为192.168.1.13。
  13. 从Windows XP的浏览器Firefox,输入下面地址:
    http://192.168.1.13
    图25

 (五)视听教学:



 (六)必须注意的问题:

  1. 网络服务器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:




________________________________________________________________ 您只要点击下面图标,就可以把本文加入到您喜欢的公共收藏库中去。
del.icio.us Digg | FURL | Yahoo! My Web 2.0 | Reddit | Blinklist | Fark

Posted in ,  | Tags ,  | no comments | no trackbacks

Older Posts

Older Posts: 1 2 3