Disclaimer: for more help please use
man <command>
or go to http://explainshell.com/ and paste your command for a detailed explanation.
Identify the USB drive devise:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 200M 0 part
├─sda2 8:2 0 50G 0 part
├─sda3 8:3 0 1K 0 part
├─sda4 8:4 0 14.8G 0 part
├─sda5 8:5 0 29G 0 part
├─sda6 8:6 0 47.7G 0 part /
├─sda7 8:7 0 1.9G 0 part [SWAP]
└─sda8 8:8 0 154.6G 0 part /home
sdb 8:16 1 1.9G 0 disk
├─sdb1 8:17 1 627M 0 part /media/tiagox/Kingston
└─sdb2 8:18 1 416K 0 part
sr0 11:0 1 1024M 0 rom
You can figure it out through the SIZE
of the unit or through the MOUNTPOINT
path. In this case the UBS stick correspond to /dev/sdb
and it's mounted, so you have to unmount it:
$ sudo umount /media/tiagox/Kingston
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 200M 0 part
├─sda2 8:2 0 50G 0 part
├─sda3 8:3 0 1K 0 part
├─sda4 8:4 0 14.8G 0 part
├─sda5 8:5 0 29G 0 part
├─sda6 8:6 0 47.7G 0 part /
├─sda7 8:7 0 1.9G 0 part [SWAP]
└─sda8 8:8 0 154.6G 0 part /home
sdb 8:16 1 1.9G 0 disk
├─sdb1 8:17 1 627M 0 part
└─sdb2 8:18 1 416K 0 part
sr0 11:0 1 1024M 0 rom
The MOUNTPOINT
should be empty. Now we're able to copy the ISO image into the pen drive, with the dd
application.
$ sudo dd if=debian-7.4.0-amd64-netinst.iso of=/dev/sdb bs=4M; sync
This process will take a while, please wait. Once it finishes, reboot your PC and begin the installation.
Reference: https://wiki.debian.org/sudo
$ su -
# apt-get install sudo
# adduser tiagox sudo # or replace tiagox with other username.
Edit the /etc/sudoers
file.
# visudo
Add the following line to the sudoers
config file:
Defaults env_keep += HOME
The user should logout and login to make this changes available.
- Open
synaptic
- Go to Settings > Repositories
- Select and Delete all the repositories that starts with
cdrom:
. - Close the window and the repository list will be updated.
Also you can edit the file /etc/apt/sources.list
, and remove the CD-ROM related lines manually.
Make sure to use redirector for your sources: http://http.debian.net/
This is a possible sources.list
file for Debian Jessie.
deb http://httpredir.debian.org/debian/ jessie main contrib non-free
deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free
deb http://httpredir.debian.org/debian/ jessie-backports main
deb-src http://httpredir.debian.org/debian/ jessie-backports main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
# jessie-updates, previously known as 'volatile'
deb http://httpredir.debian.org/debian/ jessie-updates main
deb-src http://httpredir.debian.org/debian/ jessie-updates main
Then update the packages list and upgrade your system:
$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get dist-upgrade -y
This is a list of all the packages that will be necessary in your system. This list correspond to the packages that probably don't need to much information about how or why install them.
$ sudo apt-get install \
zsh vim tmux curl build-essential openssh-server rar unrar meld xchat vlc \
trash-cli \
git git-gui gitk \
php5 php5-curl \
docker.io \
mysql-client mysql-workbench redis-tools mongodb-clients grc \ # db stuff
hplip hplip-gui \ # printers stuff
python-pip \
ttf-mscorefonts-installer libcanberra-gtk-module fonts-knda texlive-fonts-extra \
openjdk-7-jdk \
libxml2-dev libbz2-dev libxslt1-dev # PHPBrew
$ chsh tiagox -s /bin/zsh
The user should logout and login to make this changes available.
Download from https://www.google.com/chrome/browser/desktop/
$ cd ~/Downloads/
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
$ sudo apt-get install -f
Download from http://www.skype.com/en/download-skype/skype-for-computer/
Reference: https://wiki.debian.org/skype#Debian_7_.22Wheezy.22
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
...
$ cd ~/Downloads
$ sudo dpkg -i skype-debian_4.3.0.37-1_i386.deb
$ sudo apt-get install -f
Download from http://www.sublimetext.com/3
$ cd ~/Downloads/
$ sudo dpkg -i sublime-text_build-3083_amd64.deb
$ sudo apt-get install -f
Download from https://www.dropbox.com/install?os=lnx
$ cd ~/Downloads/
$ sudo dpkg -i dropbox_2015.02.12_amd64.deb
$ sudo apt-get install -f
Reference: https://github.com/creationix/nvm
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
$ nvm install stable
$ nvm alias default stable
Reference: https://github.com/postmodern/ruby-install
$ wget -O ruby-install-0.5.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.5.0.tar.gz
$ tar -xzvf ruby-install-0.5.0.tar.gz
$ cd ruby-install-0.5.0/
$ sudo make install
...
$ ruby-install ruby # Install the last ruby version.
$ ruby-install ruby 1.9 # Install and older and stable ruby version.
It would be nice to check the repository in case the installation process changed.
Reference: https://github.com/postmodern/ruby-install
$ wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
$ tar -xzvf chruby-0.3.9.tar.gz
$ cd chruby-0.3.9/
$ sudo make install
...
$ chruby
ruby-1.9.3-p547
ruby-2.1.3
$ chruby 2.1.3
It would be nice to check the repository in case the installation process changed.
$ sudo groupadd docker
$ sudo gpasswd -a ${USER} docker
$ sudo service docker restart
In order to be able to use different version of some services. Docker container will be used.
For some database container, we'll create a folder in our home directory, to store all the data for each engine, as follows:
$ mkdir ~/Databases
$ cd ~/Databases
$ cd ~/mysql_data
$ cd ~/mongo_data
Create the container:
docker run \
--name mysql \
-v /home/tiagox/Databases/mysql_data:/var/lib/mysql \
--publish 3306:3306 \
--environment MYSQL_ROOT_PASSWORD=root \
--detach mysql:5.5
Once the container was created, you don't need to create a new one. docker run
actually creates a container and should be executed just for the first time. After that, you can start/stop the container when you need it.
Start the container:
$ docker start mysql
Stop the container:
$ docker stop mysql
Connect to the service:
$ # Note that the IP address is used instead of the hostname.
$ mysql -u root -p -h 127.0.0.1 -P 3306
Create the container:
$ docker run \
--name redis \
--publish 6379:6379 \
--detach redis
Once the container was created, you don't need to create a new one. docker run
actually creates a container and should be executed just for the first time. After that, you can start/stop the container when you need it.
Start the container:
$ docker start redis
Stop the container:
$ docker stop redis
Connect to the service:
Create the container:
$ docker run \
--name mongo \
-v /home/tiagox/Databases/mongo_data:/data/db \
--publish 27017:27017 \
--detach mongo --smallfiles
Once the container was created, you don't need to create a new one. docker run
actually creates a container and should be executed just for the first time. After that, you can start/stop the container when you need it.
Start the container:
$ docker start mongo
Stop the container:
$ docker stop mongo
Connect to the service:
dconf-editor