Differences between revisions 131 and 132
Revision 131 as of 2008-11-04 23:59:37
Size: 24219
Comment: update to flash player. sending to flashplayer page
Revision 132 as of 2008-11-11 14:47:36
Size: 24649
Comment: readded manual flash install after mailing lists agrees to do that
Deletions are marked like this. Additions are marked like this.
Line 647: Line 647:
 *If for some reason you are still not able to use flash, you can install it manually.
 * Download flashplayer.tar.gz file from http://www.adobe.com/products/flashplayer/
 * Extract it.
 * And move one of the files over to the folder:
{{{
cp /home/lucas/Desktop/libflashplayer.so /usr/lib/mozilla/plugins/
cd /usr/lib/iceweasel/plugins/
ln -s /usr/lib/mozilla/plugins/libflashplayer.so
}}}
 * Restart Firefox/iceweasel

Translation: [:Manual-HowtoPolish:Polski],[:Manual-HowtoFrench:Français],[:Manual-HowtoDutch:Dutch],[:Manual-HowtoGerman:Deutsch]

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

?TableOfContents(2)

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

Debian Services

Installing and Configuring Postfix on Debian

See ["Postfix"]

Debian Postfix and smtp.sbcglobal.yahoo.com

See ["Postfix"]

Ampache (Music Server) on Debian

See ["Ampache"]

MoinMoin Wiki with Apache2 and Mod Python

See ?ApachePython

Fax Server

See HylaFax

Network Time Synchronization

See ["NTP"]

FTP Server

Install

  • Install Ftp Server ("Very secure ftp server")

aptitude update
aptitude install vsftpd
  • Ftp server has been installed

Configure

  • Now configure your server
  • Edit /etc/vsftpd.conf

vi /etc/vsftpd.conf
  • [Optional] Disable Anonymous account by finding the line that says anonymous_enable=YES and make it

anonymous_enable=NO
  • [Optional] Allow Write access (upload access). Find and uncomment the following line:

write_enable=YES
  • [Optional] Add you banner when people log in. Find and uncomment this #ftpd_banner=Welcome to blah FTP service. line and make it:

ftpd_banner=Welcome to example.com FTP service. Enjoy.
  • [Optional] Allow local users to log in. Uncomment the following line:

local_enable=YES

Photo Album Server

Install

  • [Optional] You should have apache, mysql and php installed already. If you don't have these installed please install them.

apt-get update
apt-get install apache2
apt-get install mysql-server
apt-get install php5
apt-get install php5-mysql
  • Let's start.
  • Install gallery software

apt-get update
apt-get install gallery2
  • Provide root password for the database.
  • Done with install.

Configure

  • Now you need to enable gallery2 in your apache2 configuration.
  • Uncomment the following line in /etc/apache2/conf.d/gallery

Alias /gallery2 /usr/share/gallery2
  • [FYI]/etc/apache2/conf.d/gallery is a link to /etc/gallery2/apache.conf

*Now restart or start your apache server/

/etc/init.d/apache2 restart

Gallery2 configuration

  • Start the installation process and follow the directions.
  • Then they ask you to copy or create login.txt in /usr/share/gallery2. Download the login.txt and copy it into that folder

cp /home/lucas/Desktop/login.txt /usr/share/gallery2/
  • Follow to the next step and pick a standard installation

  • Now choose a folder where you are going to store the pictures, movies etc.

mkdir /usr/share/gallery2/g2data
chmod 755 /usr/share/gallery2/g2data
chown www-data:www-data /usr/share/gallery2/g2data
  • First one creates a folder, second makes it user writable, 3rd changes the owner to web server.
  • Provide password for the database
  • If you need to create gallery2 database. Log into mysql

mysql -u root -p
  • Issue this command:

create database gallery2;
  • Create an admin account
  • Now lets go to gallery2 components.

Gallery2 Components

  • They are all selected, so go over a list and desable the once you don't want. (commerce print cars, new user registration, quotas, etc)
  • If you need to install some programs you could issue this commands:

apt-get install imagemagick

Alias /photos /usr/share/gallery2

Manage Photos

  • Now you are ready to manage photos.
  • Log in with your admin user and start adding files to your photo server

Samba

See the Debian Wiki page ?SambaDomainController

NFS Server

See the Debian Wiki page ["NFSServerSetup"].

VMware Server On Debian

  • Very good how-to which didn't require from me any additional configuration to install vmware on debian and then windows xp as a guest os is here:
  • See ["VMware"] article.

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

VMware Kernel Upgrade

  • On an upgrade when your kernel has been updated you need to download the kernel headers and reconfigure vmware.

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

VMware on amd64

  • In order to install vmware on amd64 you have to install few extra libs:

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 Anti-Spam Anti-Virus Gateway Email Server

