Translation(s): Deutsch - English - Français - Italiano - Dutch - ?Русский - 简体中文

How to install and configure various software on Debian. Step by step.

Keywords: Debian GNU Linux, Manual, How To, How-To, howto, Installation, Configuration, Easy, From Windows XP to Debian, Wireless WPA2, fax, Documentation, MoinMoin Wiki, Linux, servers, Windows, Windows NT, ?HowTo, vmware, vmwaretools, vmware tools, vm, tool, AMD64, 64 bit

Debian Services

FTP Server

Install

aptitude update
aptitude install vsftpd

Configure

vi /etc/vsftpd.conf

anonymous_enable=NO

write_enable=YES

ftpd_banner=Welcome to example.com FTP service. Enjoy.

local_enable=YES

VMware Server On Debian

http://lucasmanual.com/out/Debian-vmware-windows-xp.jpg

VMware Kernel Upgrade

aptitude update
aptitude install linux-headers-$(uname -r)
/usr/bin/vmware-config.pl

VMware on amd64

aptitude install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc build-essential ia32-libs

Debian Configuration

Change from dhcp to static ip

iface eth0 inet static
[tab]address 192.168.1.200
[tab]network 192.168.1.0
[tab]netmask 255.255.255.0
[tab]broadcast 192.168.1.255
[tab]gateway 192.168.1.1
[tab]dns-nameservers 192.168.1.1

#iface eth0 inet dhcp
iface eth0 inet static
    address 192.168.1.200
    network 192.168.1.0
    dns-nameservers 192.168.1.1 
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

iface eth0 inet static
    address 192.168.5.200
    network 192.168.5.0
    netmask 255.255.255.0
    broadcast 192.168.5.255
    gateway 192.168.5.254
    dns-nameservers 192.168.5.254

Subversion

apt-cache search svn
aptitude install subversion

/home/lucas/my_best_project

/home/lucas/my_best_project/trunk/install.c
/home/lucas/my_best_project/trunk/readme.txt

/usr/local/src/

svnadmin create /usr/local/src/my_best_project

svn import /home/lucas/my_best_project file:///usr/local/src/my_best_project -m "initial import"

svn checkout file:///usr/local/src/my_best_project

/home/lucas/new_folder/my_best_project

svn co svn+ssh://your.remote-server.com/usr/local/src/my_best_project

Mount Windows Share

aptitude update
aptitude install smbfs

mkdir somefolder

mount -t smbfs -o username=administrator,password=password
//windowsservername/folder /home/lucas/somefolder

If you don't want the password to show up you could do

mount -t smbfs -o username=administrator //windowsservername/folder /home/lucas/somefolder

[Optional] You can replace administrator with your username. You can also replace windowsservername with ip address //192.168.1.10/folder ....

Add a network card

lspci -v

ifconfig eth1 hw ether 00:00:..:00 uo

Power Users

Sudo

aptitude update
aptitude install sudo

visudo

yourusername    ALL=(ALL) ALL

Disable ssh root access

vi /etc/ssh/sshd_config

PermitRootLogin no

/etc/init.d/ssh force-reload

Security Events
=-=-=-=-=-=-=-=
Feb  5 07:21:15 localhost sshd[8586]: Failed password for root from xx.xx.xx.xx port 60618 ssh2
Feb  5 07:21:15 localhost sshd[8588]: Failed password for root from xx.xx.xx.xx port 60637 ssh2

AWStats on Debian

apt update
apt install awstats

cp /usr/share/doc/awstats/examples/apache.conf /etc/apache2/conf-available/awstats.conf

LogFile="/var/log/apache2/access.log"
SiteDomain="mysite.org"
LogFormat=1

a2enconf awstats
service apache2 restart

awstats -update 

http://localhost/cgi-bin/awstats.pl?config=awstat.conf or http://www.mysite.com/cgi-bin/awstats.pl?config=awstat.conf [Optional]

RedirectMatch ^/logs /cgi-bin/awstats.pl?config=awstat.conf

http://www.mysite.com/logs

unixODBC

aptitude update
aptitude install tdsodbc unixodbc

vi /etc/freetds/tds.driver.template

[TDS]
Description     = FreeTDS Driver for Linux & MSSQL on Win32
Driver          = /usr/lib/odbc/libtdsodbc.so
Setup           = /usr/lib/odbc/libtdsS.so

vi /etc/freetds/tds.dsn.template

[DSN_NAME]
Description     = Descripton of you DSN connection.
Driver          = TDS
Trace           = No
Database        = DefaultDatabase [replace with your database name]
Server          = mysqlserver.inter.net [replace with your SQL server's host,ip]
Port            = 1433 [replace with the port that SQL is listening on]

[SQLServer2008]
Description     = Production Server
Driver          = TDS
Trace           = No
Server          = servername\instance_name
TDS_Version     = 8.0

odbcinst -i -d -f /etc/freetds/tds.driver.template

odbcinst -i -s -l -f /etc/freetds/tds.dsn.template

odbcinst -i -s -f /etc/freetds/tds.dsn.template

isql -v DSN_NAME username password

**********************************************
* unixODBC - isql                            *
**********************************************
* Syntax                                     *
*                                            *
.
.
.
more
.

Troubleshooting

telnet myserver 1433

Trying 10.3.3.10...
Connected to myserver.
Escape character is '^]'.

If you still get connection refused try telnet from Windows and see if you get same answer.

Apt Preferences

vi /etc/apt/preferences

Package: *
Pin: release a=stable
Pin-Priority: 600
Package: *
Pin: release a=testing
Pin-Priority: 450
Package: *
Pin: release a=unstable
Pin-Priority: 400

aptitude update

Debian User Configuration

Change default editor

aptitude update
aptitude install vim

update-alternatives --config editor

Change default pdf viewer

Check installed browser plugins

Laptop and Debian

Authenticate with wpa using PSK TKIP

aptitude update
aptitude install wpasupplicant

vi /etc/network/interfaces

iface eth2 inet dhcp
wpa-ssid thisismynetworkname
wpa-psk thisismypassword

ifup eth2

auto eth2

Intel Graphic card - Higher resolution

<!> Not required for DebianLenny and later releases. Support is included within xserver-xorg-video-intel.

aptitude install 915resolution

915resolution -l

sudo 915resolution 5c 1280 800 24

Troubleshooting

SSH terminal connection timeout

Read from remote host example.com: Connection reset by peer
Connection to example.com closed

ClientAliveInterval 150

Dynamic MMap ran out of room

Reading package lists... Error!
E: Dynamic MMap ran out of room
E: Error occurred while processing vlc (NewVersion1)

apt-get update -o APT::Cache-Limit=25165824

Useful Debian Programs

Digital Camera

* Digikam, for all your digital camera needs

aptitude update
aptitude install digikam

Players and Viewers

How to Remote connect to Windows

aptitude update
aptitude install rdesktop

rdesktop ip.add.re.ss

or

rdesktop remoteconnection.example.com