Archive for the 'Coldfusion' Category

Inside Linux The following shows a sample nfs (Web hosting services)

Sunday, July 15th, 2007

Inside Linux The mountd and nfsd (Crystaltech web hosting) Daemons The

Sunday, July 15th, 2007

Inside Linux The mountd and nfsd Daemons The mountd daemon is the RPC-specific mount daemon. The nfsd daemon is an NFS server daemon that accepts RPC requests from clients. These two daemons complete the circuit for the NFS server side. Before you start up these daemons, however, you will need to verify and possibly modify the /etc/exports file. If you have not examined the /etc/exports file, you should read the previous section so that you can verify the file. This file must be valid because both the mountd and nfsd daemons read it. When you feel comfortable that the /etc/exports file is in order, it is time to fire up the mountd and nfsd daemons. The mountd daemon should be invoked first, and then the nfsd daemon. The following dialog demonstrates this: stimpy $ mountd stimpy $ nfsd Again, nothing spectacular here. As with the portmapper, you can verify the existence of the two daemons with the ps command and the rpcinfo command. The following dialog shows how to query for daemons: stimpy $ ps ax … 328 tty1 SN 0:00 /opt/Office51/bin/soffice.bin 359 tty1 SN 0:07 kscd -caption CD Player -icon kscd.xpm 3475 ? SN 0:00 portmap 3927 tty1 SN 0:05 kvt -T ption Terminal -icon kvt.xpm -miniicon kvt.xpm 3928 pts/0 SN 0:00 bash 3951 tty1 SN 0:45 /opt/netscape/netscape 3960 tty1 SN 0:00 (dns helper) 4131 ? SN 0:00 mountd 4134 pts/0 SWN 0:00 [nfsd] 4137 pts/0 RN 0:00 ps ax stimpy $ rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100005 1 udp 915 mountd 100005 1 tcp 917 mountd 100005 2 udp 920 mountd 100005 2 tcp 922 mountd 100005 3 udp 925 mountd 100005 3 tcp 927 mountd 100003 2 udp 2049 nfs stimpy $ As you can see, the listing from the ps ax command shows that the two daemons (mountd and nfsd) are running. To further verify their existence, the rpcinfo -p command is executed. You can see by the output that the portmapper is running, that mountd is running and responsible for a number of ports, and that the nfs daemon is also executing. Many Linux distributions offer a script to help ensure that all the RPC and NFS server daemons are started and invoked in the correct order. The RPC script is customarily named rpc and should be found in the /etc/rc.d/init.d directory. Some Linux distributions store the script in the /etc/init.d directory. The syntax for the command is shown in the following dialog: stimpy $ cd /etc/rc.d/init.d stimpy $ ./rpc Usage: ./rpc {start|stop} stimpy $ ./rpc start Starting RPC portmap daemon … done stimpy $ Additionally, most distributions provide an nfs script, and it is found in the /etc/rc.d/init.d directory. Some distributions of Linux may store the script in the /etc/init.d directory. The following shows the usage for the nfs script. stimpy $ ./nfs Usage: ./nfs {start|stop|status|reload|restart} stimpy $ Notice that the usage shows the options to start and stop the daemons. You also have the option to check the status of, reload, and restart the daemons. The restart option automatically executes the stop option first, and then invokes the start option. The reload option is synonymous with the start option in most distributions. page 219
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Inside Linux The mapping options are given in (Web site layout)

Sunday, July 15th, 2007

Inside Linux The mapping options are given in the parentheses, such as rw and insecure. A hostname can be prefixed to the option, thereby associating the option to the host. Table 12.2 lists the available mapping options. Table 12.2. Mapping Options for the /etc/exports File Option Description root_squash This option is a security feature denying the super user on the specified hosts any access rights; it does this by mapping requests from uid 0 on the client to uid 65534 (should be associated with the user nobody) on the server. This does not apply to uids that might be as sensitive, such as bin. no_root_squash This option turns off root squashing. Mainly used for diskless clients. squash_uids and squash_gids This option specifies a list of uids (or gids) that are subject to anonymous mapping. A valid list of IDs looks like squash_uids=0 15,20,25 50 all_squash This option is used to map all uids and gids to the anonymous user. Useful for NFS-exported public FTP directories, news spool directories, and so on. map_daemon This option turns on dynamic uid and gid mapping. Each uid in an NFS request will be translated to the equivalent server uid, and each uid in an NFS reply will be mapped the other way round. map_static This option enables static mapping, specifying the name of the file that describes the uid/gid mapping: map_static=/etc/nfs/foobar.map. map_nis This option enables NIS-based uid and gid mapping. anonuid and anongid These options are used to explicitly set the uid and gid of the anonymous account. This is useful for PC/NFS clients, in which you might want all requests to appear to be from one user. You can specify the NFS clients in several ways. Table 12.3 shows the various formats. Table 12.3. NFS Client Formats Format Description single host Commonly used format. You can specify a host using an abbreviated name that is recognized by the resolver, a fully qualified domain name, or an IP address. netgroups NIS netgroups may be identified as @group. The host part of all netgroup members is extracted, and then added to the access list. wildcards The hostnames can contain the * and ? wildcard characters. Can be used to make the exports file more compact. Example: *.foo.edu matches all hosts in the foo.edu domain. However, these wildcards do not match dots in a domain name. Thus, the preceding pattern does not include hosts such as http://www.cs.foo.edu. IP networks Directories can be exported to all hosts on an IP (or sub) network simultaneously. You do this by specifying the IP address and netmask pair as address/netmask. If no machine name is given, any machine is allowed to import (or mount) the filesystem within the limits set by the options. If you have made any modifications to the /etc/exports file while the NFS system is running, you should shut down the daemons and restart them. page 218
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Inside Linux The following shows the rpc script.

Saturday, July 14th, 2007

Inside Linux The following shows the rpc script. # . /etc/rc.config base=${0? */} link=${base#*[SK][0 9][0 9]} test $link = $base && START_PORTMAP=yes test “$START_PORTMAP” = yes -o “$NFS_SERVER” = yes || exit 0 if test -x /sbin/portmap ; then PORTMAP=/sbin/portmap else PORTMAP=/usr/sbin/portmap fi return=$rc_done case “$1″ in start) checkproc $PORTMAP && { killproc $PORTMAP 2> /dev/null echo -n “Re-” } echo -n “Starting RPC portmap daemon” startproc $PORTMAP || return=$rc_failed /bin/sleep 1 if test “$NFS_SERVER_UGID” = yes; then if test -x /usr/sbin/rpc.ugidd ; then startproc /usr/sbin/rpc.ugidd || return=$rc_failed fi fi echo -e “$return” ;; stop) if test -x /usr/sbin/rpc.ugidd ; then killproc -TERM /usr/sbin/rpc.ugidd || return=$rc_failed fi echo -n “Shutting down RPC services” killproc -TERM $PORTMAP || return=$rc_failed echo -e “$return” ;; restart|reload) $0 stop && $0 start || return=$rc_failed ;; status) status=”OK” if test “$NFS_SERVER_UGID” = yes; then checkproc /usr/sbin/rpc.ugidd || status=”rpc.ugidd down” fi checkproc $PORTMAP && echo “OK” || echo “portmapper down” ;; *) echo “Usage: $0 {start|stop}” exit 1 esac test “$return” = “$rc_done” || exit 1 exit 0 Remember, many scripts are specific to a Linux distribution, so this script may not work on your distribution. In all likelihood, the rpc command (script or otherwise) exists on your system. The /etc/exports File The /etc/exports file is important and should not be overlooked. The content of this file determines the filesystems that the NFS server allows clients to mount. The syntax for the file is as follows: directory [ option, … ] Each line contains a mount point (directory) and a list of machine (host) names that are allowed to mount the filesystem. Optionally, a parenthesized list of mount parameters may follow a machine name. Any blank lines are ignored and a # character signifies a comment in the file. An entry can span multiple lines using a (backslash) character. The following is a sample /etc/exports file: # a sample /etc/exports file … / rooty(rw) boss(rw,no_root_squash) /devel devel(rw) /usr *.local.domain(ro) /pub (ro,insecure,all_squash) /pub/private (noaccess) The first line exports the entire filesystem to machines rooty and boss. The third entry demonstrates using wildcard hostnames. The fourth line exports the public FTP directory (/pub) to all hosts, invoking requests under the nobody account. The insecure option allows clients with NFS that don’t use a reserved NFS port. The last entry (noaccess) denies all access (to NFS clients) to the /pub/private directory. page 217
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Florida web design - Inside Linux The following dialog demonstrates two techniques

Saturday, July 14th, 2007

Inside Linux The following dialog demonstrates two techniques to use ps to discover the existence of the portmapper. stimpy $ ps ax … 359 tty1 SN 0:05 kscd -caption CD Player -icon kscd.xpm 3348 tty1 SN 0:04 kvt -T ption Terminal -icon kvt.xpm -miniicon kvt.xpm 3349 pts/0 SN 0:00 bash 3475 ? SN 0:00 portmap 3476 pts/0 RN 0:00 ps ax … stimpy $ # ps ax | grep portmap 3475 ? SN 0:00 portmap 3480 pts/0 SN 0:00 grep portmap stimpy $ In the first example, the ps command is executed, listing all processes. You will have to look through all the entries to find the portmapper entry. In the second example, the grep command is utilized to ferret out the portmapper entry from the process listing; sometimes it is worth the extra keystrokes. The second technique to check for the existence of the portmapper is to use the rpcinfo command. This command is used to report RPC information. The following dialog demonstrates the use of the rpcinfo command to discover the existence of available RPC services. stimpy $ stimpy $ rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper stimpy $ As you can see, the portmapper is running on this system. Both the ps command and rpcinfo command confirm the portmapper’s existence. If the portmapper is not running, the output from rpcinfo will resemble the following dialog. stimpy $ rpcinfo -p rpcinfo: can’t contact portmapper: RPC: Remote system error - Connection refused stimpy $ For now, you started the portmapper by hand, but you will want to automate this task whenever the system boots. You can adapt the rc scripts to invoke the RPC portmapper at system start up. Your Linux distribution determines the directory location of the rc files. Some of the well-known locations are the /etc/init.d, /etc/rc.d/init.d, or /etc/rc.d directories. If the rpcinfo -p failed to report successfully, but the portmapper exists in the ps ax listing, you need to consult the /etc/hosts.allow and /etc /hosts.deny files. The reason that rpcinfo might be reporting failure is because all access to the portmapper is governed by the entries in the /etc/hosts.allow and /etc/hosts.deny files. For a more detailed explanation, you should check out the man page for the tcpd daemon command. A man page may also exist on your distribution for hosts_access(5) (man 5 hosts_access). This man page goes into great detail about the two files previously mentioned. Another option for invoking the portmapper is to use the rpc command, if available. Normally, this file is found in the /etc/rc.d/init.d directory. Some Linux distributions may locate the file in the /etc/init.d directory. If you do not have a man entry for the rpc command, and the which command does not reveal the file, you can execute find to locate the command. The following dialog demonstrates the use of the rcp command: stimpy $ rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper stimpy $ ./rpc stop Shutting down RPC services done stimpy $ rpcinfo -p rpcinfo: can’t contact portmapper: RPC: Remote system error - Connection refused stimpy $ ./rcp start stimpy $ Starting RPC portmap daemon done stimpy $ rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper stimpy $ page 216
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Inside Linux Setting Up an NFS Server You (Web site domain)

Saturday, July 14th, 2007

Inside Linux Setting Up an NFS Server You might be tasked with NFS server administration at your organization, or you may want to set up an NFS server on your home network. Either way, proper organization and a clear understanding of the maintenance aspects of NFS will allow you to get NFS up and running with a minimum of hassle. NFS offers a number of benefits to users: You can keep administrative data on one central host, relieving you of having to replicate those files to multiple machines. User data can all be stored on one central host, allowing users to be mobile. Users can move about the organization or outside the doors and continue to access their data transparently. If you are using NIS, your users can also log in to any system and gain access to their data. You can store application and system data that consumes large amounts of disk space on a central host. This reduces maintenance chores, and it allows your users to gain access as required. Basically, setting up an NFS server requires some quick file manipulation and ensuring that the required daemons are started. As mentioned previously, NFS sits on top of the RPC mechanism, so you have to be sure that the RPC components are properly set up. Preconditions Our journey to set up NFS will take us through a universal technique. Most all NFS systems follow the same pattern for setup and execution. If you are unfamiliar with what NFS is and its architecture, I recommend that you read the earlier sections of this chapter. NFS is not rocket science, but an understanding of its functionality is beneficial. The NFS Portmapper The RPC server registers with the portmapper daemon on startup. The portmapper obtains the port numbers on which the RPC server will listen for incoming requests. This relieves the portmapper from having to listen on the ports. The portmapper is an RPC service and acts as an intermediary for RPC clients. When an RPC client requires the services of the RPC server, it contacts the portmapper at a well- known IP port (port 111) to ascertain the RPC server’s port number. Optionally, the client may request that the portmapper contact the RPC server on behalf of the client. The portmapper is indeed an important part of the RPC mechanism. If the portmapper ceases to exist (crashes, for example), RPC clients will be unable to contact RPC servers such as NIS and NFS. The portmapper goes beyond the functionality it provides within the NFS terrain. The portmapper is also responsible for RPC broadcasts, which are requests that are transmitted to all RPC servers handling a specific RPC service. In these situations, the portmapper is contacted to transmit the broadcast to the RPC servers on behalf of the requester. This is done because hosts must know the port numbers (of the RPC servers) to deliver the broadcast. The problem is that RPC servers are not always at well-known addresses. On Linux, the portmapper is named portmap or rpc.portmap and is normally found in the /usr/sbin directory. It is rare indeed, but possible, that it is named rpcbind on your distribution. After you have the name of the portmapper, you need to fire it up. For now, you can invoke it by hand at the Linux command line. The following dialog demonstrates the action: stimpy $ portmap stimpy $ Now that is an uneventful dialog, to say the least. To ensure that the portmapper is running, you can do a couple of things. One is to use the trusty ps command to confirm the portmapper’s existence. page 215
We recommend high quality webhost to host and run your jsp application: christian web host services.

Inside Linux (Web design service) The automounter is actually a collection

Saturday, July 14th, 2007

Inside Linux The automounter is actually a collection of individual components. Each of these components is critical to the success of the automounter. As can be expected, a daemon process is required and is called automountd. This daemon is the real workhorse, because it is the process that handles all the requests to the NFS server daemon process (nfsd). The second component is the automount command. The automount command is used to configure mount points for autofs. The automount command works using a base mount point and map, and uses this combination to automatically mount filesystems when they are accessed in any way. The third component is autofs, which is implemented as a virtual filesystem. The autofs command is used to control the automount daemons that are running on your Linux system; normally, autofs is executed at system boot. The following discussion describes the sequence of events for a “generic” automount start up -I will discuss automount as it applies to Linux. The automount command is executed at system start up. Next, automount reads the master configuration file named auto.master. After this point, if a user attempts to access a filesystem identified as a mount point, the autofs daemon calls on the services of the automount daemon, requesting that it mount the filesystem. The operation performed by the user can be something as simple as the cd or ls command. Next, the automount daemon tries to establish a conversation at the server side with nfsd, the NFS daemon. A lookup is performed in /etc/mnttab, searching for the requested path, server:/usr/bill/data using our example. After the path has been verified, the filesystem is mounted to the proper mount point -/mnt/data, using our example. Thus, the namespace is updated to include the new mount. NFS Server The NFS server has a fairly straightforward job - its focus is to provide access to its filesystems by NFS clients within the network. The NFS server makes the filesystems available to the world by exporting the filesystem(s). An exported filesystem is one that has been exported by the server and is available for access by NFS clients within the network. At system startup, a configuration file is read that contains information for exporting filesystems. Basically, the configuration file contains entries for each filesystem that is exported. The following list identifies the fields for each export entry: The directory pathname that is to be exported A list of client machines that will access the exported filesystem Access restrictions that might be required Both daemon processes, mountd and nfsd, after execution, sit and wait for requests (filesystem accesses) from NFS clients. NFS and Linux This section explores the world of NFS specific to the Linux operating system. After all, other operating systems are out there, and you want to be able to utilize those filesystems. You also want to share the filesystems found on your Linux systems, if that is a requirement. Linux is a natural choice for NFS support. You can use your Linux system as an NFS client, mounting remote filesystems (that are available) to your local filesystem. You can also offer your Linux system as an NFS server, allowing Linux clients to mount filesystems offered by your NFS server. Considering that Linux implements NFS in peer-to-peer mode, you can have the best of both worlds. Your Linux system can run as an NFS server sharing files to NFS clients, and your system can operate simultaneously as an NFS client. You should be sure to read the following section on security. As you know, NFS is a protocol for file sharing, which can create security issues. NFS is an open architecture that is known and understood by crackers; therefore, NFS offers another door through which crackers can gain access to your system. With all this said, let us begin our journey. page 214
We recommend high quality webhost to host and run your jsp application: christian web host services.

Inside Linux Figure 12.1. A remote filesystem mounted

Friday, July 13th, 2007

Inside Linux Figure 12.1. A remote filesystem mounted on a local directory. The Automounter and NFS Namespace The automounter must perform its magic somehow. The magic I am talking about is the capability to mount a filesystem and then later unmount the filesystem. The magic behind all this is called a map. The automounter uses maps to make the proper mounting associations. A map describes the association of the local pathname with the remote filesystem. The local pathname is actually called a mount point, or simply, mount. It is called a mount point because it is the “point” at which you “mount” a remote filesystem. The NFS namespace is the aggregation of mount points. A client maintains a mount point for each remote filesystem the client wishes to access. All accesses to the remote filesystem are made through the local mount point. The NFS system transparently shields the user from specifics of the remote filesystem. Referring to Figure 12.1, you can see that the mount point for the client is /mnt/data and the remote filesystem is the server:/usr/bill/data directory path. Both paths represent a root (start point), each from a different perspective. For the server side, the server:/usr/bill/data directory path is the starting point given to the NFS client. The client may only traverse down the hierarchy. For the client, the /mnt/data directory represents the logical start point for filesystem traversal. The word logical is used because you are not traversing a filesystem on your system. The key to NFS administration, if you consider automounter maps, is the maintenance of the automounter maps. The automounter maps should be stored in a central and well-known location. The Network Information Service (NIS), if available, can be used for this purpose. Otherwise, you can utilize the facilities of the Linux system files for map storage. Purpose of the Automounter The automounter has some amount of intelligence. As mentioned previously, the automounter automatically mounts remote filesystems as required. If a user is trying to access a filesystem that is not currently mounted, the automounter will attempt to mount the filesystem. The automounter uses information in the map to execute the mounting. The automounter will also automatically unmount a filesystem that has been idle for some time. I use idle here to mean a filesystem that has not been accessed over a period of time. You can set the minimum timeout for the automounter for automatic unmounting; the default is five minutes. If you set the timeout to zero, automatic unmounting is disabled. page 213
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Bulletproof web design - Inside Linux Basically, the NFS server exports a

Friday, July 13th, 2007

