Skip to content

Instantly share code, notes, and snippets.

@ajaxray
Created June 19, 2013 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ajaxray/5812131 to your computer and use it in GitHub Desktop.
Save ajaxray/5812131 to your computer and use it in GitHub Desktop.
Some shell scripts to install things on debian based system,
#!/bin/bash
# -------------------------------------------------------------------------
# Shell script to install development utilities
# -------------------------------------------------------------------------
apt-get update
apt-get install git-core
apt-get install mercurial
#!/bin/bash
# Shell script to install LAMP with dependencies for running PHP applications
# with mod_fcgi
# -------------------------------------------------------------------------
# Version 1.1 (August 18 2011)
# -------------------------------------------------------------------------
# Copyright (c) 2011 Finn Hensner <http://www.gerillafilm.se>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
apt-get update
aptitude install apache2 apache2-suexec libapache2-mod-php5
#a2dismod php5
a2enmod rewrite
a2enmod suexec
a2enmod include
#a2enmod fcgid
a2enmod expire
apt-get install php5
apt-get install mysql-server
apt-get install memcached
apt-get install php5-common php5-mysql php5-curl php-pear phpunit php5-memcache php-soap phpmyadmin php5-gd
sleep 1
echo "Adding extensions and fixes to custom ini"
cat > /etc/php5/conf.d/custom.ini << EOF
cgi.fix_pathinfo = 1
extension=gd2.so
extension=pdo.so
extension=pdo_mysql.so
extension=php_pgsql.so
extension=php_pdo_pgsql.so
extension=memcache.so
EOF
sleep 1
echo "Add server name to Apache config"
echo "ServerName 127.0.0.1" >> /etc/apache2/apache2.conf
sleep 1
#echo "Removing default virtual host."
#rm /etc/apache2/sites-available/default
#rm /etc/apache2/sites-enabled/default-000
sleep 1
echo "Restarting apache2"
service apache2 restart
#!/bin/bash
# -------------------------------------------------------------------------
# Shell script to install Ruby with RbEnv
# -------------------------------------------------------------------------
# Clone rbenv into ~/.rbenv
git clone git@github.com:sstephenson/rbenv.git ~/.rbenv
# Add rbenv to your PATH
# NOTE: rbenv is *NOT* compatible with rvm, so you'll need to
# remove rvm from your profile if it's present. (This is because
# rvm overrides the `gem` command.)
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
exec $SHELL
# Install Ruby versions into ~/.rbenv/versions
# (ruby-build is a convenient way to do this)
cd
git clone git@github.com:sstephenson/ruby-build.git
cd ruby-build
./install.sh
ruby-build 1.8.7-p352 ~/.rbenv/versions/1.8.7-p352
ruby-build 1.9.3-preview1 ~/.rbenv/versions/1.9.3-preview1
# Install shims for all Ruby binaries
rbenv rehash
# Set a default Ruby version
rbenv set-default 1.9.3-preview1
ruby --version # 1.9.3
# INstall juicer compresser
#sudo apt-get install libxslt-dev libxml2-dev
#gem install juicer
#juicer install yui_compressor
#juicer install jslint
# When you install gems with binaries, you need to run `rbenv rehash`
gem install bundler
bundle --version # command not found
rbenv rehash
bundle --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment