Archive for December, 2009
Follow these simple steps to setup an NFS client/server.
First, some housekeeping for this example.
Server machine (server) = 192.168.1.1
Client machine (client) = 192.168.1.2
Exported directory /nfs/export
### The server steps ###
1. Create an entry in /etc/exports with the exported directory and client IP.
The (rw) sets the directory to be read and writeable. There are other options that can be specified here. Check out the NFS docs for more.
2. Edit /etc/hosts.deny and /etc/host.allow
In /etc/hosts.deny
In /etc/hosts.allow
3. Start up portmap, nfs, nfslock, netfs on the server. These can most likely be found in /etc/init.d in the form of init scripts. Make sure they are set to start at boot with chkconfig (Redhat servers).
4. Run rpcinfo and make sure at least nfs, portmap and mountd are listed.
### The client steps ###
5. Make a directory that you you are going to use to mount the NFS share. Call it whatever you want.
6. Start portmap, nfs, nfslock, netfs on the client as you did on the server.
7. Mount the share.
8. Add an entry to /etc/fstab in order to have the share mount after a reboot.
9. Test that you can create/delete/edit files and needed by your application.
The following command will optimize all databases in mysql (excpect those that don't support it due to their storage engine).
You can throw the
--auto-repair
flag in if you are brave.
If you need to change the TTLs on all domains in Plesk at once, you can massage the database with the following command:
Substitute the TTL values for what you need. Since the flat files are still used by named to provide DNS resolution, those will need to be updated as well. This command will do the trick: