CentOS足迹一

一、安装VMware Tools

  因为比较简单,所以就直接附上命令,先将VMware Tools复制出来,只能直接对cd文件直接操作,复制后解压:

tar -zxvf VM(tab) -C ./

没有添加-C的话会出现错误,提示:

  tar: .: Not found in archive
  tar: Exiting with failure status due to previous errors

网上查了一些资料,这位cqkxboy168在TA的博客上说:

  原因是因为压缩文件使用的相对路径 在当前目录下找不到 /usr目录,通过使用-C指定解压目录可解决此问题

 

然后再(下面的sudo权限需要解开才能使用):

cd vmware-tools-distrib/
sudo ./vmware-install.pl

  然后就一直回车下去了。

二、安装Sublime Text 2(山寨自这里)

1、在官方下载相应的版本(我的是Ubuntu64位系统)得到.tar.bz2文件,然后解压:

tar xf Sublime\ Text\ 2\ Build\ 2181\ x64.tar.bz2

2、减压后得到Sublime Text 2文件夹,不用什么编译make了,其实它就可以运行了,然后直接把它移动端/usr/lib/下面去:

sudo mv Sublime\ Text\ 2 /usr/lib/

3、在终端中,添加sublime快捷命令:

sudo ln -s /usr/lib/Sublime\ Text\ 2/sublime_text /usr/bin/sublime

4、现在我们可以在终端中输入:sublime打开sublime了,下面我们添加一个图标吧(/usr/share/applications):

sudo sublime /usr/share/applications/sublime.desktop

sublime.desktop里面加入一下内容:

 

[Desktop Entry]
Version=1.0
Name=Sublime Text 2
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Text Editor

Exec=sublime
Terminal=false
Icon=/usr/lib/Sublime Text 2/Icon/48x48/sublime_text.png
Type=Application
Categories=TextEditor;IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow

[NewWindow Shortcut Group]
Name=New Window
Exec=sublime -n
TargetEnvironment=Unity

其实还可以修改打开文件默认,文件路径是(本系统没做,以前做过):

  /usr/share/applications/defaults.list

可以将里面的gedit.desktop替换为sublime.desktop

 

三、编译环境build-essential(参考这里的

If you want to be able to compile packages in red hat/centos, you can issue the following command:

  yum install make gcc gcc-c++ kernel-devel

…or, if you don’t care about maintaining a small footprint, you can get all of the development packages (including X devs—eww):

     yum groupinstall "Development Tools"

我选了前者!

四、安装Ruby,RVM,Rails(参考这里的)

  1、准备工作:安装CURL

 yum install curl

  2、安装rvm

  用rvm官方推荐的方式安装curl -L get.rvm.io | bash -s stable

  

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20758  100 20758    0     0   6358      0  0:00:03  0:00:03 --:--:-- 35975
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Installing RVM to /home/ufindme/.rvm/
    Adding rvm PATH line to /home/ufindme/.profile /home/ufindme/.bashrc /home/ufindme/.zshrc.
    Adding rvm loading line to /home/ufindme/.bash_profile /home/ufindme/.zlogin.
Installation of RVM in /home/ufindme/.rvm/ is almost complete:

  * To start using RVM you need to run `source /home/ufindme/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# ufindme,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

  * WARNING: You have '~/.profile' file, you might want to load it,
    to do that add the following line to '/home/ufindme/.bash_profile':

      source ~/.profile
View Code

然后:

   85  yum bulid-essential
   86  yum install bulid-essential
   87  sudo yum install bulid-essential
   88  cd appsource/
   89  tar -xvf Sublime\ Text\ 2.0.2\ x64.tar.bz2 ./
   90  tar -xvf Sublime\ Text\ 2.0.2\ x64.tar.bz2 /home/ufindme/appsource/
   91  cd vm
   92  cd vmware-tools-distrib/
   93  ./
   94  clear
   95  yum install make gcc gcc-c++ kernel-devel
   96  sudo yum install make gcc gcc-c++ kernel-devel
   97  clear
   98  dpkg -s curl
   99  yum --help
  100  yum install dpkg
  101  sudo yum install dpkg
  102  cd ~
  103  sudo yum install curl
  104  curl -L get.rvm.io | bash -s stable
  105  source ~/.profile
  106  history
  107  rvm -v
  108  rvm requirements
  109  source ~/.profile
  110  rvm list  
  111  rvm list known  

  113  ruby -v
  114  rvm install 2.1.2
  115   rvm list  
  116  rvm use ruby-2.1.2 --default  

  118  rvm use ruby-2.1.2 --default  
  119  echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >>~/.bashrc

  122  source ~/.bashrc
  123  rvm pkg install readline
  124  rvm reinstall all --force
  125   rvm list  
  126  rvm use 2.1.2 --default
  127  ruby -v

安装rails,参考:如何快速正确的安装 Ruby, Rails 运行环境

gem -v
2.1.6

$ gem source -r https://rubygems.org/
$ gem source -a https://ruby.taobao.org

$ gem install rails

$ rails -v
Rails 3.2.13

Done!

 

posted @ 2014-08-27 22:39  SchrodingerCat  阅读(312)  评论(0编辑  收藏  举报