http://lucasmanual.com/mywiki/DebianAntiSpamGatewayEmailServer

RSA Authentication Manager

  • RSA Authentication Manager (needed for working with RSA's SecurID tokens) doesn't support Debian. Getting it to work in Debian is... a challenge, unless you have this simple 45-step HOWTO: http://discord.ensued.net/install_rsaauthmgr_with_etch_en.txt

  • Trust me, 45 steps only seems a lot until you spent 3 days working out what the 45 steps should be...

Bacula Enterpise Bacukup

[http://lucasmanual.com/mywiki/Bacula Bacula Open Source Enterprise Bacukup Solution Installation and Configuration]

Debian Printing

http://lucasmanual.com/mywiki/DebianPrinting

Debian Configuration

Change from dhcp to static ip

  • edit /etc/network/interfaces
  • comment iface eth0 inet dhcp and below type :

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
  • Your file should look like:

#iface eth0 inet dhcp
iface eth0 inet static
    address 192.168.1.200
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
  • or

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

Subversion

  • Svn is a software that manages any type of data. It monitors its changes, lets you update them, and if something went wrong you can go back to previous version with no problems.
  • Let's install it on Debian:

apt-cache search svn
aptitude install subversion
  • Subversion is installed
  • The story goes like this: I have a project I am working on. It is located at

/home/lucas/my_best_project
  • This folder includes

/home/lucas/my_best_project/trunk/install.c
/home/lucas/my_best_project/trunk/readme.txt
  • I keep my working files in trunk. I want it in subversion now!
  • We need to tell subversion where it can store its repositories:
  • It will be in

/usr/local/src/
  • Now create repository directory:

svnadmin create /usr/local/src/my_best_project
  • Now I am going to import my_best_project to svn

svn import /home/lucas/my_best_project file:///usr/local/src/my_best_project -m "initial import"
  • Folder /home/lucas/my_best_project is not important anymore. SVN is not concerned what you are going to do with it.

  • Now we need to start working with subversion and we do that by creating a folder where we can work on my best project with subversion. It will be in /home/lucas/new_folder/ We need to go to that folder. And from that folder we issue command:

svn checkout file:///usr/local/src/my_best_project
  • Now it created

/home/lucas/new_folder/my_best_project
  • This folder contains files I kept in a trunk. I can now work on it and let svn take care the version tracking.

* Optional, you could use subversion over ssh. You need to install subversion on your computer and then:

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

* Done. Now its time to make that tool great.

Multimedia player and codec on Debian

  • You can install great player that will play mp3, ogg, wma, aac, aacp stream, ampache stream, called ["Amarok"].

aptitude update
aptitude install amarok

In order to have a full media experience in Debian you need to do the following

/etc/apt/source.list

deb http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia stable main
  • [Optional]Add the GPG key:

wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2007.02.14_all.deb
dpkg -i debian-multimedia-keyring_2007.02.14_all.deb
  • Now install a dvd player called xine :

aptitude update
aptitude install xine-ui
  • Install library that helps programs read DVDs.

aptitude search libdvdcss2
  • Now install windows file format support:

aptitude install w32codecs
  • On amd64 (64 bit) architecture install:

aptitude install w64codecs
  • To install mp3 support install:

aptitude install libxine1-ffmpeg
  • Done. You can remove the mirror we just entered from sourcelist if you wish to do so.

Ati binary driver

Steps borrowed from [http://michael.susens-schurter.com/blog/2006/11/20/installing-fglrx-ati-drivers-in-debian-etch/ Michael Schurter's blog]. Tips borrowed from [http://gentoo-wiki.com/HOWTO_ATI_Drivers Gentoo wiki].

  • Step 0: Install the required packages (you may need to add "non-free" to /etc/apt/sources.list)

aptitude update
aptitude install fglrx-control fglrx-driver fglrx-kernel-src module-assistant mesa-utils
  • Step 1: Change to kernel and kernel module source code directory.

cd /usr/src
  • Step 2: Prepare your system to build new kernel modules.

module-assistant prepare
  • Step 3: Build the fglrx kernel module.

module-assistant a-i fglrx
  • Step 4: Make a copy of your xorg.conf file:

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.todaysdate
  • Step 5: Edit your /etc/X11/xorg.conf file, and set your display driver to fglrx
  • Locate the device section and add the corresponding lines Section "Device".

Section "Device"
   Driver "fglrx"
   Option "VideoOverlay" "on"
EndSection
  • Driver line is probably currently set to "radeon" or "ati". Remember which name you have because you will use it in step #7.
  • Also enable XVideo in Extentions

Section "Extensions"
   Option "XVideo" "Enable"
EndSection
  • Step 5: Exit Gnome (or KDE, just get out of X Windows), press ctrl-alt-F1 to get a console, login as root.
  • Step 6: Stop Gnome Display Manager:

/etc/init.d/gdm stop

Or KDE Display Manager

/etc/init.d/kdm stop

Or X Display Manager

/etc/init.d/xdm stop
  • Step 7: Remove the old kernel module

modprobe -r radeon
  • Step 8: Load the new kernel module

modprobe fglrx
  • Step 9: Start the Display manager (substitude gdm with kdm or xdm)

/etc/init.d/gdm start
  • Step 10: Test the 3d acceleration

glxinfo | grep direct
  • Step 11: Test the xvideo extension

xvinfo

Mount Windows Share

  • You need to have smbfs installed. If you don't do this:

aptitude update
aptitude install smbfs
  • To mount windows share drive you need to create a folder:

mkdir somefolder
  • As root or with root privilages (su root or sudo)

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

If you don' 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

  • See if your card is in a list.

lspci -v
  • Add a network card by a hardware number. Replace 00:00:..:00 with your hardware number. It should be 16 characters.

ifconfig eth1 hw erher 00:00:..:00 uo

Raid 1 Setup

http://lucasmanual.com/mywiki/DebianRAID

Power Users

Sudo

  • If sudo command is not installed, install it.

aptitude update
aptitude install sudo
  • Then run visudo

visudo
  • Copy root ALL=(ALL) ALL and paste it right below. Then change root to your user name on the pasted line.

yourusername    ALL=(ALL) ALL

Disable ssh root access

  • Edit file sshd_config file

vi /etc/ssh/sshd_config
  • On a line where you see Permit root login change it to no

PermitRootLogin no
  • Restart or reload ssh

/etc/init.d/ssh force-reload
  • This will prevent other users from trying to get guess your password. 100s of lines on your system that look:

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

  • Install AWStats

aptitude update
aptitude awstats
  • Configure the apache2 for awstats
  • Copy configuration file for apache2.

cp /usr/share/doc/awstats/examples/apache.conf /etc/apache2/conf.d/awstats
  • Then edit /etc/awstats/awstats.conf file and make sure the file contains (double check the apache2 word)

LogFile="/var/log/apache2/access.log"
SiteDomain="mysite.org"
LogFormat=1
  • Now change a permission on apache log file

chmod o+r /var/log/apache2/access.log
  • Make it a default that access.log has these permissions.
  • Edit the /etc/logrotate.d/apache2 and make sure it has these lines

 create 644 root adm
  • And

prerotate
    /usr/lib/cgi-bin/awstats.pl -config=awstats.www.mysite.org.conf  -update
  endscript
  • Final file should look similar to :

/var/log/apache2/*.log {
        weekly
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        create 644 root adm
        sharedscripts
        prerotate
            /usr/lib/cgi-bin/awstats.pl -config=awstats.conf -update        endscript
        postrotate
                if [ -f /var/run/apache2.pid ]; then
                        /etc/init.d/apache2 restart > /dev/null
                fi
        endscript
}
  • Reload apache

/etc/init.d/apache2 reload
  • And visit:

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

  • To make it easier to remember the address you can edit /etc/apache2/conf.d/awstats and add this line.

RedirectMatch ^/logs /cgi-bin/awstats.pl?config=awstat.conf
  • Now you can access the awstats statistics by going to

http://www.mysite.com/logs

  • Done.

unixODBC

  • Install odbc, and mssql drivers (tdsodbc)

aptitude update
aptitude install tdsodbc unixodbc
  • Create a driver template.

vi /etc/freetds/tds.driver.template
  • Inside add :

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

vi /etc/freetds/tds.dsn.template
  • And inside add:

[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]
  • Now run this command to add your driver to unixodbc

odbcinst -i -d -f /etc/freetds/tds.driver.template
  • Now you add dsn. You have 2 options.
  • Add system DSN for all users

odbcinst -i -s -l -f /etc/freetds/tds.dsn.template
  • Add dsn to a user your are running a command on:

odbcinst -i -s -f /etc/freetds/tds.dsn.template
  • Now test your connection:

isql -v DSN_NAME username password
  • You should get something like

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

Troubleshooting

  • If you can not connect it is probable that your database is listening on a different port.
  • Try this:

telnet myserver 1433
  • You should see something like:

Trying 10.3.3.10...
Connected to myserver.
Escape character is '^]'.
  • type quit to exit. Replace 1433 with a port number, replace myserver with your servers name.

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

Apt Preferences

vi /etc/apt/preferances
  • And inside put these lines. Change the Pin-Priority to reflect your default install.
  • If you are using testing Debian make sure testing is the bigger number.
  • This file will install only from the highest pin but it will show you if the packages is available in testing or unstable

Package: *
Pin: release a=stable
Pin-Priority: 600
Package: *
Pin: release a=testing
Pin-Priority: 450
Package: *
Pin: release a=unstable
Pin-Priority: 400
  • Now add testing and unstable to /etc/apt/source.list by coping and paste deb and deb-src lines and change stabel to testing, and then again stable to unstable.

  • Update list

aptitude update

Debian User Configuration

Change default editor

  • Install your editor
  • Example:

aptitude update
aptitude install vim
  • Run configuration change

update-alternatives --config editor
  • From a list pick your editor. And you are done.

Change default pdf viewer

  • Install your pdf viewer
  • Click right mouse button on a pdf file
  • Change: 'Properties -> Open with' to your favorite pdf viewer.

Check installed browser plugins

  • Input "about:plugins" into URL of browser

Java Runtime Enviroment (JRE)

  • Here is how to install Java on Debian

You will need to add 'non-free' to your /etc/apt/source.list then do:

aptitude update
aptitude install sun-java5-jre
aptitude install sun-java5-plugin

If you want you can take away 'non-free' when done, and do aptitude update.

  • This package that you just installed is not a development environment and doesn't contain development tools such as compilers or debuggers.
  • For development tools, you need to install the Java Development Kit JDK(TM) package.

aptitude update
aptitude install sun-java5-jdk

Testing Version of Debian (lenny) contains Java 6.

Flash Player

  • Refere to [:FlashPlayer:] page for instructions on how to install flashplayer plugin for Iceaweasel/firefox on Debian System

  • If for some reason you are still not able to use flash, you can install it manually.
  • Download flashplayer.tar.gz file from http://www.adobe.com/products/flashplayer/

  • Extract it.
  • And move one of the files over to the folder:

cp /home/lucas/Desktop/libflashplayer.so /usr/lib/mozilla/plugins/
cd /usr/lib/iceweasel/plugins/
ln -s /usr/lib/mozilla/plugins/libflashplayer.so
  • Restart Firefox/iceweasel

Laptop and Debian

Intel ipw2200

  • The ipw2200 drivers are now part of kernel.
  • [:ipw2200:]

Broadcom wireless card

  • The various drivers for broadcom card can be found here:
  • [:bcm43xx:]

Authenticate with wpa using PSK TKIP

* Install wpasupplicant

aptitude update
aptitude install wpasupplicant

* Open /etc/network/interfaces

vi /etc/network/interfaces

*If you see "iface eth2..." add the following lines, but change ssid and password:

iface eth2 inet dhcp
wpa-ssid thisismynetworkname
wpa-key_mgmt WPA-PSK
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-psk thisismypassword
wpa-driver wext

*Exit, and now type:

ifup eth2

*Done. If you want you your wireless card to connect each time you boot your computer add this above "iface eth2.."

auto eth2

*Done. [Optional](see the [:WPA:WPA page] for status on wpa support in debian)

Intel Graphic card - Higher reolution

  • install 915resolution

aptitude install 915resolution
  • See what resolutions are available

915resolution -l
  • If the resolution you desire is not listed you will need to dpkg-reconfigure xserver-xorg and add new resolutions.

  • For example (using mode 5c (1920x1440):

sudo 915resolution 5c 1280 800 24

User Manuals

DVD9 to DVD5

[http://lucasmanual.com/mywiki/DVD9toDVD5 DVD9toDVD5]

DVD9 to AVI

[http://lucasmanual.com/mywiki/DVD9toAVI DVD9toAVI]

rsync

[http://lucasmanual.com/mywiki/rsync rsync]

Troubleshooting

SSH terminal connection timeout

  • If you get an error:

Read from remote host example.com: Connection reset by peer
Connection to example.com closed
  • Edit /etc/ssh/sshd_config and add:

ClientAliveInterval 150

Dynamic MMap ran out of room

  • If you see an error like:

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

MySQL

[http://lucasmanual.com/mywiki/MySQL MySQL]

Useful Debian Programs

Digital Camera

* Digikam, for all your digital camera needs

aptitude update
aptitude install digikam

CD and DVD

* K3B, for burning cd/dvd.

aptitude update
aptitude install k3b

Players and Viewers

Flash

  • For Flash support you need to add contrib to /etc/apt/sources.list , then

aptitude update
aptitude install flashplugin-nonfree

How to Remote connect to windows

  • You can connect to Microsoft Windows Remote Connection via rdesktop
  • Install rdesktop

aptitude update
aptitude install rdesktop
  • Then you can start rdesktop or from a command line

rdesktop ip.add.re.ss
or
rdesktop remoteconnection.example.com