Archive for October, 2007

Web server extensions - 601Chapter 23Running a Linux, Apache, MySQL, and PHP

Wednesday, October 31st, 2007

601Chapter 23Running a Linux, Apache, MySQL, and PHP (LAMP) ServerThe installation scripts in the mysql-server package provide you with a couple ofnotices and ask whether you want to remove databases when purging the mysql- server package. No is the safest option because it reduces the chance of accidentallylosing your data. You also are asked whether you want the MySQL server to starton boot. You should probably say Yes here. Access to databases within MySQL is managed based on account information storedwithin the mysql database. As with UNIX systems, the superuser account is namedroot. The default installation does not set a password on this account, and it createsan anonymous account and a test database that should be removed unless you arecertain that you need them: # mysql -u root mysqlWelcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 3 to server version: 4.0.18-logType help; or h for help. Type c to clear the buffer. mysql> UPDATE user SET Password=PASSWORD( newpassword ) -> WHERE User= root ; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0mysql> DELETE FROM user WHERE User = ; Query OK, 2 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> DROP DATABASE test; Query OK, 0 rows affected (0.00 sec) mysql> qByeThe UPDATEcommand changes the password for the MySQL root account (replacenewpasswordwith the password you want to use), the DELETEcommand removesthe anonymous user, and the FLUSHcommand tells the running MySQL server toreload the list of user accounts from the database. Finally, the DROPcommandremoves the test database. Operating Your LAMP ServerWith the components of your LAMP server installed and running, you are ready toconfigure Apache and try it out. For this example, Apache is set up to serve contentfor your own domain using a feature called virtual hosting, after which you ll see howto install the Gallery application (http://gallery.menalto.com), which enablesyou to create an online photo gallery on your LAMP server.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

600Part VRunning ServersFigure 23-1:The PHP information (Web hosting company) page. If,

Tuesday, October 30th, 2007

600Part VRunning ServersFigure 23-1:The PHP information page. If, instead of an information page, you are prompted to download the file, check theappropriate PHP installation section (earlier in the chapter) to verify that all thesteps were completed successfully. After everything is tested and working, it s safe to remove the info.phpfile thatyou created: # rm -f /var/www/info.phpInstalling MySQLThe MySQL database system is divided into three main packages: the server, clients, and client libraries. The server is contained within the mysql-server package andrequires the other two to function. APT is aware of this, which means the packageswill be installed automatically when you install mysql-server: Make sure the hostname settings have been configured as described in Chapter 9before installing the mysql-server package. Failure to do so could result in an errorthat will cause the installation to fail. # apt-get install mysql-serverNote32_
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

599Chapter 23Running a Linux, Apache, MySQL, and PHP (Hosting web)

Tuesday, October 30th, 2007

599Chapter 23Running a Linux, Apache, MySQL, and PHP (LAMP) ServerThis installation process installs Apache version 1.3, and all the configurationexamples here have been tested against it. If you would rather install Apache 2.0, itis available in the apache2-mpm-prefork package and uses libapache2-mod-php4instead of the php4 package mentioned later in this chapter. The server should automatically start once the installation is finished, which meansthat you re now ready to install PHP. Installing PHPNow you re ready to install and test the PHP module in Apache. This is the mostcommon method for installing PHP but introduces some security concerns on multi- user systems because all PHP scripts will be run as the same user as the Apachedaemon. Be sure to read the Security section of the PHP manual at http://php.net/ manual/en/security.phpbefore granting other users access to manipulate PHPfiles on your server. The PHP Apache module is contained in the php4 package, which is installed usingAPT. The following lines download and install the module and the mysql extensions, configure Apache to load the module automatically, and instruct Apache to reloadits configuration: # apt-get install php4 php4-mysql# apache-modconf apache enable mod_php4Replacing config file /etc/apache/modules.conf with new version# apachectl restartDon t worry if the second line does not print out a message as this example shows. That simply means that the module has already been configured. At this point, Apache should be ready to process HTTP requests, complete withprocessing of PHP files. To test it, create a file named /var/www/info.phpcontain- ing a call to the phpinfo()function: # cat > /var/www/info.php ^D# chmod 644 /var/www/info.phpThe ^Dmeans that you should press Ctrl+D on your keyboard. This tells the catcommand that you are at the end of the input. Now try opening the page by goingto http://your server s address/info.php. You should see a page full ofinformation about your Apache and PHP installation, as shown in Figure 23-1. Note32_
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

