Created
January 14, 2013 02:09
-
-
Save googya/4527283 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ "$(id -u)" -eq "0" ]; then | |
| echo "This script should not be run as root" | |
| exit 1 | |
| fi | |
| sudo apt-get update | |
| sudo apt-get install gcc -y | |
| sudo apt-get install language-pack-zh-hant -y | |
| sudo apt-get install language-pack-zh-hans -y | |
| check_app(){ | |
| which $1 > /dev/null 2>&1 | |
| } | |
| #检查rvm是否安装 | |
| check_app rvm | |
| if [ $? -eq 0 ]; then | |
| echo "exist rvm" | |
| else | |
| curl -L https://get.rvm.io | bash -s stable | |
| echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile | |
| sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config -y | |
| fi | |
| check_app ruby | |
| if [ $? -eq 0 ]; then | |
| echo "exist ruby" | |
| else | |
| /home/edoctor/.rvm/bin/rvm install ruby-1.9.3 | |
| fi | |
| #检查是否安装ffmpeg,或者可以下载已经编译好的文件 | |
| check_app ffmpeg | |
| if [ $? -eq 0 ]; then | |
| echo "ffmpeg exists" | |
| else | |
| sudo apt-get install ffmpeg -y | |
| fi | |
| #检查是否安装redis | |
| check_app redis | |
| if [ $? -eq 0 ]; then | |
| echo "redis exists" | |
| else | |
| sudo apt-get install redis-server -y | |
| fi | |
| check_app ssbd | |
| if [ $? -eq 0 ]; then | |
| echo "samba exists" | |
| else | |
| sudo apt-get install samba samba-common -y | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment