linux下部署ROR

client让我远程帮他把项目部署到服务器上。什么都没给,只好自己想办法,边查资料边部署。

首先把代码给搞下来。

[yzhang@localhost~]$mkdirtrust

[yzhang@localhost~]$cdtrust

[yzhang@localhosttrust]$svncheckout

用户名:

密码:

[yzhang@localhosttrust]$cdtrunk

[yzhang@localhosttrunk]$ls

appconfigdoclibpublicREADMEsendmails.rbtmp

componentsdbdocumentlogRakefilescripttestvendor

[yzhang@localhosttrunk]$viconfig/database.yml

从命令行模式转到末行模式用“:”,然后用wq保存修改并推出。

[yzhang@localhosttrunk]$viconfig/database.yml

[yzhang@localhosttrunk]$pwd

查看当前目录路径

/home/yzhang/trust/trunk

[yzhang@localhosttrunk]$mongrel_railscluster::configure-edevelopment-p8090-N4-c/home/yzhang/trust/trunk-a127.0.0.1

Writingconfigurationfiletoconfig/mongrel_cluster.yml.

[yzhang@localhosttrunk]$mongrel_railscluster::start

startingport8090

startingport8091

startingport8092

startingport8093

[yzhang@localhosttrunk]$pwd

/home/yzhang/trust/trunk

[yzhang@localhosttrunk]$mysql-uwwsr_user-p

Enterpassword:

WelcometotheMySQLmonitor.Commandsendwith;or\g.

YourMySQLconnectionidis57

Serverversion:5.0.45Sourcedistribution

Type'help;'or'\h'forhelp.Type'\c'toclearthebuffer.

mysql>createdatabasetrust_develop

->;

QueryOK,1rowaffected(0.01sec)

mysql>GRANTSELECT,INSERT,UPDATE,DELETE,CREATE,DROP

->ONtrust_develop.*

->TO用户名@localhost

->IDENTIFIEDBY'密码';

QueryOK,0rowsaffected(0.09sec)

mysql>showdatabases;

+--------------------+

|Database|

+--------------------+

|information_schema|

|test|

|trust_develop|

+--------------------+

3rowsinset(0.00sec)

mysql>usetrust_develop

Databasechanged

mysql>source/home/yzhang/trust/tags/trust.sql还原数据库。

相关推荐