Ubuntu Server 10.10 64-bit 安装及系统部署流程
1.安装系统(光盘安装,按照提示即可)
2.更新apt源(sudo apt-get update)
3.安装中文显示(由于官方版本没有中文显示)
4.安装mysql(sudo apt-get install mysql-server) 安装mysql-admin(sudo apt-get install mysql-admin)
5.安装apache2、php5、pma(
sudo apt-get install apache2、
sudo apt-get install php5、
sudo apt-get install phpmyadmin,安装过程中会设置一个mysql的root帐号密码
默认安装/usr/share/phpmyadmin,在/var/www/下建立链接,sudo ln -s /usr/share/phpmyadmin /var/www/pma,重启apache 通过 http://ip/pma 访问)
6.安装java(如果有必要sudo apt-get install openjdk-6-jdk)
7.安装rvm(
sudo apt-get install curl git-core
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) curl -L https://get.rvm.io | bash -s stable --ruby
,安装完成后, 配置启动环境,修改~/.bashrc 文件,加入
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
(有的话就不用 添加),在新的终端里就能看到rvm是否已安装成功
8.安装ruby(
sudo apt-get install zlib1g-dev
sudo apt-get install build-essential
rvm pkg install openssl
rvm pkg install iconv
rvm pkg install readline
rvm install 1.9.2 –with-openssl-dir=$HOME/.rvm/usr,把该版本的Ruby设为默 认
rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr
rvm --create use 1.9.2
rvm --default use 1.9.2)
9.安装rails(gem install rails --version 3.0.3)
10.修复rails-console(
sudo apt-get install libreadline-dev
cd ~/.rvm/src/ruby-1.9.2-p136/ext/readline
ruby extconf.rb
make
make install)
找不到zlib时
cd ~/.rvm/src/ruby-1.9.2-p136/ext/zlib
ruby extconf.rb
make
make install)
11.安装ruby-adapter(
sudo apt-get install libsqlite3-dev
sudo apt-get install libmysqlclient15-dev
gem install sqlite3-ruby
gem install mysql2 )
12.sudo apt-get install libopenssl-ruby1.9.1
sudo apt-get install ruby1.9.1-dev
13.sudo apt-get install libglobus-openssl-dev(64位系统需要)