sh 在Ubuntu 14.04上为开发人员计算机安装所有必需的工具

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在Ubuntu 14.04上为开发人员计算机安装所有必需的工具相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# All the configuration settings described below were found on the internet,
# and this script just automates it

# Generating locales
sudo locale-gen en_US en_US.UTF-8 pt_BR pt_BR.UTF-8 es_ES es_ES.UTF-8

# Installing base packages
sudo apt-get update
sudo apt-get install -y lubuntu-core firefox unzip ncdu pydf lbzip2 curl wget build-essential git autoconf automake libtool make libglib2.0-dev libevent-dev zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev libpcre3-dev python2.7 python-pip openssh-server openssh-sftp-server openssh-client screen htop iotop ntp rcconf virt-manager qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils linux-headers-$(uname -r)
sudo apt-get upgrade -y
sudo adduser `id -un` libvirtd
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
echo mysql-server mysql-server/root_password password 123 | sudo debconf-set-selections
echo mysql-server mysql-server/root_password_again password 123 | sudo debconf-set-selections

# X2Go
sudo add-apt-repository -y ppa:x2go/stable

# GlusterFS
sudo add-apt-repository -y ppa:gluster/glusterfs-3.7

# Ubuntu Make
sudo add-apt-repository -y ppa:ubuntu-desktop/ubuntu-make

# Ansible
sudo add-apt-repository -y ppa:ansible/ansible

# Oracle Java 8
sudo add-apt-repository -y ppa:webupd8team/java

# Atom editor
sudo add-apt-repository -y ppa:webupd8team/atom

# Redis server
sudo add-apt-repository -y ppa:chris-lea/redis-server

# PHP 5.6
sudo add-apt-repository -y ppa:ondrej/php5-5.6

# Nginx
sudo add-apt-repository -y ppa:nginx/development

# MySQL
sudo add-apt-repository -y ppa:ondrej/mysql-5.7

# NodeJS
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo 'deb https://deb.nodesource.com/node_0.12 trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_0.12 trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list

# PostgreSQL
curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' | sudo tee /etc/apt/sources.list.d/pgdg.list

# Sysdig
curl -s https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public | sudo apt-key add -
sudo curl -s -o /etc/apt/sources.list.d/draios.list http://download.draios.com/stable/deb/draios.list

# Virtualbox
curl -s https://www.virtualbox.org/download/oracle_vbox.asc | sudo apt-key add -
echo 'deb http://download.virtualbox.org/virtualbox/debian trusty contrib' | sudo tee /etc/apt/sources.list.d/virtualbox.list

# HHVM
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
sudo add-apt-repository -y "deb http://dl.hhvm.com/ubuntu trusty main"

# R Lang
echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" | sudo tee /etc/apt/sources.list.d/rlang.list
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

# ElasticSearch
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
echo 'deb http://packages.elasticsearch.org/elasticsearch/1.7/debian stable main' | sudo tee /etc/apt/sources.list.d/elasticsearch.list

# MongoDB
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

# Netbeans
sudo add-apt-repository -y ppa:sainthyoga2003/netbeans

# Mono
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

# Updating repositories
sudo apt-get update

# Installing packages
sudo apt-get install -y sysdig postgresql postgresql-client postgresql-contrib nodejs nginx php5-fpm php5-cli php5-json php5-intl php5-pgsql php5-mysqlnd php5-mongo php5-curl php5-gd php5-gmp php5-mcrypt php5-dev php5-redis php5-memcache php5-memcached php5-sqlite php-pear redis-server ansible mysql-server mysql-client ubuntu-make glusterfs-server glusterfs-client libmysqlclient-dev libpq-dev oracle-java8-set-default oracle-java8-installer atom virtualbox-5.0 dkms apache2-utils memcached hhvm r-base elasticsearch mongodb-org mono-complete mono-devel referenceassemblies-pcl ca-certificates-mono x2goserver x2goserver-xsession x2goclient pgadmin3 mono-fastcgi-server4