598Part VRunning ServersThe core features of PHP are (Web site optimization)

Monday, October 29th, 2007

598Part VRunning ServersThe core features of PHP are included within the PHP code itself, and additional fea- tures are implemented in the form of extensions. On Debian, PHP is contained inthe php4 package, and the extensions are stored in separate packages that can beinstalled at any time. Some of the most popular packages include: .php4-curl This extension interfaces with the CURL library, which containsinterfaces for several types of servers, including LDAP, HTTP, and FTP. .php4-domxml Functions related to processing XML. .php4-gd The GD library is used for creating images. It is most popular forits graph generation functions. .php4-ldap Functions for communicating with LDAP servers. .php4-mysql Functions for communicating with a MySQL database server. .php4-pear Functions and support programs for using the PHP Extension andApplication Repository (PEAR). PEAR is similar to the CPAN archive for Perlprograms and contains a large number of useful modules. (More informationabout PEAR modules can be found at http://pear.php.net.) .php4-pgsql Functions for communicating with a PostgreSQL database server. .php4-snmp Functions for performing network management using the SNMPprotocol. Setting Up Your LAMP ServerBefore proceeding through the examples in this section, be sure that your Debianoperating system is configured. You may also choose to set up a server on a systemthat has been configured using the layout and software packages intended for aworkstation, but that s not recommended unless you will only be providing servicesfor a very small number of users whom you know well and trust. Installing ApacheThe next step toward a functioning LAMP server is to install the Apache HTTPserver, which can be found in the apache package. Use APT to retrieve and installthe package: # apt-get install apacheDuring the configuration process, you will be asked whether you want to enable thesuexec mechanism. The suexec feature increases the security of CGI applicationsand is generally recommended. You can change your selection later using debconfto reconfigure the apache package. More information about debconfcan be foundin Chapter 9.32_
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Best web hosting site - 597Chapter 23Running a Linux, Apache, MySQL, and PHP

Sunday, October 28th, 2007

597Chapter 23Running a Linux, Apache, MySQL, and PHP (LAMP) Serverconsists of a server that handles storage and access to data and clients to handleinterfacing with and managing the server. Client libraries are also included, andthey can be used by third-party programs, such as PHP, to connect to the server. In a LAMP server, MySQL is used for storing data appropriate to the Web applicationsthat are being used. Common uses include data such as usernames and passwords, entries in a journal, and data files. Data within a database are stored in tables; each table contains columns and rows. You could compare a table to a spreadsheet, in which each column contains aspecific data field and each row contains a record. Instead of a graphical represen- tation of the data, individual rows are accessed using a query that returns only therows desired. MySQL was originally developed by Michael (Monty) Widenius of TcX (Sweden). In1994, TcX needed a backend database for Web applications and decided to use onesupporting SQL, a standardized and widely recognized language for interacting withdatabases. TcX investigated the free databases that were available at the time, plus some commercial databases, but could not find a system that supported the features itneeded and could handle its large databases at the same time. Because it alreadyhad experience writing database programs, TcX decided that the best way to getwhat it wanted was to develop a new system that supported SQL. In 1995, TcX released the source code for MySQL on the Internet. MySQL was notanopen source program at that time (due to some of the restrictions in its license), but it still began to see widespread use. MySQL was later released under the GNUGeneral Public License (GPL). PHPPHP is a programming language that was developed specifically for use in Webscripts. It is preferred by many developers because it s designed to be embeddedwithin HTML documents, making it simpler to manage Web content and scriptswithin a single file. PHP originated as a set of Perl scripts by Rasmus Lerdorf called PHP/FI (PersonalHome Page/Forms Interpreter).Over time, more features were implemented, andRasmus rewrote PHP/FI in C. In late 1997, Andi Gutmans and Zeev Suraski began working on a complete rewriteof PHP/FI. As the language evolved and more features were implemented, Gutmansand Suraski decided that it would be appropriate to rename the project to moreaccurately reflect these features. The name PHP Hypertext Preprocessor (PHP) was chosen, with Lerdorf s approval, to maintain familiarity for users of PHP/FI. Note32_
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

596Part VRunning ServersComponents of a LAMP ServerYou re probably (Web domain)

Saturday, October 27th, 2007

596Part VRunning ServersComponents of a LAMP ServerYou re probably familiar with Linux by this point, so this section focuses on theother three components Apache, MySQL, and PHP and the functions theyserve within a LAMP system. ApacheWithin a LAMP server, Apache HTTPD provides the service with which the clientWeb browsers communicate. The daemon runs in the background on your serverand waits for requests from clients. Web browsers connect to the HTTP daemon andsend requests, which the daemon interprets, sending back the appropriate data. Apache HTTPD includes an interface that allows modules to tie into the process tohandle specific portions of a request. Among other things, modules are available tohandle the processing of scripting languages such as Perl or PHP within Web docu- ments and to add encryption to connections between clients and the server. Apache began as a collection of patches and improvements from the National Centerfor Supercomputing Applications (NCSA), University of Illinois, Urbana-Champaign, to the HTTP daemon. The NCSA HTTP daemon was the most popular HTTP serverat the time, but had started to show its age after its author, Rob McCool, left NCSAin mid-1994. Another project that came from NCSA is Mosaic. Most modern Web browsers cantrace their origins to Mosaic. In early 1995, a group of developers formed the Apache Group and began makingextensive modifications to the NCSA HTTPD code base. Apache soon replacedNCSA HTTPD as the most popular Web server, a title it still holds today. The name Apache refers to the nation of Native Americans having the same nameand does not refer to a patchy Web server. The Apache Group later formed the Apache Software Foundation (ASF) to promotethe development of Apache and other free software. With the start of new projects atASF, the Apache server became known as Apache HTTPD, although the two terms arestill used interchangeably. Current ASF projects include Jakarta (open source Javasolutions), mod_perl (an Apache-embedded Perl interpreter), and SpamAssassin(an e-mail filtering program). MySQLMySQL is an open source DBMS (database management system) that has becomepopular among Web masters because of its speed, stability, and features. MySQLNoteNote32_
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.

Running a Linux, Apache, MySQL, (Web site translator) and PHP(LAMP) ServerWith

Saturday, October 27th, 2007

Running a Linux, Apache, MySQL, and PHP(LAMP) ServerWith the growing availability of broadband Internetconnections and a popular desire to run personalWeb sites and Web logs (blogs), an increasing number of people are setting up Web application servers on their homeInternet connections. Web applications are also finding morepopularity in business environments because Web applicationsreduce the number of programs that need to be maintained onworkstations. One popular variety of Web application server is what hasrecently come to be known as a LAMP serverbecause it bringstogether Linux, Apache, MySQL, and PHP. LAMP servers com- bine components from several open source projects to form afast, reliable, and economical platform for other readily avail- able applications. This chapter will help you install and configure your own LAMPserver, starting with an introduction to the various compo- nents, guiding you through the installation and configuration, and finishing with the installation of a sample Web application. The examples in this chapter are based on a system runningDebian GNU/Linux but conceptually should work on other dis- tributions, taking into account that other Linux systems usedifferent ways to install the software and start and stop ser- vices. Descriptions of how to set up LAMP configuration files, however, should work across multiple Linux distributions withonly slight modifications. More information about Debian canbe found in Chapter 9.2323CHAPTER …In This ChapterComponents of aLAMP serverSetting up yourLAMPserverOperating yourLAMP serverTroubleshootingSecuring your Webtraffic with SSL/TLS …
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Running Servers …In This (Web design careers) PartChapter 23Running a Linux,

Friday, October 26th, 2007

Running Servers …In This PartChapter 23Running a Linux, Apache, MySQL, and PHP (LAMP) ServerChapter 24Running a Mail ServerChapter 25Running a Print ServerChapter 26Running a File Server …
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

591Chapter 22Gaming Alone and Onlinerole-playing game in the (Web hosting domains)

Thursday, October 25th, 2007

591Chapter 22Gaming Alone and Onlinerole-playing game in the swords-and-sorcery mold. You can develop your characterand go adventuring or play online with others via a LAN or over the Internet. Youcan even build your own worlds and host adventures as the Dungeon Master. Neverwinter Nights is licensed by Wizards of the Coast to use Dungeons & Dragonsrules and material. Of course, to use the Neverwinter Nights Linux client, you must purchase the gamefrom BioWare. You must also have access to certain files from a Windows installa- tion of the game. Keep in mind that getting Neverwinter Nights running is not a sim- ple process. Important installation instructions and downloadable files are locatedat http://nwn.bioware.com/downloads/linuxclient.html. This site includesadditional information about expansion packs and updates. If you want theNeverwinter Nights experience on your Linux system to be pleasant, I highly recom- mend reading the instructions thoroughly. And you will need patience in addition toa high-bandwidth Internet connection. Depending on the version of NeverwinterNights to which you have access, you may need to download up to 1.2GB of files. SummaryWith the addition of hot titles such as Doom 3, Far Cry, and EverQuest 2 to the listof playable titles, Linux continues to grow as a gaming platform. You can spendplenty of late nights gaming on Linux. Old UNIX games that have made their way toLinux include a variety of X Window based games. There are card games, strategygames, and some action games for those less inclined to spend 36 hours playingDoom 3. On the commercial front, Civilization: Call to Power for Linux and Myth II are avail- able to use on your Linux system. Unfortunately, these will probably disappearbecause Loki Software (which ported those applications to Linux) went out of busi- ness. Fortunately, the future of high-end Linux gaming seems to be in the hands ofTransGaming Technologies, which has created Cedega from previous WINE technol- ogy to allow Windows games to run in Linux. Commercial games that run natively in Linux are also available. These includegames from id Software, such as Quake III Arena and Return to Castle Wolfenstein. …
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

590Part IVRunning ApplicationsMyth II was (Vps web hosting) created by Bungie

Thursday, October 25th, 2007

590Part IVRunning ApplicationsMyth II was created by Bungie Software (www.bungie.com) and ported to Linux byLoki Entertainment Software (www.lokigames.com). The Loki port of the popularMyth game includes improved graphics and new scenarios. A demo version is avail- able that runs well in most distributions (particularly Fedora/Red Hat). You can getit via the Demo Launcher described earlier. You need at least a modest Pentium 133MHz, 32MB RAM, 80MB swap space, and 100MB of free disk space. You also neednetwork hardware for multiuser network play (network card or dial-up), and asound card if you want audio. Figure 22-8 shows a screen in Myth II. Figure 22-8:Use warriors, archers, and dwarves to battle in Myth II. Heretic IIBased on the Quake Engine, Heretic II sets you on a path to rid the world of adeadly, magical plague. As the main character, Corvus, you explore dungeons, swamps, and cities to uncover and stop the plague. The graphics are rich, and thegame play is quite engaging. You will experience some crashing problems with Heretic II out of the box. Be sureto check for the update to Heretic II at www.updates.lokigames.com, which shouldfix most of the problems. Neverwinter NightsBioWare (www.bioware.com) dipped its foot into Linux gaming waters with a Linuxclient for its wildly popular Neverwinter Nights game. Neverwinter Nights is a classic30_
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.