Archive for November, 2007

754 Part VI . Programming in (Cool web site) Linux Understanding

Saturday, November 17th, 2007

754 Part VI . Programming in Linux Understanding Programming Environments Conventionally understood, a programming environment is either graphically or command-line oriented. However, the Linux programming environment also consists of the services and capabilities provided by the system itself, that is, by the kernel and the core system components. Whether you use a mouse-driven IDE or a text editor and make, Linux imposes certain requirements and provides a number of capabilities that determine what the code you write in an IDE or text editor must do and can do. In this chapter, the term programming interface refers to the rules or methods followed to accomplish a particular task. As with programming environments, programming interfaces are usually thought of as graphical or command line: . Graphical interface Uses the X Window System to receive and process user input and display information. . Command-line interface A strictly text-based affair that does not require a windowing system to run. For example, Firefox, a Web browser, has a graphical interface; it won t work if X isn t running. Pine, a popular e-mail client, has a command-line interface; it works whether X is running or not. There is a third type of interface, however, an application programming interface, or API. An API provides a structured method to write a program that performs a certain task. For example, to write a program that plays sounds, you use the sound API; to write a program that communicates over a TCP/IP network, you use the socket API. Neither playing a sound nor communicating over a TCP/IP network necessarily requires a graphical or command-line interface; both graphical and command-line programs can play sounds or use TCP/IP, provided they use the proper API. Using Linux Programming Environments Linux boasts arguably the richest programming environment of any operating system currently available. As mentioned earlier, this chapter uses the term programming environment to describe the tools used to write computer programs on a Linux system and to refer to underlying services that make programming on a Linux system possible (or, perhaps, worthwhile). This section looks first at the fundamental services and capabilities that inform and constrain programming on a Linux system. Next, you examine a few of the most popular graphical IDEs for creating programs on a Linux system. The section closes with a look at some of the command-line tools used for writing programs.
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Programming Environments and Interfaces (Web servers) You can slice and

Friday, November 16th, 2007

Programming Environments and Interfaces You can slice and dice the topic of Linux programming environments and interfaces in a variety of ways. For example, a list of the programming languages known to have compilers that target or run on Linux easily runs to three single-spaced, typewritten pages. You could also examine the literally hundreds of programming libraries that exist for Linux. Alternatively, you can organize the discussion by dividing everything into three categories: graphically oriented interfaces, command-line interfaces, and other environments. To some readers, a programming environment means a graphical, point-and-click integrated development environment (IDE) like that provided by Borland s Kylix or IBM s Visual Age. Yet another way to approach the subject is to look at Linux s development support for certain academic and computing subjects, such as graphics, databases, mathematics, engineering, chemistry, text processing, physics, biology, astronomy, networking, and parallel computing. Unfortunately, there s no single definitive taxonomy on which everyone agrees, so this chapter takes the easy way out and divides things into environments and interfaces. For the purposes of this chapter, a programming environment refers to the setting in which programming takes place and the accoutrement with which someone performs programming tasks. 2C H A8P8T E R . . . . In This Chapter Developing applications for Linux Using graphical programming environments Using command-line programming environments Programming for GUI interfaces Programming for command-line interfaces Using application programming interfaces . . . .
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Programming in Linux . . . . In (Web design service)

Thursday, November 15th, 2007

Programming in Linux . . . . In This Part Chapter 28 Programming Environments and Interfaces Chapter 29 Programming Tools and Utilities . . . . P A R T VII
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Web host music - Chapter 27 . Running a File Servers 749

Wednesday, November 14th, 2007

Chapter 27 . Running a File Servers 749 Fedora systems, look in the /usr/share/doc/samba-*/htmldocs directory for some excellent documentation you can read from your Web browser. In particular, refer to the Samba-HOWTO-Collection/diagnosis.html file for help with troubleshooting. Summary By providing centralized file servers, an organization can efficiently share information and applications with people within the organization, with customers, or with anyone around the world. Several different technologies are available for making your Linux computer into a file-serving powerhouse. The Network File System (NFS) protocol was one of the first file server technologies available. It is particularly well suited for sharing file systems among Linux and other UNIX systems. NFS uses standard mount and umount commands to connect file systems to the directory structures of client computers. The Samba software package that comes with many Linux distributions (or can be easily installed if it doesn t) contains protocols and utilities for sharing files and printers among Windows and OS/2 operating systems. It uses SMB protocols that are included with all Microsoft Windows systems and therefore provides a convenient method of sharing resources on LANs containing many Windows systems. . . .
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Web page design - 748 Part V . Running Servers LAN, you

Tuesday, November 13th, 2007

748 Part V . Running Servers LAN, you can type the following (as root user) to flush your firewall filtering rules temporarily: # iptables -F Try to connect to the Samba server from a Windows or Linux client. If you find that you can connect to the server, turn the firewall back on: # /etc/init.d/iptables restart You then need to open access to ports 137, 138, and 139 in your firewall so that the Samba server can accept connections for services. (See Chapter 17 for information about modifying your firewalls.) User Passwords Working? Try accessing a shared Samba directory as a particular user (from the local host or other Linux system on your LAN). You can use the smbclient command to do this. Here is an example: # smbclient //localhost/tmp -U chris added interface ip=10.0.0.1 bcast=10.0.0.255 nmask=255.255.255.0 Password: ******* Domain=[ESTREET] OS=[Unix] Server=[Samba 2.2.7a] smb: > In this example, smbclient connects to the directory share named tmp as the Samba user named chris. If the password is accepted, you should see information about the server and a smb:> prompt. If you cannot access the same shared directory from a Windows client, it s quite possible that the client is passing an improper username and password. Part of the problem may be that the Windows client is not providing encrypted passwords. For certain Windows clients, using encrypted passwords requires that you change a Windows registry for the machine. One way to change the registry is with the Windows regedit command. Registry changes required for different Windows systems are contained within the /usr/share/doc/samba-*/docs/Registry directory. The smbclient command, used here to list server information and test passwords, can also be used to browse the shared directory and copy files after you are connected. After you see the smb:> prompt, type help to see the available commands. The interface is similar to any ftp client, such as sftp. If your particular problem has not been addressed in this troubleshooting section, please refer to the user documentation that accompanies the Samba project. On Tip
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Web site domain - Chapter 27 . Running a File Servers 747

Monday, November 12th, 2007

Chapter 27 . Running a File Servers 747 The important information is the broadcast address (Bcast: 10.0.0.255), which is determined by the netmask (Mask:255.255.255.0). If the broadcast address isn t the same for the Samba server and the clients on the LAN, the clients cannot see that the Samba server has directories or printers to share. Samba Service Running? A basic troubleshooting check is to see if the service is running. Try the smbclient command from your Linux system to see that everything is running and being shared as you expect it to be. The smbclient command is a great tool for getting information about a Samba server and even accessing shared directories from both Linux and Windows computers. While logged in as root or any user who has access to your Samba server, type the following: $ smbclient -L localhost Password: ********** Domain=[ESTREET] OS=[Unix] Server=[Samba 3.0.3-4] Sharename Type Comment ——— —- ——- homes Disk Home Directories IPC$ IPC IPC Service (Samba Server) ADMIN$ Disk IPC Service (Samba Server) hp-ns1 Printer Domain=[ESTREET] OS=[Unix] Server=[Samba 3.0.8-4] Server Comment ——— ——- PINE Samba Server MAPLE Windows XP NS1 Samba Server Workgroup Master ——— ——- ESTREET PINE The Samba server is running on the local computer in this example. Shared directories and printers, as well as servers in the workgroup, appear here. If the Samba server is not running, you see Connection refused messages, and you need to start the Samba service as described earlier in this chapter. Firewall Open? If the Samba server is running, it should begin broadcasting its availability on your LAN. If you try to access the server from a Windows or Linux client on your LAN but get a Connection refused error, the problem may be that the firewall on your Linux Samba server is denying access to the NetBIOS service. If you have a secure
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Geocities web hosting - 746 Part V . Running Servers Mounting Samba

Sunday, November 11th, 2007

746 Part V . Running Servers Mounting Samba Directories in Linux Linux can view your Samba shared directories as it does any other medium (hard disk, NFS shares, CD-ROM, and so on). Use mount to mount a Samba shared file system so that it is permanently connected to your Linux file system. Here s an example of the mount command in which a home directory (/home/ chris) from a computer named toys on a local directory (/mnt/toys) is mounted. The command is typed, as root user, from a Terminal window: # mkdir /mnt/toys # mount -t smbfs -o username=chris,password=a72mg //toys/chris /mnt/toys The file system type for a Samba share is smbfs (-t smbfs). The username (chris) and password (a72mg) are passed as options (-o). The remote share of the home directory on toys is //toys/chris. The local mount point is /mnt/toys. At this point, you can access the contents of /home/chris on toys as you would any file or directory locally. You will have the same permission to access and change the contents of that directory (and its subdirectories) as you would if you were the user chris using those contents directly from toys. To mount the Samba shared directory permanently, add an entry to your /etc/ fstab file. For the example just described, you d add the following line (as root user): //toys/chris /mnt/toys smbfs username=chris,password=a72mg Troubleshooting Your Samba Server A lot can go wrong with a Samba server. If your Samba server isn t working properly, the descriptions in this section should help you pinpoint the problem. Basic Networking in Place? You can t share anything with other computers without a network. Before computers can share directories and printers from Samba, they must be able to communicate on your LAN. Your Samba server can use the TCP/IP name as the NetBIOS name (used by Window networks for file and printer sharing), or a separate NetBIOS name can be set in the smb.conf file. It is critical, however, that the broadcast address be the same as the broadcast address for all clients communicating with your Samba server. To see your broadcast address, type the following (as root user): # ifconfig -a eth0 Link encap:Ethernet HWadd 00:D1:B3:75:A5:1B inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Web host 4 life - Chapter 27 . Running a File Servers 745

Saturday, November 10th, 2007

Chapter 27 . Running a File Servers 745 Samba version 3.0.3-4 PID Username Group Machine ——————————————————————- Service pid machine Connected at ——————————————————- IPC$ 10865 shuttle Wed Aug 25 07:22:13 2004 tmp 10866 shuttle Wed Aug 25 07:29:14 2004 tmp 10874 10.0.0.177 Wed Aug 25 07:33:01 2004 Locked files: Pid DenyMode Access R/W Oplock Name ————————————————————– 10874 DENY_FCB 0×3 RDWR NONE /tmp/.m.swp Wed Aug 25 07:22:21 2004 10874 DENY_NONE 0×1 RDWR NONE /tmp/m Wed Aug 25 08:12:33 2004 This output shows that from the Linux Samba server, the tmp service (which is a share of the /tmp directory) is currently open by the computer named shuttle. PID 10874 is the process number of the smbd daemon on the Linux server that is handling the service. The files open are the /tmp/m and /tmp/.m.swap, which are opened by a text editor (although you can t tell that from this output). Both have read/write access. Using Samba Shared Directories Once you have configured your Samba server, you can try using the shared directories from a client computer on your network. The following sections describe how to use your Samba server from another Linux system or from various Windows systems. Using Samba from Nautilus To connect to a Samba share from a Nautilus file manager, use the Open Location box by clicking File.Open Location. Then type smb: into your Nautilus file manager Location box. A list of SMB workgroups on your network appears in the window. You can select a workgroup, choose a server, and then select a resource to use. This should work for shares requiring no password. The Nautilus interface seems to be a bit buggy when you need to enter passwords. It also requires you to either send clear-text passwords or type the username and password into your location box. For example, to get to my home directory (/home/ chris) through Nautilus, I can type my username, password, server name, and share name as follows: smb://chris:my72mgb@arc/chris
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

Web page design - 744 Part V . Running Servers 2. Add

Friday, November 9th, 2007

744 Part V . Running Servers 2. Add a Linux password for the new user as follows: # passwd chuckp Changing password for user chuckp New UNIX password: ******** Retype new UNIX password: ******** 3. Repeat the previous steps to add user accounts for all users from Windows workstations on your LAN that you want to give access to your Linux system to. 4. Type the following command to create the Samba password file (smbpasswd) on Fedora Linux systems: # cat /etc/passwd | /usr/bin/mksmbpasswd.sh > /etc/samba/smbpasswd (In Debian systems, use the /usr/sbin/mksmbpasswd command instead of mksmbpasswd.sh.) 5. Add an SMB password for the user as follows: # smbpasswd chuckp New SMB password: ********** Retype new SMB password: ********** 6. Repeat this step for each user. Later, each user can log in to Linux and rerun the passwd and smbpasswd commands to set private passwords. In the most recent version of Samba, there are options available in the smb.conf file that cause SMB and Linux passwords to be synchronized automatically. See descriptions of the passwd program, passwd chat, and UNIX password sync options in the SWAT section of this chapter. Starting the Samba Service When you have your Samba configuration the way you would like it, restart the Samba server as described earlier in the Getting and Installing Samba section. You can now check SMB clients on the network to see if they can access your Samba server. Testing Your Samba Permissions You can run several commands from a shell to work with Samba. One is the testparm command, which you can use to check the access permissions you have set up. It lists global parameters that are set, along with any shared directories or printers. Checking the Status of Shared Directories The smbstatus command can view who is currently using Samba shared resources offered from your Linux system. The following is an example of the output from smbstatus: Note
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Chapter 27 . Running a (Web site template) File Servers 743

Thursday, November 8th, 2007

Chapter 27 . Running a File Servers 743 [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes I won t go through every line of this example, but here are some observations. In the [global] section, the workgroup is set to ESTREET, the server is identified as the Samba Server on Maple, and only computers that are on the local network (192.168.0.) are allowed access to the Samba service. You must change the local network to match your network. Definitions for the local printers that will be shared are taken from the /etc/ printcap file, the printers are loaded (yes), and the CUPS printing service is used. Separate log files for each host trying to use the service are created in /var/log/ samba/%m.log (with %m automatically replaced with each host name). There is no limit to log file size (0). This example uses the user-level security (security = user), which allows a user to log in once and then easily access the printers and the user s home directory on the Linux system. Password encryption is on (encrypt passwords = yes) because most Windows systems have password encryption on by default. Passwords are stored in the /etc/samba/smbpasswd file on your Linux system. The dns proxy = no option prevents Linux from looking up system names on the DNS server (used for TCP/IP lookups). The [homes] section enables each user to access his or her Linux home directory from a Windows system on the LAN. The user will be able to write to the home directory. However, other users will not be able see or share this directory. The [printers] section enables all users to print to any printer configured on the local Linux system. Adding Samba Users Performing user-style Samba security means assigning a Linux user account to each person using the Linux file systems and printers from his or her Windows workstation. (You could assign users to a guest account instead, but in this example, all users have their own accounts.) Then you need to add SMB passwords for each user. For example, here is how you would add a user whose Windows workstation login is chuckp: 1. Type the following as root user from a Terminal window to add a Linux user account: # useradd -m chuckp
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.