Wednesday, October 30, 2013

How To Install Git on Ubuntu 1204


installing git


If you install git on your server you can easly make release checkouts and deployments. Use following command to install git

sudo apt-get install git-core

git configuration


You can edit git config by using command

sudo vim ~/.gitconfig

you can afterwards add following lines


git config --global user.name "NewUser"
git config --global user.email newuser@example.com

following command will show you available config

git config --list

Initial Server Setup with Ubuntu 12.04

When you first get a fresh server such as a Virtual Server you need to make some configuration on your server. This document guides you some basic configuration steps that will help you to setup a new box.

info any command that you run with sudo will be logged in /var/log/secure directory

step one : root login

when you get a new VS you will get also a username with root privileges. You can login to your box as root by using ssh. but this is not recommended. you can use alternative users to login to your box and use root priviledges after you login. If you install cygwin you can use following commend othwerise you can use putty to connect to your box by using given username and pass.

ssh root@yourserverip

step two : change your password

change your password by the following command 

passwd

go to the next step. you donot need to logout.

step three : create a new user

add a new user by using the following command. it can have any arbitrary name 

adduser mynewusername

after you set the password you donot need to enter any further information about the new user. you can live all the lines black if you wish.

step four  : root privileges

until now only root user has the root privileges. edit sudo configuration by using the following command 

visudo

find selection called user privilege sepecification. it will look like this : 

# User privilege specification
root    ALL=(ALL:ALL) ALL

add following line 

mynewusername ALL=(ALL:ALL) ALL

save and exit the file.

done!


If you want you can make root login more restrictive by reading this article 


Monday, October 28, 2013

install node js on ubuntu 12 or older

sudo apt-get update
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

Tuesday, October 22, 2013

How To Install Ruby on Rails on Ubuntu 12.04 LTS with RVM


1. install ruby with rvm

- make an update

sudo apt-get update

- install curl if you do not have

sudo apt-get install curl

- install rvm with curl

\curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

- install rvm requirements as well

rvm requirements

2. install ruby

- install

rvm install ruby

- tell to use recently installed version

rvm use ruby --default

3. install rubygems

rvm rubygems current

4. install rails

gem install rails

5. finished

you are instal ruby on rails. you can now use rails command for e.g.

rails new testproject




source: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm



























Monday, October 21, 2013

Using Vagrant for Development

VAGRANT

- install vagrant project from vagrant website
- install oracle virtual box
- select a vagrant virtual machine from varant.es website
- add your selected virtual box with the following command

vagrant box add ubuntu12_04 http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-i386-vagrant-disk1.box

- create a project directory
e.g.

mkdir vagrant-project
mkdir mytestproject
cd vagrant-project/mytestproject

- init vagrant

vagrant init ubuntu12_04

- start vagrant

vagrant up

- connect with ssh to vagrant. user name and password is vagrant

ssh 127.0.0.1 -p 2222 -l vagrant

you can now work on your mytestproject directory. It will be available to vagrant virtual machine under the /vagrant directory.

If you change to /vagrant and create a file there it will appear on windows directory as well.

install guest additions. If you have sharefolder problems you need to install guest additions. Go to the http://download.virtualbox.org/virtualbox and find your guest additions file and install it as follows

wget -c \http://download.virtualbox.org/virtualbox/4.3.0/VBoxGuestAdditions_4.3.0.iso -O VBoxGuestAdditions_4.3.0.iso
sudo mount VBoxGuestAdditions_4.3.0.iso -o loop /mnt
sudo sh /mnt/VBoxLinuxAdditions.run --nox11
sudo umont /mnt
rm *.iso

go to host machine and restart your guest by using this command

vagrant reload

You can optionally add a name server to your VM box

sudo vim /etc/resolv.conf

and add opendns domainname servers as follows.

nameserver  208.67.222.222
nameserver 208.67.220.220

LinkWithin

Related Posts Plugin for WordPress, Blogger...