Linux Server Administration

DNS Setup
First Website Is Running. Finally, I solved the DNS problem, the following steps after that are much easier. Some tips for DNS troubleshooting

1. Get a working example from another server if possible, it doesn’t matter if the server is running FreeBSD or Linux, it’s fine as long as the Bind is the same version (well, roughly). I didn’t do this at the beginning because the Linux Bind configuration and zone files looks quite different, but I have no other options after tried two days and still no luck.

2. There is a default line in the bind configuration file, remove or comment on it if you want to use the same server as DNS server. listen-on {; };

3. Don’t directly copy the text from web pages, the different Windows/Unix format could cause troubles.

4. Read the handbook carefully and don’t miss any step in it :-).
PHP/MySQL I installed php 5 and mysql 5 at first, but php didn’t work, I didn’t look into the problem, although it should be easy, also considering lower versions have better support and documentations, so I installed php 4 and mysql 4 instead with pkg_add. PHP doesn’t need any configuration (done by pkg_add) and is ready after installation. Browsing to check available packages, for example, check php 4 related packages: ncftp > ls php4* By the way, ncftp is a great ftp client program with bookmark support.

5. I installed the following packages with pkg_add: # pkg_add -r php4 # pkg_add -r php4-mysql # pkg_add -r mysql40-server (Don’t install mysql41-server, php4-mysql requires mysql40) Start/Stop Mysql # /usr/local/etc/rc.d/ start[stop/restart] Mysql will start at boot time by default, because any executable script accepting a ‘start’ command-line argument found in /usr/local/etc/rc.d will be executed when the system starts up. POP3 Server I installed qpopper as pop3 server, the installation is very easy with pkg_add, uncomment the following line in file /etc/inetd.conf to enable qpopper pop3 stream tcp nowait root /usr/local/libexec/qpopper popper Qpopper is controlled by inetd (super server), enable inetd start at boot time, insert the following line in /etc/rc.conf. inetd_enable=”YES” Any configuration changes with qpopper require inetd to restart, it will reload the config file. Restart inetd with: # /etc/rc.d/inetd restart or send a HUP (hang up) to inetd process, it will also restart and reload the new config information: # killall -HUP inetd or # kill -s HUP `cat /var/run/` Note: ` is backticks not forward ticks. I can connect the pop3 server with mail client, but didn’t send or receive email successfully, should be some problems of sendmail configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge