Debian

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run.

All packages list

http://packages.debian.org/stable/allpackages

Sample service blah

File in /etc/init.d/blah with chmod 755:

   1 #! /bin/sh
   2 # /etc/init.d/blah
   3 #
   4 
   5 # Some things that run always
   6 touch /var/lock/blah
   7 
   8 # Carry out specific functions when asked to by the system
   9 case "$1" in
  10   start)
  11     echo "Starting script blah "
  12     echo "Could do more here"
  13     ;;
  14   stop)
  15     echo "Stopping script blah"
  16     echo "Could do more here"
  17     ;;
  18   *)
  19     echo "Usage: /etc/init.d/blah {start|stop}"
  20     exit 1
  21     ;;
  22 esac
  23 
  24 exit 0

Add service

   1 update-rc.d blah defaults
   2 update-rc.d blah defaults 20 80
   3 update-rc.d blah start 20 2 3 4 . start 30 5 . stop 80 0 1 6 .

Remove service

   1 update-rc.d -f blah remove

Check services status

   1 service --status-all
   2 service blah status

Install Debian Wheezy 32 bit

Base Install DW (Debian Wheezy)

In Virtualbox

Installation Debian 7.5.0 amd64 (Wheezy)

Fetch and burn the ISO

   1 wget http://cdimage.debian.org/debian-cd/7.5.0/amd64/iso-dvd/debian-7.5.0-amd64-DVD-1.iso
   2 modprobe sg # fpr cdrecord
   3 cdrecord -scanbus #identify the device
   4 cdrecord -dev=1,0,0 -pad -data debian-7.5.0-amd64-DVD-1.iso
   5 # eject the DVD after burning
   6 cd /
   7 mount /dev/sr0 /mnt/cdrom #check DVD
   8 cd /mnt/cdrom
   9 ls
  10 cd /
  11 umount /mnt/cdrom

Install

Install extra packages

   1 #login as root
   2 df -h # check  disk usage
   3 ifconfig # check network devices 
   4 ping www.sapo.pt
   5 vi /etc/apt/sources.list # comment the line with deb cdrom
   6 apt-get install lynx
   7 apt-get install links
   8 apt-get install xorg
   9 apt-get install wmaker
  10 startx #starts X if all goes well
  11 xterm #open a console
  12 apt-get install iceweasel
  13 iceweasel & #run firefox with branding
  14 apt-get install kdm
  15 vi /etc/inittab
  16 #change default runlevel to 5
  17 #id:5:initdefault
  18 #add line to runlevel 5
  19 #x:5:respawn:/usr/bin/X
  20 reboot # after the reboot should appear the KDM login window
  21 #login
  22 xterm
  23 apt-get install vim
  24 apt-get install icedove
  25 apt-get install wmclockmon
  26 # On WindowMaker Clip click with right mouse button and select Attract Icons
  27 # On each attracted icon select Keep Icon
  28 apt-get install pidgin
  29 apt-get install emacs
  30 apt-get install netbeans
  31 apt-get install mongodb
  32 apt-get install monodevelop
  33 apt-get install mono-complete
  34 apt-get install samba
  35 apt-get install cifs-utils

Eclipse

   1  * apt-get install eclipse #eclipse 3.8
   2  * eclipse &
   3  * create workspace in ~/workspace

Two monitors with digital output

   1 xrandr #show the current outputs and definitions for X
   2 vi /etc/kde4/kdm/Xsetup
   3 xrandr --output DP-2 --right-of DP-1 # two monitors
   4 setxkbmap pt # portuguese keyboard
   5 

Enable multiarch and install Skype

   1 dpkg --add-architecture i386
   2 apt-get update
   3 wget -O skype-install.deb http://www.skype.com/go/getskype-linux.deb
   4 dpkg -i skype-install.deb
   5 apt-get -f install
   6 dkpg -i skype-install.deb

Resize /home folder

   1 df -h #check sizes
   2 umount /home
   3 e2fsck -f /dev/mapper/debianWheezy-home
   4 resizefs /dev/mapper/debianWheezy-home 200G
   5 lvreduce -L 200G /dev/mapper/debianWheezy-home
   6 mount /dev/mapper/debianWheezy-home
   7 vgdisplay

Debian 8.6.0 (Jessie)

VMDebian
Linux
Debian 64 bit
4096MB
VDI type
dynamic allocation
16 GB
create
debian-8.6.0-amd64-DVD-1.iso
install
english
location other europe Portugal
default local en_us.UTF8
keyboard portuguese
hostname debian
domain name <empty>
root pass 
new user vitor
clock Lisbon
Partition, guided user entire disk LVM
scsi(0,0,0) sda
all in one partition
write
change yes
Finish partitioning
scan other cd dvd no
use net mirrors yes portugal ftp.pt.debian.org
package survey no
software to install desktop kde lxde ssh web server print server standard utils displaymanager kdm 
install grub in MBR yes /dev/sda
Finish installation continue

VBoxManage setextradata "VMDebian" "CustomVideoMode1" "1366x768x32"
Use 2 cpu cores in the VM
run guest additions 

/etc/apt/sources.list
# sid 
deb http://ftp.pt.debian.org/debian/ sid  main contrib
deb-src http://ftp.pt.debian.org/debian/ sid main contrib
apt-get update

Install debian 10 - buster on external HDD with USB adapter

ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
  ssid="?????????"
  scan_ssid=1
  proto=RSN WPA
  key_mgmt=WPA-PSK
  group=CCMP TKIP
  pairwise=CCMP TKIP
  psk="???????"
}

deb http://ftp.pt.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.pt.debian.org/debian/ buster main contrib non-free

Debian (last edited 2022-10-20 20:50:57 by localhost)