Table of Contents

Debian post install

postinstall debian

Network

  lspci command : List all PCI devices.
  lshw command : List all hardware.
  dmidecode command : List all hardware data from BIOS.
  ifconfig command : Outdated network config utility.
  ip command : Recommended new network config utility.
  
  
  apt-get install ssh openssh-server
  apt-get install vim-nox sudo 
  
  apt-get install ntp ntpdate
  
  apt-get install wpasupplicant iw
  

wpa_supplicant

  cp /usr/share/doc/wpa_supplicant/xxx /etc/wpa_supplicant/wpa_supplicant.conf

/etc/wpasupplicant/wpasupplicant.conf”. Note the lack of space in “network={“.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="Your SSID Here"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk="YourPresharedKeyHere"
}

“/etc/network/interfaces”. For a static IP, it will look like this:

# allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static
    address 10.1.2.20
    netmask 255.255.255.0
    network 10.1.2.0
    gateway 10.1.2.1

For DHCP, it will look like this:

# allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
# sudo ifdown wlan0
# sudo ifup wlan0

iwconfig

Debug

  
  # sudo /sbin/wpa_supplicant -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 \
  -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf

Sudo

  apt-get install sudo
  
  build-essential autotools-dev cdbs check checkinstall dctrl-tools automake libtool
  libc6-dev subversion
  vim-nox tree

If

  imadata@imadata-nb:~$ sudo su
  sudo: parse error in /etc/sudoers near line 8
  sudo: no valid sudoers sources found, quitting
  sudo: unable to initialize policy plugin

Then

  pkexec nano /etc/sudoers
  

Software Packages:

vi /etc/apt/sources.list
replace jp with de!

apt-get update

Hostname:

  vi /etc/hostname
  imavoyage

APT:

  apt-get install avahi-{autoipd,daemon,discover,utils}
  apt-get install build-essential autotools-dev cdbs check checkinstall dctrl-tools automake libtool libc6-dev subversion pkg-config strace gdb
  apt-get install vim-nox tree
  apt-get install locales
  apt-get install openjdk-6-jdk gcc libssl-dev libexpat1-dev libpcap-dev libxml2-utils ant1.8
 

GIT:

  sudo apt-get install git-core
      

ETCs:

  apt-get install libusb-{1.0-0-dev,1.0-0,libusb-dev}

Virtualization

      aptitude -y install qemu-kvm libvirt-bin virtinst bridge-utils uml-utilities

Cross compile

http://psas.pdx.edu/DebianCrossCompilerHowto/#index1h1

  
   sudo apt-get build-dep binutils gcc libncurses5-dev
  

Install fakeroot

fakeroot allows you to build packages without being root.

 sudo aptitude install fakeroot

Install dpkg-cross

dpkg-cross adds cross-compilation support to some of the basic Debian package tools. dpkg-cross can also convert packages designed for the target architecture into packages usable for cross-compilation to that architecture.

sudo aptitude install dpkg-cross

Using X-server with VM

Install minimal X-server

sudo apt-get install --no-install-recommends xserver-xorg-core \
    xserver-xorg-input-all xserver-xorg-video-fbdev \
    xserver-xorg-video-intel 
    (yourcard, can be intel, nouveau, or ati)

Setup SSH X11Forwarding

X11 forwarding needs to be enabled on both the client side and the server side.

On the client side, the -X (capital X) option to ssh enables X11 forwarding, and you can make this the default (for all connections or for a specific conection) with ForwardX11 yes in ~/.ssh/config.

On the server side, X11Forwarding yes must specified in /etc/ssh/sshdconfig. Note that the default is no forwarding (some distributions turn it on in their default /etc/ssh/sshdconfig), and that the user cannot override this setting.

The xauth program must be installed on the server side. If there are any X11 programs there, it's very likely that xauth will be there. In the unlikely case xauth was installed in a nonstandard location, it can be called through ~/.ssh/rc (on the server!).

Note that you do not need to set any environment variables on the server. DISPLAY and XAUTHORITY will automatically be set to their proper values. If you run ssh and DISPLAY is not set, it means ssh is not forwarding the X11 connection.

To confirm that ssh is forwarding X11, check for a line containing Requesting X11 forwarding in the ssh -v -X output. Note that the server won't reply either way.

Startup script

And not update-rc.d linknx defaults

As of Debian 6.0 (Squeeze), update-rc.d has been replaced with insserv (see here). Why? Because 6.0 introduced a new boot process, for which you have the headers in place (the INIT INFO section at the top of the script).

Working solution

Add the code below to your script in /etc/init.d, modify it to your needs,

run insserv -n scriptname to verify that it will work,

  insserv -n scriptname

then run insserv scriptname to make it all happen!

  insserv scriptname
  
    ### BEGIN INIT INFO
    # Provides:          scriptname  <-------- IMPORTANT!
    # Required-Start:    $all
    # Required-Stop:     $all
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Short script description
    # Description:       Longer script description.
    ### END INIT INFO
    

Modifying startup script

There is two ways:

The first is just to specify a numeric –retry value. Then it will use /signal/timeout/KILL/timeoutschedule. I.e. send a terminating signal (specified with–signal` option), then wait the specified number of seconds and then send a KILL signal that could not be ignored by a process and therefore it will be forced to exit. The command will look like:

 /sbin/start-stop-daemon --stop --signal TERM --retry 5 --quiet --oknodo --pidfile /var/run/redis/redis.pid --exec /usr/bin/redis-server

The second is to specify a complete schedule to the –retry option. It will look like:

 /sbin/start-stop-daemon --stop --retry TERM/5/KILL/10 --quiet --oknodo --pidfile /var/run/redis/redis.pid --exec /usr/bin/redis-server

Disable startup init.d script

   insserv -r service_name

Turn desktop to server

http://askubuntu.com/questions/413990/want-to-convert-ubuntu-12-04-desktop-to-server