# Installing Netbeans
sudo apt-get install -y netbeans

# Auto start ElasticSearch
sudo update-rc.d elasticsearch defaults 95 10

# Auto start HHVM on boot
sudo update-rc.d hhvm defaults
sudo /usr/share/hhvm/install_fastcgi.sh

# Installing Xdebug
sudo pecl install xdebug
echo "extension=xdebug.so" >> /etc/php5/mods-available/xdebug.ini
sudo ln -s /etc/php5/cli/conf.d/90-xdebug.ini /etc/php5/mods-available/xdebug.ini

# Installing Phalcon PHP
cd /tmp
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
echo "extension=phalcon.so" >> /etc/php5/mods-available/phalcon.ini
sudo ln -s /etc/php5/cli/conf.d/50-phalcon.ini /etc/php5/mods-available/phalcon.ini

# Install R devtools package
sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\""

# Groovy and Grails
curl -s get.gvmtool.net | bash
source ~/.gvm/bin/gvm-init.sh
gvm install groovy
gvm install grails

# Installing Elixir
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
rm erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install elixir

# Installing packages from Ubuntu Make
umake go go-lang
umake scala scala-lang
umake web visual-studio-code
umake dart dart-sdk
umake ide eclipse
umake ide idea
umake ide pycharm
umake android android-studio

# Installing AWS CLI tools
sudo pip install awscli

# Installing PHP Composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo chmod +x /usr/local/bin/composer

# Installing Laravel and Lumen installers
composer global require "laravel/installer=~1.1"
composer global require "laravel/lumen-installer=~1.0"
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc

# Installing PHPUnit
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit

# Installing WP-CLI
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wget https://github.com/wp-cli/wp-cli/raw/master/utils/wp-completion.bash
mv wp-completion.bash ~/.composer
echo 'source "$HOME/.composer/wp-completion.bash"' >> ~/.bashrc

# Installing Rbenv and Ruby
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
git clone https://github.com/sstephenson/rbenv-vars.git ~/.rbenv/plugins/rbenv-vars
rbenv install 2.2.2
rbenv global 2.2.2
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
gem install rails
rbenv rehash

# Installing Vagrant
wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb
sudo dpkg -i vagrant_1.7.4_x86_64.deb

# Installing Docker
wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker `id -un`

# Install Monaco font
mkdir ~/.fonts
cd ~/.fonts
wget http://dl.dropbox.com/u/31531/marcelorodrigo.com/Monaco-convertida.ttf
cd ~
fc-cache -fv

# Install Play Framework
cd ~
mkdir .typesafe
wget https://downloads.typesafe.com/typesafe-activator/1.3.5/typesafe-activator-1.3.5-minimal.zip
unzip typesafe-activator-1.3.5-minimal.zip
ln -s activator-1.3.5-minimal activator
rm typesafe-activator-1.3.5-minimal.zip
cd ~
echo 'export PATH="$HOME/.typesafe/activator:$PATH"' >> ~/.bashrc

# Installing LESS, SASS, Bower, Yeoman, Gulp, Webpack, Grunt, React Tools
sudo npm install -g less
sudo npm install -g bower
sudo npm install -g yo
sudo npm install -g gulp
sudo npm install -g webpack
sudo npm install -g grunt-cli
sudo npm install -g react-tools
gem install sass

# Installing SailsJS
sudo npm install -g sails

# Installing Express
sudo npm install -g express-generator

# Installing Rust Lang
curl -sSf https://static.rust-lang.org/rustup.sh | sh

以上是关于sh 在Ubuntu 14.04上为开发人员计算机安装所有必需的工具的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 14.04 上的虚拟主机。 - 访问禁止错误 403

sh 在Ubuntu上为每种语言启用快捷方式

sh 在Ubuntu上为PhpStrom安装Oracle(Sun)JDK

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl

sh 在Ubuntu 14.04上更新curl