Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Thursday, June 19, 2008

How to install HP LaserJet on Debian Lenny

If you have HP printer, you are lucky because most of HP printer can run on Linux. Thanks to HP Linux Imaging and Printing (HPLIP) project for supporting the linux community. HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux. This time I will show how to configure/install HP LaserJet P2015 on Debian Lenny aka testing.

Install cupsys and its dependencies using the following command.
dyna:/# apt-get install cupsys

Then install the Foomatics and install their related package with their dependencies
dyna:/# apt-get install foomatic-db foomatic-filters-ppds foomatic-filters foomatic-db-hpijs hplip hpoj

install hpoj if you using OfficeJet printer

Then using your browser, http://localhost:631 and you can configure your printer from here :)

Tuesday, June 3, 2008

Installing Lighttpd with MySQL plus PHP5 in Debian Lenny


Today i'm completely finish setting up one server with Debian aka Lenny with Lighttpd, MySQL and PHP5 support. This server mainly use for 'online' application like form application, intake application and other small application developed by our college etc. Why Lenny? I'm using Lenny because the Lenny tree seem like to be freeze right now before Debian 5.0 will be coming out soon on August 2008. From security wise, i'm always monitor my box and Lenny security mailing list and always update the server. Here the complete howto http://www.howtoforge.com/lighttpd_mysql_php_debian_etch

Wednesday, April 16, 2008

Connecting to Celcom Broadband using Nokia N80 on Debian GNU/Linux

Two last week I've a chance to suscribe Celcom Broadband for RM 68 package for maximum 384kbps speed (thats it what salesgirl telling me). I'm not buying together with dongle modem like from Huawei or Bluecube, so I'm just using my spare Nokia N80 handphone as a modem. From Shakir dan Irwan experience, i got some clue to setup this modem. So using Debian GNU/Linux and default 2.6.18 kernel here my journey begin...

See what a messages from the kernel

cosmos:~# tail -f /var/log/messages
Apr 21 02:02:12 cosmos kernel: usb 5-2: new full speed USB device using uhci_hcd and address 3
Apr 21 02:02:13 cosmos kernel: usb 5-2: configuration #1 chosen from 1 choice
Apr 21 02:02:13 cosmos kernel: usbcore: registered new driver cdc_ether
Apr 21 02:02:13 cosmos kernel: usb%%d: unregister 'rndis_host' usb-0000:00:1d.0-2, RNDIS device
Apr 21 02:02:13 cosmos kernel: rndis_host: probe of 5-2:1.10 failed with error -32
Apr 21 02:02:13 cosmos kernel: usbcore: registered new driver rndis_host
Apr 21 02:02:13 cosmos kernel: cdc_acm 5-2:1.8: ttyACM0: USB ACM device
Apr 21 02:02:13 cosmos kernel: usbcore: registered new driver cdc_acm
Apr 21 02:02:13 cosmos kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters

Then, edit wvdial.conf file and just put *99***1# as a phone number, the others just use a default. You can using wvdialconf or just do manual edit.

cosmos:~# more /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Phone = *99***1#
Password = pass
Username = user


Then, start connecting...

cosmos:~# wvdial
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> PPP negotiation detected.
--> Starting pppd at Mon Apr 21 02:04:48 2008
--> Pid of pppd: 3710
--> Using interface ppp0
--> pppd: h[08][06][08]p[0f][06][08]
--> pppd: h[08][06][08]p[0f][06][08]
--> pppd: h[08][06][08]p[0f][06][08]
--> pppd: h[08][06][08]p[0f][06][08]
--> pppd: h[08][06][08]p[0f][06][08]
--> local IP address 10.164.246.62
--> pppd: h[08][06][08]p[0f][06][08]
--> remote IP address 10.6.6.6
--> pppd: h[08][06][08]p[0f][06][08]
--> primary DNS address 202.188.0.133
--> pppd: h[08][06][08]p[0f][06][08]
--> secondary DNS address 202.188.1.5
--> pppd: h[08][06][08]p[0f][06][08]

Then, you just connected. See what ifconfig output

cosmos:~# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.164.39.45 P-t-P:10.6.6.6 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:6659 errors:0 dropped:0 overruns:0 frame:0
TX packets:6036 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:6780079 (6.4 MiB) TX bytes:675119 (659.2 KiB)

So, thats it... although the speed using this Nokia N80 as a modem a bit slow compare to Streamyx broadband, but its ok to check your daily email. I'll prepare to buy a new dedicate modem for the next time. I'm thinking Huawei E220 right now.

Wednesday, April 2, 2008

How to setup Atheros chipset (wireless) in Debian

For those of you who are not familiar how to setup wireless or wifi in linux, i'll show the simple way to do that. The first thing, you need to know your wifi hardware cards, whether PCI or USB, your chipset is support or not. If your chipset is support with linux driver, you're safe, if not get ready to scratch your head. I try to show here specific using Atheros chipset, but it may can apply in other chipset, just change the chipset name. Firstly install all the needed package using assistant-module. Please put non-free in your /etc/apt/source.list

# aptitute install module-assistant madwifi madwifi-tools
# module-assistant a-i madwifi
Done!

unpack

Get your hardware information.

#lspci -nn
01:02.0 Ethernet controller [0200]: Atheros Communications, Inc. AR5212 802.11abg NIC [168c:0013] (rev 01)

From the information above, i know i'm using Atheros chipset, in kernel module they known as ath_pci. Please refer this.

#modprobe ath_pci
# lsmod | grep ath_pci
ath_pci 83008 0
ath_rate_sample 12992 1 ath_pci
wlan 173820 4 wlan_scan_sta,ath_pci,ath_rate_sample
ath_hal 191664 3 ath_pci,ath_rate_sample

Then you need configure your card. The most commonly used command in wireless tools is iwconfig, which you can use to configure most of the wireless parameters, including the SSID and the wireless mode. For the wireless mode, Managed means that there is a wireless access point (WAP) on the network and Ad-hoc signifies that there is none. For example my NIC is named ath0 and my ESSID is yournetwork.

#iwconfig ath0 mode Managed
#iwconfig ath0 essid yournetwork
# iwconfig ath0
ath0 IEEE 802.11g ESSID:"yournetwork"
Mode:Managed Frequency:2.427 GHz Access Point: 00:1C:F0:62:9E:21
Bit Rate:24 Mb/s Tx-Power:14 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
......................

But you need to put all those above setting permanently in your network config setting. For Red Hat/Fedora user, you can put those setting in /etc/sysconfig/network-scripts/ifcfg-ath0. For Debian user you can put those network setting in /etc/network/interfaces. Because i'm using Debian, here my setting


# File /etc/network/interfaces
#The loopback network interface
auto lo
iface lo inet loopback
#My Wifi
iface ath0 inet static
address 192.168.1.1
netmask 255.255.255.0
wireless-essid yournetwork
gateway 192.168.1.1

In this example interface eth0 uses an ESSID of yournetwork. This is the basic step to configure Wifi on your network. I'll show you how to configure WEP and WPA encryption in next the post. Restart your network /etc/init.d/networking restart and now your can start surfing using wifi :)

Friday, March 21, 2008

How to set up startup services in easy way in Debian

In Debian and most other linux distribution, startup files are stored in /etc/init.d/ directory and symbolic linked between /etc/rcX.d/ directory exists. Debian based and Red Hat/ Fedora based distro uses System V initialization scripts to start services at boot time from /etc/rcX.d/ directory. Debian have special utility to control startup files/services.

rcconf
It is a console based interactive utility that allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off. To install just using apt-get rcconf. To start rcconf, login as root user and type rcconf
# rcconf

Thursday, February 21, 2008

How to install multimedia codecs, libdvdcss in Debian

Debian can to anything from pure unix server type machine to rich-multimedia desktop PC. After you do fresh installation, you need to do some housekeeping so as to enable you to play multimedia files which are encoded using proprietary or closed formats such as Microsoft's WMV files or Apple's quick time files. Here the way :

Open the file /etc/apt/sources.list and append the following line :

deb http://www.debian-multimedia.org etch main

then, update the packages using the command :

# apt-get update

Now you can install all the multimedia codecs as well as libdvdcss which is necessary to view DVD movies, using the

# apt-get install w32codecs libdvdcss2

Now you can install multimedia player like VLC, Mplayer, etc.

Wednesday, February 20, 2008

How to use apt-get behind proxy server in Debian

If you are a Debian GNU/Linux user, then you’re probably familiar with synaptic and apt-get to install application from software repositories. This post focussed on how to use apt-get/synaptic behind proxy server/firewall which under normal circumstances, you’re unable to use apt-get.

If you’re using Synaptic
Open up your Synaptic package manager (usually as root), go to Settings-> Preference -> Network. Enter your proxy server details like : username:password@proxyserver.net (or your server ip address), and put the proxy server port (usually 8080).

If you’re using command-line apt-get
Unlike Red Hat-based distro, in Debian you need to do some tweaking some to makesure your apt-get working using command-line.

Edit your /etc/bash.bashrc file as root.

Put these line at the end of your /etc/bash.bashrc file :

export http_proxy=http://username:password@yourproxyserver.net:port/
export ftp_proxy=http://username:password@yourproxyserver.net:port/

Then put the following code into the file /etc/apt/apt.conf.d/proxy

Acquire::http::Proxy "http://yourproxyserver.net:8080";

You can omit the username:password, if your proxy server has no password. That’s all for today! Happy apt-get-ing!

Friday, February 1, 2008

Finally i got my Debian again


In 2005, i put Debian 3.1 (Sarge) on my web server around 3 months to see how 'power' Debian it is. At that time, i'm waiting a new release for Slackware 10.2 and after that i'm shift back to Slackware. During three months using Debian as a production server, i have no big issue using them except once my web server got defaced. But this is not because the vulnerabilities from Debian itself but maybe misconfiguration of php.ini in Jooomla! CMS. Last week, i come again to Debian. The installation pretty straight forward, i know Etch have their GUI installer, but i'm prefer using their text based installer. I use DVD version that i got when i bought a linux magazine. The installation was complete using GNOME as a default window manager.