2005-06-25 nuro
Why do people send things out in Nero .nrg format? Such an annoyance, thankfully Greg has written a Nero to ISO conversion program which is available from Gregs place. Worryingly Nero are taking a real MS stance in their move to Linux, not only have they used GtkTosters interface (with a license of course) but they're just using cdrecord! Seems they're saying "Hey, you can do everything you did before, by paying us money".
Proprietory formats suck. UnrealTournament 2003/4 rules on Linux! I got the following hardware, 512SDRAM, 256 GeForce FX5600, AMD Barton 2.1g, and it totally owns! I swear the frame rate is better than on Windows.
2005-06-22 bookings
Today has been rather hectic, yet still no sign of a database driven blog for the readers just yet. This is a body of an email I wrote some time ago for a very good friend and rather than trash can this attachment I'll paste it here.
Here is the booking table:
mysql> describe booking; +--------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------------------+----------------+ | intId | mediumint(9) | | PRI | NULL | auto_increment | | d | datetime | | | 0000-00-00 00:00:00 | | | intApartment | mediumint(9) | YES | | NULL | | +--------------+--------------+------+-----+---------------------+----------------+ 3 rows in set (0.00 sec)
Here is the apartment table:
mysql> describe apartment; +------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+----------------+ | intId | mediumint(9) | | PRI | NULL | auto_increment | | strAddress | mediumtext | YES | | NULL | | | intRooms | tinyint(4) | YES | | NULL | | +------------+--------------+------+-----+---------+----------------+ 3 rows in set (0.00 sec)
Here is the contents of booking (probably more than I need to paste):
mysql> select * from booking; +-------+---------------------+--------------+ | intId | d | intApartment | +-------+---------------------+--------------+ | 1 | 2005-02-02 00:00:00 | 1 | | 2 | 2005-02-02 00:00:00 | 1 | | 3 | 2005-02-02 00:00:00 | 2 | | 4 | 2005-02-02 00:00:00 | 2 | | 5 | 2005-02-02 00:00:00 | 2 | | 6 | 2005-02-02 00:00:00 | 3 | | 7 | 2005-02-02 00:00:00 | 3 | | 8 | 2005-02-02 00:00:00 | 4 | | 9 | 2005-02-02 00:00:00 | 5 | | 10 | 2005-02-08 00:00:00 | 6 | | 11 | 2005-02-08 00:00:00 | 6 | | 12 | 2005-01-02 00:00:00 | 4 | +-------+---------------------+--------------+ 12 rows in set (0.00 sec)
And the apartment table:
mysql> select * from apartment; +-------+--------------------+----------+ | intId | strAddress | intRooms | +-------+--------------------+----------+ | 1 | address | 1 | | 2 | address | 12 | | 3 | addres | 4 | | 5 | address | 3 | | 6 | addresskkkkkkkkkkk | 1 | +-------+--------------------+----------+ 5 rows in set (0.00 sec)
What I needed was to see what bookings had no apartment (orphans); here is the join output
mysql> select * from booking b left join apartment a on b.intApartment = a.intId where a.intId is null; +-------+---------------------+--------------+-------+------------+----------+ | intId | d | intApartment | intId | strAddress | intRooms | +-------+---------------------+--------------+-------+------------+----------+ | 8 | 2005-02-02 00:00:00 | 4 | NULL | NULL | NULL | | 12 | 2005-01-02 00:00:00 | 4 | NULL | NULL | NULL | +-------+---------------------+--------------+-------+------------+----------+ 2 rows in set (0.00 sec)
left join means "value must exist on left side of the 'on'".
select * from tblA a join tblB b on a.id = b.extId; ^^^^^^ +--- value exists on the left side of join.
Right join is the opposite, the value exists in the table you join.
This is similar to the SQL Server approaches, but they choose to use INNER and OUTER joins to mean the same thing. OUTER join will join rows where the value is not in results. INNER will join rows ONLY with values present.
This is all because of course it took me an age to work around the sub select missing in mysql 3. Version 4 has sub selects, but I dont know which version of mysql this could be running on.
2005-06-19 spf
Two things:
- Scenario
You have two mail servers, separated by an internet cloud, both are on dynamic IP addresses, so both use their own ISP to send mail to each other. Both use SPF, one of backup of other. Set a perm SPF rule like this in /var/qmail/control/spfrules:
ip4:w.x.y.z
- This page
I have decided to turn this page into a database driven blog. It's been just over a month and this text file has grown too large for a descent page render time. Sorry.
2005-06-18 work, work, work
Lots going on this morning thus far. I've been in the garden with the mattock. Here is how over worked I'm looking. 80k.
2005-06-16 teach me bash!
Ok, where should I start? BASH is great though, it's what makes UNIX like operating systems so flexible. Those who spend the short time required to learn and develop their BASH skills turn out to be the most efficient people I have ever known. BASH is so flexible it can be used as CGI or as a command line shell script.
#!/bin/bash echo "Hello world!"
Save this as hello.sh, then chmod 755 the script so that anyone can run it. When this is executed you will see the text "Hello world!" appear.
"I want to loop things"
A good place to start is the for loop, its got a limited number of 'iterations'. The other two loops are while, and do while.
for i in 1 2 3 ; do echo "Value is $i" ; done ;
This loop runs three times, on the first loop we see that $i becomes 1, at the end of the first loop the done trigger tells the loop to use the next value for i, this time 2, and finally three. When the done is reached and there are no more possibilities for i the loop will exit.
Unlike c type languages, we cannot modify i within, or outside the list of possibilities. For instance, the following is perfectly legal in c:
for( ; i != 3 ; ) { i=3 ; }
However, the above is bad practice, sometimes one likes to do that. The next type of loop is a while loop. Similar to the above the while loop will continue to execute the loop until the condition is met. If the condition is already met before the loop begins then the loop will not execute.
2005-06-15 too much gym
I am taking it easy for a while, I have probably pulled/torn a muscle in my pectoral. Hurts somewhat when pressure is applied. Shame I love to bench press stuff during my lunch break, I guess I can't do that for a while. This has knock-on effects.
2005-06-12 music
I've received an interesting response from my playlist generator!
"Ok Ed, thanks for the playlist, but my Linux is silent! I don't want to be told how to use OSS as it's old now, I want to listen with ALSA because I've heard it's better"
Ok, so I added the ALSA part, primarily as it's the way forward. For the remainder of this I will assume that you have a 2.6 kernel, have ALSA support compiled in (if not, see the blog entry for 20050523 and compile your kernel, Device drivers->Sound <*>->Advanced Linux Sound Architecture <*>. You will need Sequencer support, OSS Mixer API, OSS PCM, and OSS Sequencer API. You will then need to choose the appropriate sound device driver from the Generic/ISA/PCI sections. Compile and reinstall the kernel if required.
If the above is complete then you will need to get the ALSA tools, this, for me is carried out with apt-get:
apt-get install alsa-base alsa-oss alsa-utils
If you are a gnome user, you may want to add gnome-alsamixer, alsamixergui to list of packages above. Once the above is installed you should load alsamixer, and set all the outputs to max, then set your amplifier to min. Check that esd/artsd are not running, then run xmms. Set the output plugin to ALSA, and loads a peaceful MP3 (you really, really, really dont want to tear the cone on your best speakers! [if you do, elastoplast is not a bad mending material]).
You must now load the alsa-mixer of your choice, this could be the gnome-alsamixer if you like, once it is loaded you need to finely adjust the master/PCM volume controls until your hear some output on your speakers. If you are at all nervous about this, as you should be, then I advise that you plug some cheap headphones and last the volume sliders about a little more generously. Finally, once you have perfected the volume levels use alsactl to save your settings:
alsactl store
2005-06-10 zabbix
Zabbix is a great tool, it's the kebab of network monitoring tools, here's how to install on OpenBSD.
cd /usr pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/wget-1.8.2.tgz
(If this file does not exist, try a mirror from the www.openbsd.org page, or the version may be out dated ).
wget http://ftp.chg.ru/pub/OpenBSD/3.6/ports.tar.gz tar zxvf ports.tar.gz
(May take a few minutes). Now is a good time to get fping, which can ping many hosts in a single command. From what I can tell it pings hosts in a singular fashion, but you specify many hosts. I had a theory some time ago about making a threaded pinger so that a single process can ping many at once, collate the results and return to caller. This never materialised.
pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/fping-2.2b1.tgz
Zabbix relies on a MySQL/Postgres database server. For the purpose of this document we shall use MySQL, Postgres is technically better, but MySQL is just a little bit faster, and it's that nanosecond that counts when pulling many pages off, generating images with libpng etc.
pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/mysql-server-4.0.20.tgz cd /usr/local/bin ./mysqld_safe &
Now the server needs user and password setup, this is perhaps the two most annoying statements that I forget about when installing MySQL, but here it is, on my website for me to remember forever:
/usr/local/bin/mysql_install_db -u root password password /usr/local/bin/mysqladmin password password
Ok, so we have fping, the ports collection, mysql now for PHP:
pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/php4-core-4.3.10.tgz pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/php4-mysql-4.3.10.tgz pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/php4-gd-4.3.10.tgz /usr/local/sbin/phpxs -s cp /usr/local/share/doc/php4/php.ini-dist /var/www/conf/php.ini /usr/local/sbin/phpxs -a mysql /usr/local/sbin/phpxs -a gd vi /var/www/conf/httpd.conf
The following line will need to be uncommented:
#AddType application/x-httpd-php .php
Set httpd to run without chroot in /etc/rc.conf (do not use like this if the server is already live)
httpd_flags="-u"
Test that MySQL is running:
mysql --user=root --password=password
n order to talk SNMP you need the net-snmp package. This, like all the other pkg_add commands can be done from ports so that you get a little more speed from your applications when you compile them for your architecture, but in most cases the i386 binaries are fast enough. This is the general argument between the gentoo and debian communities, where all the PC binaries from debian are i386 and gentoo allows all packages to be compiled from source with the emerge util. Generally, the time spent compiling is never recuperated, in my opinion.
pkg_add http://ftp.scarlet.be/pub/openbsd/3.6/packages/i386/net-snmp-5.1.2.tgz
Now we must download and install Zabbix itself.
mkdir -p /downloads wget http://heanet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.0.tar.gz tar zxvf zabbix-1.0.tar.gz cd zabbix-1.0 mysql -uroot -ppassword -e"create database zabbix" cd create/mysql mysql -uroot -ppassword --database=zabbix < schema.sql mysql -uroot -ppassword -e"grant all on zabbix.* to zabbix@'localhost' identified by 'zabbix'"
(If you have a backup of the zabbix database from mysql_dump you may import it with the same commands that the schema file was imported with).
./configure --with-mysql --with-net-snmp make
Now copy the daemons to /usr/local/zabbix/bin
mkdir -p /usr/local/zabbix mkdir -p /usr/local/zabbix/bin cp ./bin/* /usr/local/zabbix/bin
Copy and change config files
mkdir -p /etc/zabbix cp /downloads/zabbix-1.0/misc/conf/* /etc/zabbix vi /etc/zabbix/zabbix_suckerd.conf
We must tell Zabbix suckerd where the fping binary is. This was installed earlier from ports/packages to /usr/local/sbin/fping, so lets specify that here, otherwise the simple check 'icmpping' will not function, also, only root can use fping, so we have to use what is called the 'sticky bit' that sets the SUID to root, no matter who runs fping.
#FpingLocation=/usr/sbin/fping should become FpingLocation=/usr/local/sbin/fping change DBUser=root to DBUser=zabbix DBPassword should be DBPassword=zabbix
Now exit vi, and change the file mode
chmod 4755 /usr/local/sbin/fping
Great! You got this far, now we must set Zabbix to run at boot, otherwise, the system will not monitor the network directly after a power interruption
vi /etc/rc.local # mysql /usr/local/bin/mysqld_safe & # zabbix daemons rm -rf /var/tmp/zabbix_*.pid; rm -rf /tmp/zabbix*.pid; sleep 1; /usr/local/zabbix/bin/zabbix_trapperd; /usr/local/zabbix/bin/zabbix_agentd; /usr/local/zabbix/bin/zabbix_suckerd;
You should note from the above that the mysqld daemon is started with an & this sends the task to background while the bootup continues to execute the zabbix processes in singular function. This was required at the time as the pid files were still lingering around after the rm commands, things could be organised a little better, but lets move on. Make a directory on the webserver for Zabbix:
mkdir -p /var/www/htdocs/zabbix
Copy the front end
cp -r /downloads/zabbix-1.0/frontends/php/* /var/www/htdocs/zabbix/
Change the connection parameters to the database
vi /var/www/htdocs/zabbix/include/db.inc.php $DB_DATABASE="zabbix"; $DB_USER="zabbix"; $DB_PASSWORD="zabbix";
Log into Zabbix. If you have not yet rebooted you can now, or you can run /usr/sbin/httpd -u (run Apache without chroot), and run the lines which were added to /etc/rc.local to bring up the Zabbix agents.
If starting from a fresh server then the configuration settings are in the Zabbix manual, point of note is that when creating a user the user must be added to each group manually in order to gain all privs.
2005-06-08 DNS
Named/BIND (Berkeley Internet Name Daemon) is a popular DNS (Domain Name System) server, but perhaps it has a few general problems.
With a normal installation of named you leave your self open to be proxy for anyone on the internet to make DNS queries through your open system, which is a caching name server on all interfaces.
I have found of late that DJB's DNS suite of tools to be of great efficiency of use.
You cannot run a DNS server and a DNS cache on the same interface. Some might see this to be both confusing and irritating, I see this as a security benefit.
I run a typical SOHO setup. I have a handful of domain names and a handful of computers on the LAN.
+----------------+ +--------+ | internet cloud | ------------- | server | +----------------+ +--------+ | +---------------------------+ | +-------------+ | lan cloud | +-------------+
The server has the IP addresses: 52.52.52.52, 127.0.0.1 and 192.168.7.1
The LAN is on the range: 192.168.7.0/24.
Installation
The installation requires that you follow the guide at http://cr.yp.to/djbdns/install.html (otherwise I would be just repeating what DJB has written).
A few things missing from his guide are how to configure once you have installed. I suggest that for the setup which I have shown in the diagram that you go to
/etc/dnscache/env
and
echo 192.168.7.1 > IP
and
touch /etc/dnscache/root/ip/192.168.7.
Once that is done
svc -h /service/dnscache
to reload it's config. To test that this is all correct
echo 192.168.7.1 > /etc/resolv.conf host -t a www.aol.com
and you should get a series of IP addresses back.
The server typically responds to port 53 UDP, for DNS queries, and port 53 TCP for DNS transfers. The DNS transfer is vastly larger than the DNS query and so it requires the additional error handling features of TCP in order to work efficiently.
DJB's DNS server is called TinyDNS. Like everything else from DJB it is designed to run through tcpserver (or tcpclient as we find out in the zone transfer followup to this).
You need to have a dnslog user and a dnsgroup available on your system, configuration is done using tinydns-conf:
$ tinydns-conf tinydns-conf: usage: tinydns-conf acct logacct /tinydns myip
So, on my system I use:
# tinydns-conf tinydns dnslog /etc/tinydns 80.5.150.162
This create the /etc/tinydns path, which we should line to service through:
# ln -s /etc/tinydns /service/tinydns # svscan
and its all setup. Check its all ok by tailing the log:
# tail -f /etc/tinydns/log/main/current
You should see messages about TinyDNS loading ok:
@400000004223a3703aab66cc starting tinydns
If you get an error relating to IP address, its possible that you have the DNS Cache running on the IP address intended for TinyDNS. You should correct this, it is not a good idea to run a cache that is exposed to the outside world.
The DNS data file
I have created a useful script, which you may find to be of use, you have to make some changes to it, name it script.sh.
#!/bin/bash
TEXT="Z${1}.:ns1.${3}.:root.${1}.:2004070701:7200:900:604800:86400\n"
TEXT=$TEXT".${1}.::ns1.${3}.\n"
TEXT=$TEXT".${1}.::ns2.${3}.\n"
TEXT=$TEXT"&${1}.::ns1.${3}.:86400\n"
TEXT=$TEXT"&${1}.::ns2.${3}.:86400\n"
TEXT=$TEXT"+${1}.:${4}.:86400\n"
TEXT=$TEXT"@${1}.::mail.${3}.:10:86400\n"
TEXT=$TEXT"@${1}.::${2}.:20:86400\n"
TEXT=$TEXT"'${1}.:v=spf1 ip4\\\\07280.5.150.162/24 a include\\\\072ntlworld.com -all:86400\n"
TEXT=$TEXT":${1}.:16:\\\\012Ed Neville:86400\n"
TEXT=$TEXT"Cns.${1}.:${1}.:86400\n"
TEXT=$TEXT"Cns1.${1}.:${1}.:86400\n"
TEXT=$TEXT"Cns2.${1}.:${1}.:86400\n"
TEXT=$TEXT"Cwww.${1}.:${1}.:86400\n"
TEXT=$TEXT"+mail.${1}.:${4}:86400\n"
echo -e $TEXT
You should call the above script like so:
./script.sh domainzone.tld backupmailserver nameservers ipaddress_of_www >> dns_data
This script will create your basic SOHO DNS data file, if you wish to know more, I suggest you see a better explanation of the data file.
Once you have the data file you need to run the make program in /etc/tinydns directory. The make program uses a VERY effective database format by DJB which is VERY efficient and I don't think make database formats are faster with heady read work.
To check everything is in order, talk to the server directly:
$ host -t a www.yourdomain.tld 80.5.150.162
(80.5.150.162 is an arbitrary IP address that I just invented, replace with your own DNS server IP).
If all goes well you should see the A record for www.yourdomain.com.
Master/slave setup
By now you should be familiar with the Tiny DNS system. This short how to shows how you can retrieve the DNS data from a master server.
It's rather simple really, just run the following command at the server:
# axfrdns-conf usage: axfrdns-conf acct logacct /axfrdns /tinydns myip
So, you should use axfrdns like so:
axfrdns-conf axfrdns dnslog /etc/axfrdns /etc/tinydns 80.5.150.162
This will create the /etc/axfrdns directory with some config data. Axfrdns works on port 53 TCP, not UDP like TinyDNS. The DNS server should respond to DNS queries on the UDP port and DNS transfers on TCP. There is too much over head for DNS queries to use TCP, but larger DNS transfers are efficient with TCP.
Once this is running you should look at /etc/axfrdns/tcp file, which is a rules file to allow or deny certain IP addresses access to axfrdns:
# sample line: 1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa" 206.55.124.4:allow 216.122.4.160:allow :deny
The above snippet shows the example, two allow rules (for Zone edit) and the deny rule apples to those IP addresses which do not match the above. To make changes to the tcp.cdb file you MUST run make after alterations.
Now any request from 206.55.124.4 can retreive our DNS database.
On the DNS slave we use:
# tcpclient dnsmaster.domain 53 /usr/local/bin/axfr-get zone ./zone.data /zone.data.tmp
And thats all there is to it. When you have your axfrdns cronjob running you will want to append all the files together:
for dns in $( cat dnsfile ) ; do tcpclient dnsmaster.domain 53 /usr/local/bin/axfr-get $dns ./$dns.data /$dns.data.tmp done ; for files in $( ls *.data ) ; do cat $files >> dns_data done ; mv dns_data /etc/tinydns/root cd /etc/tinydns/root make
2005-06-07 how dns works
Here is my guide to how DNS works. This may not be fully accurate, but I've been using this for over a year now as a major part of my job, and I also provide DNS services to people so, use this as you will.
Browsers
In the Internet world when you request a website in your web browser your browser talks to the OS for the address of the site which you typed into the address bar (if you were cunning and typed the IP address directly then this does not take place).
The OS looks through it's hosts file (/etc/hosts) for the IP off the address before looking elsewhere. If the address can be found in the hosts file then the browser uses this to open a TCP connection with the web server.
If the address cannot be found here then the OS will ask it's designated name server for the address.
In the Internet world when you request a website in your web browser your browser talks to the OS for the address of the site which you typed into the address bar (if you were cunning and typed the IP address directly then this does not take place).
The OS looks through it's hosts file (/etc/hosts) for the IP off the address before looking elsewhere. If the address can be found in the hosts file then the browser uses this to open a TCP connection with the web server.
If the address cannot be found here then the OS will ask it's designated name server for the address.
The name servers specified in the OS can be queried in an arbitrary order, this really depends on the OS itself as to which is used, it may be round robin or master, with slave as backup.
DNS and mail
With email you often find multiple 'MX' records on a single zone. Mail is very different to websites because with email the message is sent as a data consignment from host to host. If the mail is undeliverable then the message is 'bounced' to the envelope header or the return-path. The return-path is often preferred on mail lists though.
When a user sends mail to bob@brandnewdomain.com the mail server looks up the MX records for brandnewdomain.com from the zone's name servers. If the MX records come back as mail.brandnewdomain.com with preference of 10 and mail2.brandnewdomain.com with preference of 20, then the mail server that the user sends through will attempt to connect to the lowest preference first. If there are no MX records then the mail server will attempt to connect to the A record for the zone.
The MX record must NEVER point to a CNAME.
What's the deal with the CNAME?
The cname DNS type is a canonical name, that is that the name is an alias for an address record. The cname must have an address record in order for it to work. MX records should not point to a cname as the MX record itself can be treated as an alias, so you should not need to point one alias to another, generally mail will have problems using a cname.
At this point you are either thinking DNS is cool, or DNS sucks. I think DNS is pretty cool as I will explain in a few pages later with topics such as round robin.
The PTR
Often with email or IRC it is useful to look up the hostname of a user or sending mail server, based on the connected IP address. This is done with the PTR type, rather than held at the name server, it is held in a higherachy of the RIPE name server for IP addresses, in the format of z.y.x.w.in-addr.arpa, where IP address is w.x.y.z. To look up the hostname for example of 64.236.24.20 you would look up the PTR record of 20.24.236.64.in-addr.arpa. Using the dig/host tool this is done as follows:
With dig:
$ dig -t ptr 20.24.236.64.in-addr.arpa ; <<>> DiG 9.2.4 <<>> -t ptr 20.24.236.64.in-addr.arpa ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35989 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;20.24.236.64.in-addr.arpa. IN PTR ;; ANSWER SECTION: 20.24.236.64.in-addr.arpa. 3528 IN PTR www5.cnn.com. ;; Query time: 0 msec ;; SERVER: 192.168.0.1#53(192.168.0.1) ;; WHEN: Tue Jun 7 19:46:33 2005 ;; MSG SIZE rcvd: 69
With host:
$ host -t ptr 20.24.236.64.in-addr.arpa 20.24.236.64.in-addr.arpa PTR www5.cnn.com
Pointers, or PTR records are often referred to as a reverse pointer. If you buy a block of IP addresses from RIPE then you will be able to set up the reverse pointers yourself, but for most people with a single IP address from their bandwidth provider the pointer will be maintained by the ISP and they are very unlikely to change this for you.
As a result some mail may be blocked if you run your own mail server because your mail server may not be announcing itself as the same host as described by the reverse pointer. My suggestion as a solution is to simply change the name of your mail server to the name in the reverse pointer! The only person likely to look at this is the mail server that your connect to.
Zones
A zone is an encapsulation device for DNS data. If you like, a zone is part of the hierarchy. Within the zone one can store the MX records, the A records and the cnames for that zone.
Each zone must specify one DNS server as an authoritative name server. Most Internet domains require that the domain must have at least two name servers. There is no harm in setting both name servers to a single IP address, provided that your zone has both name server host entries.
Name servers
The name server specified in the zone must contain the zone data. These records should match those set by your domain at the registry (such as Nominet or Internic). The reason for this requirement is that when a client looks up the domain information the query goes to the parent of the domain and the parent responds with the name servers. The name server is then queried.
Each name server requires a corresponding A record, the name server must not point to a cname record.
With my next instalment I shall cover zone transfers, and/or round robin DNS.
2005-06-05 mysql
Mysql/openbsd
/usr/local/bin/mysqld_safe <- start mysql /usr/local/bin/mysql_install_db -u root password password <- set root pw
2005-06-02 wireless linux
I have decided to include here some details about how the Debian wireless packages work. There will be more entries to follow, as and when I have the time to add them, but for a start here is how to add wireless support to your kernel.
First you must get the appropriate packages for your kernel:
# apt-get install hostap-source hostap-utils wireless-tools
Once the above packages are downloaded, (and assuming you already have kernel-package and kernel-source, bzip and other rudimentary packages you may extract the sources and change to the kernel source dir to begin compilation of the kernel and modules
# cd /usr/src # tar jxvf hostap-source.tar.bz2 # cd linux # make-kpkg clean # make-kpkg kernel_image modules_image
You should now have the kernel packages ready for installation, these will be named:
-rw-r--r-- 1 root src 75484 Jun 2 21:28 drbd0.7-module-2.6.11.10_0.7.10-3+10.00.Custom_i386.deb -rw-r--r-- 1 root src 162952 Jun 2 21:28 hostap-modules-2.6.11.10_0.3.7-1+10.00.Custom_i386.deb -rw-r--r-- 1 root src 10540382 Jun 2 21:28 kernel-image-2.6.11.10_10.00.Custom_i386.deb
See below for details on adding .deb packages to your system. You should then reboot to load the new kernel. Once the kernel is loaded check that you have the appropriate modules installed, if not use modprobe to load the modules.
# modprobe -l | grep prism # modprobe prism
One should now be able to use the iwconfig tool to tell the interface which ESSID to talk to:
# iwconfig wlan0 mynet
The interface should now be talking to the mynet interface. At this point you should be able to talk IP with the far side, and as such be able to obtain a DHCP leas from the AP, or alternatively set your own IP details with the ifconfig tool.
Info