Howto Check named configuration error

named can’t start its daemon and left me with nothing than confuse.

# /etc/init.d/bind9 restart

* Stopping domain name service… bind9                                                                                     rndc: connect failed: 127.0.0.1#953: connection refused
[ OK ]
* Starting domain name service… bind9                                 [fail]

fail message don’t give a clue, further investigation with named manual lead me to -g and -p .

Retry to see the error message :

# named -g -p 53

22-Jul-2010 07:34:10.333 starting BIND 9.7.0-P1 -g -p 53
22-Jul-2010 07:34:10.333 built with ‘–prefix=/usr’ ‘–mandir=/usr/share/man’ ‘-                                             -infodir=/usr/share/info’ ‘–sysconfdir=/etc/bind’ ‘–localstatedir=/var’ ‘–enable-threads’ ‘–enable-largefile’ ‘–with-libtool’ ‘–enable-shared’ ‘–enable-static’ ‘–with-openssl=/usr’ ‘–with-gssapi=/usr’ ‘–with-gnu-ld’ ‘–with-dlz-postgres=no’ ‘–with-dlz-mysql=no’ ‘–with-dlz-bdb=yes’ ‘–with-dlz-filesystem=yes                                             ‘ ‘–with-dlz-ldap=yes’ ‘–with-dlz-stub=yes’ ‘–with-geoip=/usr’ ‘–enable-ipv6                                             ‘ ‘CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2’ ‘LDFLAGS=-Wl,-Bsymbolic-funct                                             ions’ ‘CPPFLAGS=’
22-Jul-2010 07:34:10.333 adjusted limit on open files from 1024 to 1048576
22-Jul-2010 07:34:10.333 found 4 CPUs, using 4 worker threads
22-Jul-2010 07:34:10.333 using up to 4096 sockets
22-Jul-2010 07:34:10.340 loading configuration from ‘/etc/bind/named.conf’
22-Jul-2010 07:34:10.340 /etc/bind/named.conf.local:16: expected quoted string near ‘.’
22-Jul-2010 07:34:10.341 loading configuration: unexpected token
22-Jul-2010 07:34:10.341 exiting (due to fatal error)

I see, I made mistake in named.conf.local (expected quoted string)

View the error

# nano /etc/bind/named.conf.local

Save the file after editing and start bind9

# /etc/init.d/bind9 start

* Starting domain name service… bind9                                                          [ OK ]
#

Perfecto!

How to use filter in google apps email

I hate spam and more when they know my real email address.

But I need solution to stop them. Currently I use Google Apps service which use the same engine as gmail minus a few feature.

First step I use is using ‘Report Spam’ that available in each email display.

This solution is not help me to combat unwanted email that force me to join their mailing list until I use filter.

Yes, the same filter that gmail use.

First : copy and paste the email address.

Continue reading

Change php.ini for adjust max upload file size

File too large

That simple message when marketing team want to upload new support ticket that include attachment with size 4 MB.

Yes, that my mistake for not adjust default max upload file size.

The solution is simple :

Edit php.ini file

I use ubuntu and because I more familiar with freebsd I use phpinfo() as my friend to find out where the file is.

According to phpinfo() the php.ini file located in :

/etc/php5/cgi/php.ini

Open that file with nano editor :

# nano /etc/php5/cgi/php.ini

change “upload_max_filesize” to other value. I use 8M.

Save the file.

Continue reading

Install pureftp with unixauthentification on ubuntu

I used to use winscp to upload file to vps server. It’s easy and I just need to keep dedicated user.

Due to request for ftp support I decide to install ftp server called pure-ftp on ubuntu jaunty.

Install pure-ftp

# apt-get install pure-ftpd

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libcap1 pure-ftpd-common
Suggested packages:
netkit-inetd openbsd-inetd xinetd
The following NEW packages will be installed:
libcap1 pure-ftpd pure-ftpd-common
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 355kB of archives.
After this operation, 1040kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com jaunty/main libcap1 1:1.10-14build1 [9780B]
Get:2 http://archive.ubuntu.com jaunty/universe pure-ftpd-common 1.0.21-11.4ubuntu1 [176kB]
Get:3 http://archive.ubuntu.com jaunty/universe pure-ftpd 1.0.21-11.4ubuntu1 [169kB]
Fetched 355kB in 1s (278kB/s)
Preconfiguring packages …
Selecting previously deselected package libcap1.
(Reading database … 20798 files and directories currently installed.)
Unpacking libcap1 (from …/libcap1_1%3a1.10-14build1_amd64.deb) …
Selecting previously deselected package pure-ftpd-common.
Unpacking pure-ftpd-common (from …/pure-ftpd-common_1.0.21-11.4ubuntu1_all.deb) …
Selecting previously deselected package pure-ftpd.
Unpacking pure-ftpd (from …/pure-ftpd_1.0.21-11.4ubuntu1_amd64.deb) …
Setting up libcap1 (1:1.10-14build1) …

Setting up pure-ftpd-common (1.0.21-11.4ubuntu1) …

Setting up pure-ftpd (1.0.21-11.4ubuntu1) …
Starting ftp server: Running: /usr/sbin/pure-ftpd -l pam -E -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -B

Processing triggers for libc6 …
ldconfig deferred processing now taking place
You have new mail in /var/mail/root
#

Enable unixauthentification

# nano /etc/pure-ftpd/conf/UnixAuthentication

change  from no to yes and save the file.

Run the service

# /etc/init.d/pure-ftpd start

Starting ftp server: Running: /usr/sbin/pure-ftpd -l unix -l pam -E -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -B
#

Great, I can delegate website update process 🙂

in Work | 304 Words

freebsd unzip ports

I just use gunzip as tool for unzip an .zip file at ubuntu 10.04 when I try same utility at freebsd.

Now I want to try something new with utility called unzip.

Try to call it ( it might be installed)

# unzip
unzip: Command not found.

Not found, try to find installation file.

# whereis unzip

unzip: /usr/ports/archivers/unzip
# cd  /usr/ports/archivers/unzip && make install

Continue reading

in Work | 651 Words