This explains basics: http://www.debian.org/doc/FAQ/ch-pkg_basics.en.html Visit http://www.lucasmanual.com/mywiki for up to date manuals

Change from dhcp to ststic ip

edit /etc/network/interfaces

comment iface eth0 inet dhcp and below type : iface eth0 inet static tabaddress 192.168.1.200 tabnetwork 192.168.1.0 tabnetmask 255.255.255.0 tabbroadcast 192.168.1.255 tabgateway 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

Installing and Configuring Postfix on Debian

  • Install postfix (this will remove exim since there can't be two mail systems)(If you have a website, choose internet site if configurations will ask):

apt-get install postfix

  • Check the log mail.log, mail.err, mail.info, mail.warn to see if postfix runs.

cat /var/log/mail.log

  • Configure: Now add your domain to config files, so others can't abuse your mailsystem. We do it with postconf

postconf -e “myorgin = example.com”

  • Now add your hostname (computer name). Use command “hostname” if not sure. It will show you your hostname.

postconf -e “myhostname=server1.example.com”

  • Now add domain name that your system will handle.

postconf -e “replay_domains = example.com, example2.com, example3.com”

  • Reload Postfix Server:

postfix reload

  • Let's test our mailserver. Type

telnet localhost 25 You should see: Trying 127.0.0.1… Connected to localhost.localdomain. Escape character is '^]]'. 220 server1.exemple.com ESMTP Postfix (Debian/GNU) Now sent an email to yourself: mail from:you@youremial.com rcpt to:user@exemple.com data Then: To: user@example.com From: you@youremail.com Subject: Hey my first email This is my first email on debian postfix after installing configuring it. It was easy. See you Now to end data hit enter, type in a dot, and hit enter again: . Then quit Your are done. you can type “mail” and see if you have some.

  • Now let's get to next step:
  • If you have a router with firewall you will need to enable port 25 and forward that port to your computer.
  • You will need to enter your MX records in your domain provider. (who ever that is)(ex. godaddy.com)
  • Check your mx records: go to http://www.dnsstuff.com/ locate “DNS lookup”. From pulldown menu select “MX”. Type in your domain name (ex. example.com). You should see some records there. If you don't see any MX records go back to previus step. You have to have MX record otherwise other computers won't be able to see you when sending emails.
  • Usefull commands:

qshape mailq qshape deferred postsuper postsuper -r ALL (requeue all emails)

  • You should be set. If your isp is blocking the traffic then you might need to do the following:

Debian Postfix and smtp.sbcglobal.yahoo.com

  • SBC global block port 25 on its DSL users:

http://help.sbcglobal.net/article.php?item=4640

  • We will use sbc smtp server via authentication to sent emails. Do this:
  • Install these two modules (They tell postfix how to authenticate):

apt-get postfix-tls libsasl2-modules

  • Edit main.cf by using postconf. Just type:

postconf -e “relayhost = smtp.sbcglobal.yahoo.com” postconf -e “smtp_sasl_auth_enable = yes” postconf -e “smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd” postconf -e “smtp_sasl_security_options = noanonymous”

  • Create a file called sasl_passwd in /etc/postfix/sasl_passwd. Inside type in

smtp.sbcglobal.yahoo.com username@sbcglobal.net:mypassword

  • Now change permisions so others can't read it:

chmod 600 /etc/postfix/sasl_passwd

  • Now postmap it. (creates database-like file so postfix can read it)

postmap /etc/postfix/sasl_passwd

  • Restart postfix

postfix reload

  • Done. You can use “mutt” to sent emails outside.

Mailman on Debian with Postfix, instalation and configuration

  • Install mailman:

apt-get install mailman

  • When done type:

newlist mailman

  • Start mailman

/etc/init.d/mailman start

  • You should be able to see mailman running now. Visit:

http://www.yourwebsite.com/cgi-bin/mailman/admin or http://localhost/cgi-bin/mailman/admin

  • Because postfix is secendary choice for Debian we need to add few more stuff:
  • Edit /etc/postfix/main.cf, and where you see “relay_domains” add lists.yourdomain.com. You would get something like this:

relay_domains = example.com, lists.example.com

  • In same file add ,hash:/var/lib/mailman/data/aliases after alias_maps

alias_maps = hash:/etc/aliases,hash:/var/lib/mailman/data/aliases

  • Now type:

postconf -e “transport_maps = hash:/etc/postfix/transport” postconf -e “mailman_destination_recipient_limit = 1”

  • In /etc/postfix/master.cf add:

mailman unix - n n - - pipe

  flags=FR user=list
  argv=/var/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
* Edit or create /etc/postfix/transport. Add this line:

lists.example.com mailman:

  • Then postmap it:

postmap /etc/postfix/transport

  • Now edit /etc/mailman/mm_cfg.py and add:

MTA = 'Postfix' DEB_LISTMASTER = 'postmaster@example.com' POSTFIX_STYLE_VIRTUAL_DOMAIN = 'lists.lucasmanual.com'

  • Done. Now restart postfix, mailman

postfix reload /etc/init.d/mailman restart

  • Create a mailing list:

newlist list_name@lists.example.com>

  • If you want archives add this to /etc/apache2/apache2.conf

Alias /pipermail/ /var/lib/mailman/archives/public/ Alias /images/mailman/ /usr/share/images/mailman/

  • Done. Go to

http://lists.yourwebsite.com/cgi-bin/mailman/listinfo/list_name/

SSH terminal connection

  • 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

Intel ipw2200 wireless card on Debian, instalation

  • Install module assistant for easier module configuration

apt-get install module-assistant

  • Now prepare for some kernel module. It will install one more required package.

module-assistant prepare

  • Now install ieee80211

apt-get install ieee80211-source

  • Install it

module-assistant -t build ieee80211-source

  • Now get ipw2200 software. You will need to add contrib to /etc/apt/source.list

apt-get install ipw2200-source

  • Now install the driver

module-assistant -t build ipw2200-source

  • Due to FCC or other restrictions, we need to download firmware from: (click agree on the bottom)

http://ipw2200.sourceforge.net/firmware.php?fid=6

  • Untar it

tar xzvf ipw2200-fw-2.4.tgz -C /usr/lib/hotplug/firmware/

  • Type:

modprobe ipw2200

  • Then this will tell you a list of wireless devices:

iwconfig

  • Done. In my case wireless card was attached to eth2

Ampache on Debian

  • We need apache and php. If this is not installed we need to install it. do “apt-cache policy apache2” to see if it is installed.

apt-get install apache2 apt-get install php5 php5-mysql php5-gd

  • Download ampache and extract it

wget http://www.ampache.org/downloads/current.tar.gz tar -xzvf current.tar.gz

  • Move the ampache to the currect folder:

mv ampache-3.3-beta4 /usr/local/bin/ampache cd /usr/local/bin/ampache

  • Change permisions so apache server can read it

chown -R www-data:www-data /usr/share/ampache

  • Edit ampache file: ”/etc/apache2/conf.d/ampache” (this file does not exits so we will create it) and add:

Alias /ampache ”/usr/local/bin/ampache/” <directory />

      DirectoryIndex index.php index.html
      Options Indexes MultiViews
      AllowOverride None
      Order allow,deny
      Allow from all

</directory>

  • Restart apache

/etc/init.d/apache2 restart

  • Now ampache needs mysql. If you have one go to next step. Otherwise install it:

apt-get install mysql-server

  • Almost done. Now go to this link and follow directions.(enter your database password and press install.)

http://localhost/ampache/install.php

  • Done. Enjoy
  • When you add music. www-data needs to be able to read your music. So you need to add it to group. This can be done by:

chgrp -R www-data ./* or in my case i created group users addgroup users chgrp -R users path/to/mymusic/* adduser www-data users

  • Done. Amapche uses around 20kb of bandwith per stream per user.

Multimedia player, codec on debian

/etc/apt/source.list

deb http://mirrors.ecology.uni-kiel.de/debian/debian-multimedia etch main

  • Now install xine:

apt-get update apt-get install xine-ui

  • Now install windows file format support:

apt-get install w32codecs

mod_python,psp -pytohon scripting pages, installation and configuration on debian

  • Installing psp with mod python on debian and apache2

apt-get update apt-get install libapache2-mod-python

  • Module should be enabled, to check type:

a2enmod mod_python

  • Enable psp support by adding following in /etc/apache2/httpd.conf :

AddHandler mod_python .psp .psp_ PythonHandler mod_python.psp

  • Save the file and reload apache:

/etc/init.d/apache2 reload

  • Done enjoy.
 
debian.txt · Last modified: 2008/10/03 16:00 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki