This is the repo for ishan sheth's development environment configuration, which works fine on ubuntu 14.10. Currently a text file, which may be converted into a shell script in future, if needed.
==================================================================================================== Setting up ubuntu (14.10)
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python-software-properties
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
sudo apt-get install gufw
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"
sudo apt-get autoremove unity-lens-shopping
sudo apt-get install rar
sudo apt-get update
sudo apt-get install git
sudo apt-get install curl
sudo apt-get install guake
sudo apt-get install gksu
sudo apt-get install indicator-multiload
sudo apt-get install gpick
sudo apt-get install filezilla
sudo mkdir /etc/gconf/schemas
cd /etc/gconf/schemas/
sudo ln -s /usr/share/gconf/schemas/guake.schemas
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install flashplugin-installer
ssh-keygen -t rsa -b 2048 -C "contact@imsheth.com"
ls ~/.ssh/*.pub
cat ~/.ssh/id_rsa.pub
Install Google Chrome [Credit] (http://askubuntu.com/questions/79280/how-to-install-chrome-browser-properly-via-command-line/79284#79284)
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f
sudo dpkg -i google-chrome*.deb
google-chrome
This installs a needed library for Google Chrome, then downloads the latest version of Chrome to a temporary directory and installs it
During the installation a PPA is added to your system so that Google Chrome receives the latest updates whenever you check for system updates
Fix Skype [Credit] (http://askubuntu.com/questions/286233/how-to-add-a-skype-indicator/286436#286436)
sudo apt-get install sni-qt:i386
==================================================================================================== Installing apache2 [Credit] (http://www.maketecheasier.com/install-and-configure-apache-in-ubuntu/)
sudo apt-get install apache2
sudo update-rc.d -f apache2 remove
sudo update-rc.d apache2 defaults
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
==================================================================================================== Installing mariadb [Credit] (https://downloads.mariadb.org/mariadb/repositories/#mirror=bytenet&distro=Ubuntu&version=10.0&distro_release=utopic--ubuntu_utopic)
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo subl /etc/apt/sources.list.d/mariadb.list
http://mariadb.org/mariadb/repositories/
deb http://mariadb.bytenet.in//repo/10.0/ubuntu utopic main
deb-src http://mariadb.bytenet.in//repo/10.0/ubuntu utopic main
sudo apt-get update
sudo apt-get install mariadb-server
==================================================================================================== Installing mysql [Credit1] (https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-14-04) Credit2
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
We need to tell MySQL to generate the directory structure it needs to store its databases and information. We can do this by typing :
sudo mysql_install_db
==================================================================================================== Installing php5 and phpmyadmin [Credit] (http://www.rosehosting.com/blog/how-to-set-up-lamp-linux-apache-mariadb-php-stack-on-debian-wheezy/)
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
sudo apt-get install phpmyadmin
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin
sudo subl /etc/apache2/ports.conf
Listen 80
sudo subl /etc/apache2/sites-enabled/000-default.conf
Listen 80
==================================================================================================== Changing the default webroot for apache 2
Include /etc/phpmyadmin/apache.conf
/var/www/html
/home/starscream/public_html
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /home/starscream/public_html>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/starscream/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
==================================================================================================== Installing nginx [Credit] (https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-14-04-lts)
sudo apt-get update
sudo apt-get install nginx
We can make sure that our web server will restart automatically when the server is rebooted by typing
sudo update-rc.d nginx defaults
System start/stop links for /etc/init.d/nginx already exist.
This just means that it was already configured correctly and that no action was necessary. Either way, your Nginx service is now configured to start up at boot time.
==================================================================================================== Changing the default webroot for nginx / adding virtual host/s [Credit] (https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3)
sudo subl /etc/hosts
127.0.0.1 localhost
127.0.1.1 starscream
127.0.0.1 angular.example.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
sudo subl /etc/nginx/sites-enabled/example
server {
listen 80;
server_name angular.example.com;
root /home/starscream/public_html/example_web;
index app/index.html;
location /{
try_files $uri /app/index.html;
}
}
sudo ln -s example /etc/nginx/sites-available/example
sudo service nginx reload
==================================================================================================== Installing node.js and sails.js
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install -y build-essential
sudo apt-get install python-software-properties python g++ make
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm -g --verbose install sails
sudo add-apt-repository --remove ppa:chris-lea/node.js
sails new testProject
Lift the server (serves at http://localhost:1337/ by default)
cd testProject
sails lift
Generate a REST API (serves at http://localhost:1337/user by default)
sails generate api user
sails lift
sudo rm -r node_modules && npm install
==================================================================================================== Installing ionic framework for x68_64 Credit1 [Credit2] (http://askubuntu.com/questions/554045/java-home-is-set-to-the-wrong-directory) [Credit3] (http://askubuntu.com/questions/175514/how-to-set-java-home-for-java)
sudo dpkg --add-architecture i386
sudo apt-get install -qq -y libc6:i386 libgcc1:i386 libstdc++6:i386 libz1:i386
sudo apt-get update && sudo apt-get upgrade
http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
cd ~/Desktop
sudo tar zxf "android-sdk.tgz" -C "/opt"
cd "/opt" && sudo mv "android-sdk-linux" "android-sdk"
cd "/opt" && sudo chown root:root "android-sdk" -R
cd "$INSTALL_PATH" && sudo chmod 777 "android-sdk" -R
cd ~/
echo "export PATH=\$PATH:/opt/android-sdk/tools" >> ".profile"
echo "export PATH=\$PATH:/opt/android-sdk/platform-tools" >> ".profile"
echo "export PATH=\$PATH:/usr/bin/node/bin" >> ".profile"
export PATH=$PATH:/opt/android-sdk/tools
export PATH=$PATH:/opt/android-sdk/platform-tools
export PATH=$PATH:/usr/bin/node/bin
sudo apt-get -qq -y install default-jdk ant --verbose
If java is properly installed you can find it's location, by using the following command (Don't forget to remove bin/java from the end of the path while putting it into JAVA_HOME)
readlink -f $(which java)
echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" >> ".profile"
echo "export PATH=\$PATH:/usr/lib/jvm/java-7-openjdk-amd64/jre/bin" >> ".profile"
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=$PATH:/usr/lib/jvm/java-7-openjdk-amd64/jre/bin
sudo nano /etc/environment
sudo npm install -g cordova --verbose
sudo npm install -g ionic --verbose
android
ionic start ExampleProject blank
cd ExampleProject
ionic platform add android
ionic build android
==================================================================================================== Bower
sudo npm install -g bower --verbose
bower init
bower install <package> --save
bower install <package> --save-dev
==================================================================================================== Gulp Credit1 Credit2 Credit3
sudo npm install --global gulp --verbose
sudo npm install --save-dev gulp --verbose
sudo npm install --save-dev gulp-notify --verbose
sudo npm install --save-dev gulp-rename --verbose
sudo npm install --save-dev gulp-stylus --verbose
sudo npm install --save-dev gulp-uglify --verbose
sudo npm install --save-dev gulp del --verbose
// Sample gulpfile.js
// Load required gulp modules
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
stylus = require('gulp-stylus'),
del = require('del');
// Defining gulp task for performing cleaning of built files
gulp.task('clean', function(cb) {
del(['app/*.min.js', 'app/assets/css/build/**/*.css'], cb)
});
// Defining gulp task for uglification/minification of .js files
gulp.task('scripts', function() {
return gulp.src('app/*.js')
.pipe(rename({
suffix: '.min'
}))
.pipe(uglify())
.pipe(gulp.dest('app/'));
// .pipe(notify({
// message: 'Uglification complete !'
// }));
});
// Defining gulp task to get .styl files and render
gulp.task('styles', function() {
return gulp.src('./app/assets/css/*.styl')
.pipe(rename({
suffix: '.min'
}))
.pipe(stylus({
compress: true
}))
.pipe(gulp.dest('./app/assets/css/build'));
// .pipe(notify({
// message: 'Minification complete !'
// }));
});
// Defining watch task watches specified sources for changes and reloads on change
gulp.task('watch', function() {
// Watch .js files
gulp.watch('app/main.js', ['scripts']);
// Create LiveReload server
livereload.listen();
// Watch any files in dist/, reload on change
gulp.watch(['app/dist/**']).on('change', livereload.changed);
});
// A default task is a gulp that runs when you just run just 'gulp'
gulp.task('default', ['clean'], function() {
gulp.start('scripts', 'styles');
});
gulp
==================================================================================================== Grunt
sudo npm install -g grunt-cli --verbose
==================================================================================================== Yeoman
sudo npm install -g yo --verbose
==================================================================================================== Stylus
sudo npm install stylus -g --verbose
stylus -c file.styl
stylus file.styl
==================================================================================================== AngularJS
bower install angular
==================================================================================================== Composer
sudo curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo PATH=$PATH:/home/starscream/.composer/vendor/bin/
sudo composer install --verbose
sudo composer update --verbose
==================================================================================================== Laravel
php artisan down
php artisan up
php artisan serve
php artisan serve --port=8001
php artisan vendor:publish
==================================================================================================== Couchdb Credit1 Credit2
sudo apt-get install couchdb
sudo npm install -g add-cors-to-couchdb
add-cors-to-couchdb
As a root user, edit /etc/couchdb/local.ini and uncomment the bind_address line. Also change 127.0.0.1 to 0.0.0.0. Now everyone can access the database.
sudo subl /etc/couchdb/local.ini
http://localhost:5984/_utils/
sudo npm install -g fauxton
fauxton
fauxton --port=8001
sudo service couchdb start
sudo service couchdb stop
sudo service couchdb restart
==================================================================================================== Ubuntu tricks / commands
sudo apt-get install libnotify-bin
notify-send 'Title of the message' 'Text of the message'
notify-send -i /home/sathiya/deal.ico 'Deal success'
notify-send -u critical -i "notification-message-IM" 'Boss !!' 'Am done with the execution'
command && notify-send
gnome-screensaver-command --lock
sudo chown -R starscream: /opt/lampp/htdocs/Dropbox/xampp-root
sudo chmod -R 777 /opt/lampp/htdocs/Dropbox/xampp-root
chmod 400 mykeyfile.pem
sudo /etc/init.d/apache2 start
or
sudo service apache2 start
sudo /etc/init.d/apache2 stop
or
sudo service apache2 stop
sudo /etc/init.d/apache2 restart
or
sudo service apache2 restart
sudo service nginx start
sudo service nginx restart
sudo service nginx stop
sudo service nginx reload
jasmine-node --matchall test/store.test.js
^ + Alt + F2
dconf reset -f /org/compiz/
unity --reset-icons
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo shutdown -r now
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo apt-get remove --purge nvidia*
sudo shutdown -r now
https://packagecontrol.io/installation
Ctrl+Shift+P or Cmd+Shift+P in Linux/Windows/OS X
type install, select Package Control: Install Package
type prettify, select HTML-CSS-JS Prettify
crontab -l
crontab -e