sudo apt-get install gcc
sudo apt-get install build-essential
sudo apt-get install gcc g++ build-essential libssl-dev libreadline5-dev zlib1g-dev linux-headers-generic
sudo apt-get install zlib1g-dev libssl-dev libreadline5-dev libxml2-dev
sudo apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev libreadline5-dev
sudo apt-get install curl git-core
sudo apt-get install bison build-essential zlib1g zlib1g-dev libssl-dev libreadline5-dev libxml2-dev subversion autoconf
mlzboy@mlzboy:~$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
109 986 109 986 0 0 957 0 0:00:01 0:00:01 --:--:-- 4268
Initialized empty Git repository in /home/mlzboy/.rvm/src/rvm/.git/
remote: Counting objects: 16240, done.
remote: Compressing objects: 100% (4166/4166), done.
remote: Total 16240 (delta 10951), reused 15861 (delta 10649)
Receiving objects: 100% (16240/16240), 2.91 MiB | 197 KiB/s, done.
Resolving deltas: 100% (10951/10951), done.
RVM: Shell scripts enabling management of multiple ruby environments.
RTFM: http://rvm.beginrescueend.com/
HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net)
Installing RVM to /home/mlzboy/.rvm/
Correct permissions for base binaries in /home/mlzboy/.rvm/bin...
Copying manpages into place.
Notes for Linux ( DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS" )
NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
This is the *original* / standard Ruby Language Interpreter
'ree' represents Ruby Enterprise Edition
'rbx' represents Rubinius
bash >= 3.2 is required
curl is required
git is required (>= 1.7 recommended)
patch is required (for ree and some ruby-head's).
If you wish to install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head),
then you must install and use rvm 1.8.7 first.
If you wish to have the 'pretty colors' again,
set 'export rvm_pretty_print_flag=1' in ~/.rvmrc.
dependencies:
# For RVM
rvm: bash curl git
# For JRuby (if you wish to use it) you will need:
jruby: aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk
# For Ruby (MRI & ree) you should install the following OS dependencies:
ruby: aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf
# In addition to ruby: dependencies,
ruby-head: subversion
# For IronRuby (if you wish to use it) you will need:
ironruby: aptitude install curl mono-2.0-devel
You must now complete the install by loading RVM in new shells.
1) Place the folowing line at the end of your shell's loading files
(.bashrc or .bash_profile for bash and .zshrc for zsh),
after all PATH/variable settings:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
You only need to add this line the first time you install rvm.
2) Ensure that there is no 'return' from inside the ~/.bashrc file,
otherwise rvm may be prevented from working properly.
This means that if you see something like:
'[ -z "$PS1" ] && return'
then you change this line to:
if [[ -n "$PS1" ]] ; then
# ... original content that was below the '&& return' line ...
fi # <= be sure to close the if at the end of the .bashrc.
# This is a good place to source rvm v v v
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
EOF - This marks the end of the .bashrc file
Be absolutely *sure* to REMOVE the '&& return'.
If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile.
Placing all non-interactive (non login) items in the .bashrc,
including the 'source' line above and any environment settings.
3) CLOSE THIS SHELL and open a new one in order to use rvm.
WARNING: you have a 'return' statement in your ~/.bashrc
This could cause some features of RVM to not work.
This means that if you see something like:
'[ -z "$PS1" ] && return'
then you change this line to:
if [[ -n "$PS1" ]] ; then
# ... original content that was below the '&& return' line ...
fi # <= be sure to close the if at the end of the .bashrc.
# This is a good place to source rvm v v v
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
EOF - This marks the end of the .bashrc file
Even if you are using zsh you should still adjust the ~/.bashrc
If you have any questions about this please visit
#rvm on irc.freenode.net.
Installation of RVM to /home/mlzboy/.rvm/ is complete.
mlzboy,
Thank you very much for using RVM! I sincerely hope that RVM helps to
make your work both easier and more enjoyable.
If you have any questions, issues and/or ideas for improvement please
join#rvm on irc.freenode.net and let me know, note you must register
(http://bit.ly/5mGjlm) and identify (/msg nickserv <nick> <pass>) to
talk, this prevents spambots from ruining our day.
My irc nickname is 'wayneeseguin' and I hang out in #rvm typically
~09:00-17:00EDT and again from ~21:00EDT-~23:00EDT
If I do not respond right away, please hang around after asking your
question, I will respond as soon as I am back. It is best to talk in
#rvm itself as then other users can help out should I be offline.
Be sure to get head often as rvm development happens fast,
you can do this by running 'rvm get head' followed by 'rvm reload'
or opening a new shell
w⦿‿⦿t
~ Wayne
mlzboy@mlzboy:~$
$ rvm notes
测试安装是否成功
应输出
- rvm is a function
rvm list
rvm use ree --default
rvm install 1.9.2
1.9.2 > dict={}
=> {}
1.9.2 > dict["z"]=1
=> 1
1.9.2 > dict["a"]=2
ree 1.8.7和1.9.2执行上述两段代码的效果是不一样的,我的程序依赖于这项功能,所以不能使用ree,期待它升到1.9吧,不过得很长时间估计
rvm install 1.9.2
不需要sudo
关于gems
每个ruby解释器默认有一个名字为global的gemset,可以创建自己的gemset,通过rvm 1.8.7@gemset的方法来切换不同的gemset
gems之间可以进行同步,支持export/import/copy等操作
这个需要花费30分钟在我这里,放到海外估计会很快,在本地虚拟机编译更耗时
在安装的时候 如果时间过长 或是出错可到~/.rvm/log下查看具体的日志
mlzboy@mlzboy:~$ rvm list
rvm rubies
=> ree-1.8.7-2010.02 [ i386 ]
ruby-1.9.2-p0 [ i386 ]
mlzboy@mlzboy:~$ rvm 1.9.2 --default
mlzboy@mlzboy:~$
安装nginx
sudo apt-get install libpcre3-dev
sudo
apt-get
install
libpcre3 libpcre3-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install build-essential libpcre3-dev libssl-dev libxslt-dev libgd2-xpm-dev libgeoip-dev zlib1g-dev
sudo apt-get install libpcre3 && \
sudo apt-get install zlib1g && \
sudo apt-get install libpcre3-dev && \
sudo apt-get install zlib1g-dev && \
sudo apt-get install libssl && \
sudo apt-get install libssl-dev
gem install -V passenger
rvmsudo passenger-install-nginx-module
选择自己编译安装
nginx安装路径/usr/local/nginx
外加参数
--with-http_flv_module --with-http_gzip_static_module
另外: 如果不想使用 passenger 自带脚本编译 nginx, 也可以手工编译 nginx 时加入 –add-module=’/home/jerry//opt/passenger/ext/nginx 参数, 来启用 passenger 模块.
Nginx with Passenger support was successfully installed.
The Nginx configuration file (/usr/local/nginx/conf/nginx.conf)
must contain the correct configuration options in order for Phusion Passenger
to function correctly.
This installer has already modified the configuration file for you! The
following configuration snippet was inserted:
http {
...
passenger_root /home/mlzboy/.rvm/gems/ruby-1.9.2-p0/gems/passenger-3.0.1;
passenger_ruby /home/mlzboy/.rvm/wrappers/ruby-1.9.2-p0/ruby;
...
}
After you start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.
Press ENTER to continue.
mysql安装
sudo apt-get install mysql-server-5.1
mysql配置记录
重启mysql服务
sudo service mysql restart
命令行
mysql -u root -p
命令行下查看utf8相关
show variables like 'character%';
配置文件所在路径:
sudo vi /etc/mysql/my.cnf
配置文件的更改以下两段
[client]
default-character-set=utf8
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld]
default-character-set=utf8
init_connect='SET NAMES utf8'
default-time-zone = '+8:00'
mysql> show variables like '%time_zone%';
时区设置
mlzboy@mlzboy:~$ sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
mlzboy@mlzboy:~$ sudo ntpdate cn.pool.ntp.org
10 Dec 14:04:43 ntpdate[1789]: step time server 114.80.81.1 offset 45.904550 sec
mlzboy@mlzboy:~$
mlzboy@mlzboy:~$ date
Fri Dec 10 14:04:45 CST 2010
mysql -u root -p
select now();
rvm gemset create b2c2
rvm 1.9.2@b2c2 --default
gem install rails#有bundler这里其实不需要了
sudo apt-get install imagemagick
paperclip插件需要这个库预先装,一般情况下已经装了
安装rails3的mysql2 gem需要sudo apt-get install libmysql-ruby libmysqlclient-dev
安装sqlite3-rubygem需要下面这个库的支持
这时候应该只需安装sqlite3-ruby,由于缺少sqlite3.h,因此我们需要先安装 ubuntu下的libsqlite3-dev包
- sudo apt-get install libsqlite3-dev
进入b2c2进行
gem install bundler
bundle install#其实由于使用了bundle install 不需要单独再安装gem install rails
目前还在开发环境的部署,转到生产,可能还有一些局部要调整的地方
rake db:drop:all#清除掉各种环境下的数据库
rake db:create
mysql -uroot -p
show databases;
rake db:schema:load
rvm wrapper 1.9.2@b2c2 passenger
解压缩每日备份的mysql
gunzip 2010-12-10.gz
使用rails console 进去后能看到具体的当前的版本
mlzboy@mlzboy:~/b2c2$ rails c
Loading development environment (Rails 3.0.1)
c
分享到:
相关推荐
Linux 下 CVS 安装部署备份恢复等 本文档详细介绍了在 Linux 操作系统下安装、部署、备份和恢复 CVS 服务器的步骤,旨在帮助读者快速搭建 CVS 服务器环境。 一、安装 Linux 服务器 在安装 Linux 服务器时,需要...
Veritas BackupExec 部署备份设备 标题解释:Veritas BackupExec 部署备份设备,指的是使用 Veritas Backup Exec 软件进行备份设备的部署和配置。 Backup Exec 是一种流行的备份和恢复软件,广泛应用于企业级的备份...
这个压缩包"mysql一键部署备份所需安装包.rar"包含了xtrabackup离线安装所需的依赖包,使得用户可以方便地在系统上快速搭建备份环境。 首先,`percona-xtrabackup-24-2.4.26-1.el7.x86_64.rpm`是Xtrabackup的主要...
对于生产环境,通常需要对数据库执行有定时备份操作,好方便数据库出现异常问题的数据恢复,提高数据库的安全性,这里提供linux服务器下详细操作脚本,供大家参阅
在IT行业中,尤其是在Java开发领域,部署文件备份是至关重要的工作环节。这关乎到系统的稳定性和数据的安全性。"java_部署文件备份"这个主题涵盖了Java应用的部署过程以及如何有效地进行备份,以防止数据丢失或系统...
在本文中,研究者们考虑了如何在一个已经存在的分布式数据中心网络的基础上,部署备份核心交换机以应对任意单个核心交换机的故障,同时尽量降低整体的保护成本。作者提出了一个整数线性规划(ILP)模型,以确定备份...
该方案的目标是通过部署备份服务器在网络中,实现对关键数据的有效保护。 #### 二、方案特点与优势 - **自动化管理**:NBU备份方案提供了自动化备份能力,减少了人工干预的需求,降低了出错率。 - **兼容性广泛**...
在备份实施的过程中,企业需要进行有效的备份规划沟通,调研备份环境,规划备份方案,确认备份方案,实施部署备份系统,节点备份部署,调试优化,恢复测试,备份文档提交,备份培训等步骤,以确保备份的完整性和可靠...
而4.4节部署备份脚本,这部分可能包括定期数据备份策略、热备份和冷备份的执行,以及在灾难恢复中的角色。 总的来说,该实施文档提供了在AIX平台上部署Oracle数据库和EAS企业应用的详尽指南,涵盖了从硬件配置、...
通过虚拟化技术,可以快速部署备份环境,且在需要恢复时可以更迅速地将备份环境切换到生产环境,大大缩短了业务中断时间。 瑞信cdp容灾备份解决方案的实施逻辑图展示了其整体架构和工作流程。逻辑图中的各个组件...
3. 备份实施:部署备份系统,配置各个备份节点,确保每个数据源都能得到有效保护。 4. 系统部署与配置:在企业网络环境中安装备份服务器和客户端,设置备份任务和目标存储位置。 5. 系统调试与优化:对备份系统进行...
部署此功能只需三个步骤:安装重复数据删除选项、指定存储位置以及调整备份目标。此外,Backup Exec 2010还能在广域网中实现跨服务器的重复数据删除,对于远程办公室的备份策略尤其有用,可以减少对网络带宽的需求,...
在部署备份方案前,需要检查介质服务器和客户端的配置,包括硬件资源、网络环境、权限设置等,确保所有组件都能正常工作。 ### 第四章 定时备份恢复最佳实践 4.1 Exchange Server 高级定时备份最佳实践 - 设定...
1. 在HP DL380服务器上部署备份服务器,作为整个备份系统的控制中心。 2. 同样的HP DL380服务器还被用作介质服务器,用于存储备份数据。 3. 在外网Oracle数据库服务器上安装Oracle备份代理和客户端,以保护数据库...
### HC1309134 备份解决方案规划与部署 #### OceanStor备份解决方案基本概念 - **概述**:OceanStor备份解决方案是一种专为数据保护设计的全面解决方案,旨在为企业提供高效、可靠的数据备份与恢复能力。此解决...
通过在信息中心部署备份存储柜,并在各个服务器上安装备份客户端,实现按需定时或实时备份,并对关键应用系统设立容灾服务器,以适应未来容灾备份方案的升级需求。 综上所述,爱数的医疗卫生行业数据备份解决方案...
- **适用场景**:适合于Web开发人员和中小企业,特别是需要快速部署备份解决方案的场景。 以上介绍的每种备份解决方案都有其独特的特性和优势,根据不同的业务需求和技术背景,选择最适合的备份工具至关重要。希望...
双活模式在同城部署核心业务,异地部署备份;多地三中心模式在主数据中心和备份中心之间设立容灾中心;多活中心模式则实现关键应用的同城读写同步和异地部署。 7. **技术选型**:选择高可靠性的技术和解决方案,...