Inside Linux Basically, the NFS server exports a file or directory, making it visible to NFS clients. The NFS client simply mounts the requested filesystem. The mechanism of mount is that of incorporating the remote filesystem with the local filesystem. A specialized service that is available for the client side is the automounter. The automounter provides the capability to automatically mount and umount (unmount) a filesystem when that filesystem is required. If you are familiar with the mtools package, consisting of commands such as mdir and mcopy, you are familiar with automount functionality. When you insert a DOS floppy and execute the mdir command, the command first mounts the floppy, and then accesses the floppy’s directory structure through the local (mounted) directory, and finally, mdir executes umount on the floppy. NFS Protocol The NFS protocol is composed of remote procedures that provide clients the capability to manipulate files and directories on remote machines (NFS servers) as if those files were local. The NFS protocol provides the routines necessary for a client to send a request for a file or directory operation. The server accepts this request and attempts to execute the request. Whether the request succeeds or fails, a response is returned to the client making the request. In the case of failure, an error value is returned. In the case of success, the results appropriate for the execution of the request are returned to the client. Various file operations are available in the NFS protocol, such as read, rename, mkdir (make directory), and write. Using the NFS protocol routines, clients send requests for file operations to servers, and servers respond by attempting to perform the operation (provided the user has proper permission) and then sending back successful results or error values. The NFS protocol includes a full spectrum of file operations, including mkdir, read, rename, and write. Error Recovery One of the design goals for the NFS protocol is swift error recovery. Each of the NFS calls identifies the arguments necessary to execute that procedure call. This clearly provides two benefits of NFS. The first benefit is that NFS can gracefully and quickly recover from any failure, be it network or system. The second benefit allows for painless administration. Transport Independence NFS is not associated with any transport protocol. This results in a file-sharing system that is transport independent. The NFS architecture is designed so that any future protocols can carry NFS traffic. A few protocols are in use today, such as User Datagram Protocol (UDP) and Transmit Control Protocol (TCP). Protocol independence is achieved using a Remote Procedure Call (RPC) layer; the NFS protocol is actually implemented on top of the RPC transport technology. This implies that the NFS calls are implemented in terms of RPC calls. NFS also utilizes the External Data Representation (XDR), which further aids in NFS being machine and language independent. XDR is a standard for the description and encoding of data. It is used for transferring data between disparate computer architectures. A language is used to describe data formats in XDR - it can be used only to describe data. NFS Client An NFS server exports files and directories, thereby allowing NFS clients to gain access to those resources. The NFS client simply mounts the remote filesystem to a local resource, such as a directory. This results in the remote filesystems being an integral part of the local Linux filesystem. Figure 12.1 visually demonstrates a mounted filesystem. A service called the automounter provides functionality to automatically mount a filesystem and then unmount it when an operation is complete. The automounter is an NFS client-side enhancement, reducing the manual tasks of mounting and unmounting a remote filesystem. page 212
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

Inside Linux Table 12.1. Vendors Providing NFS Support (Hosting your own web site)

Friday, July 13th, 2007

Inside Linux Table 12.1. Vendors Providing NFS Support Vendor Operating System(s) Amdahl UTS Apple A/UX BSDI UNIX Cray UNICOS DEC Ultrix, VMS Dell SVR4 FTP Software DOS, Windows, OS/2 Frontier Technology DOS, Windows Hewlett-Packard HP-UX Hummingbird UNIX, Windows IBM AIX, MVS Intel UNIX ICL UNIX Net Manage DOS, Windows Nixdorf TOS 35 Novell Netware OSF OSF1 Santa Cruz Operation (SCO) SCO UNIX SunSoft Solaris, DOS, Windows Silicon Graphics IRIX Process Software VMS Texas Instruments TI SVR3.2 TGV VMS Under Linux and UNIX, the NFS system is employed in a peer-to-peer mode. This provides a kind of AC/DC perspective: Your machine can be running as an NFS server sharing files to other clients, plus your system can act as an NFS client obtaining shares from other NFS servers - and this can happen simultaneously. The Network File System is easily implemented, even on your home network. You have nothing to fear with NFS. The only thing required on your part, as with anything else, is time. Just because NFS is running on your corporate network does not mean that you cannot get it running on your two- machine network at home. After you get it running, you will wish you had done it sooner. NFS Design and Architecture Because NFS is based on a client/server architecture, it naturally consists of a client program and the server program. There is also the protocol that allows the client and server to communicate their requests. You will see how NFS servers share their filesystems and how the clients can access these shared filesystems. If you have ever mounted a local filesystem, the concept of NFS will be easy to understand. Even if you have never mounted a filesystem, do not fret - it will come easily. page 211
You want to have a cheap webhost for your apache application, then check apache web hosting services.