Install XAMPP for easy, integrated development
本文为练习翻译,不足之处敬请指正
原文地址:http://www.ibm.com/developerworks/linux/library/l-xampp/
【原文】
Install XAMPP for easy, integrated development
Middleware stacks like this could revolutionize open source, multi-tier software development
【译文】
安装简单的整合开发包XAMPP
像这样的整合中间件软件包的开发能够彻底改变开源的多平台软件开发工作
【原文】
Nils-Erik Frantzell (nfrantze#ucsc.edu)Computer Science Department, UC Santa Cru
【译文】
作者:
Nils-Erik Frantzell (nfrantze#ucsc.edu)计算机科学系,美国加州大学圣克鲁兹分校
【原文】
About the author:
Nils-Erik Frantzell is currently studying computer science at the University of California, Santa Cruz. His interests include Linux, Web programming (particularly PHP), networking, open source technologies, and fiddling with computer hardware. He spends his time away from the computer tending to his carnivorous fishes while listening to electronic music. You can contact Nils-Erik at nfrantze#ucsc.edu.
【译文】
关于作者:
Nils-Erik Frantzell现在正在美国加州大学圣克鲁兹分校学习计算机科学。他的兴趣包括 Linux,网络编程(尤其是PHP),网络技术,开源技术和折腾计算机硬件。他的兴趣很广泛,包括从追逐计算机世界的趋势养肉食性鱼,玩电子打击乐。你可以用nfrantze#ucsc.edu联系他。
【原文】
Summary: Open source stacks such as XAMPP from Apache Friends are simplifying open source development by making it easier to write and distribute applications in a stable and standardized environment. Traditionally, AMPP -- Apache, MySQL, PHP, and Perl -- have all been installed and configured as separate products. The trend of combining them into integrated middleware stacks promises to make open source development more competitive with J2EE? application development, at least for low-end applications. In this article, you'll learn how to install, configure, and back up XAMPP on Mandrake Linux? 10.0 and also how to configure and administer XAMPP, as well as how to install your own applications in an XAMPP environment.
【译文】
摘要:在Apache Friends上像XAMPP开源软件包是为了简化搭建一个稳定的开发环境,这样我们就能更便捷的开发软件。一般来说,AMPP,包含Apache, MySQL, PHP, and Perl,应该作为单独的软件被安装和设置。把他们整合在一个中间件软件中的趋势市开元软件的开发比J2EE更有竞争优势,起码在低端程序中是这样。在这篇文章中,你将学会如何在Mandrake Linux 10.0中安装、设置、管理和备份XAMPP,当然你也学到如何在XAMPP中开发你自己的程序。
【原文】
The advent of Java 2 Enterprise Edition? dramatically changed the software landscape by providing an integrated middleware stack that greatly simplified the task of writing and deploying Java? applications. For a while, the open source community was left behind because it lacked a similar integrated architecture.
Recently, with the introduction of integrated open source stacks like XAMPP from Apache Friends, this situation has started to change. These stacks are still quite simple and rudimentary when compared with J2EE, but they are nevertheless an important step on the way to fuller systems integration. PHP 5.0 (which makes PHP fully object oriented) is a good indicator that this trend will accelerate.
The focus of this article is on one of the integrated, open source stacks: XAMPP from Apache Friends.
【译文】
Java 2企业版的出现极大的简化了编写和开发Java应用程序,提供Java 2 Enterprise Edition这样一个正和开发环境中间软件极大的改变了软件业的格局。在那段时间中,开源社区因为没有一个易用的整合开发环境而被远远拉下。
近年来,随着Apache Friends XAMPP,这种状况已经开始改变。与J2EE相比,这些整合软件包仍然是比较简单低水平的,但他们仍然是在通向全面系统集成的重要一步。 PHP 5.0中(这使得PHP的完全面向对象)是一个很好的服务器软件,并且这种流行趋势还在加速。
本文的重点是来自Apache Friends 的集成开源软件包 XAMPP。
【原文】
Introducing XAMPP
XAMPP is a full-featured AMPP (Apache MySQL, PHP, Perl) package that is one of the few non-commercial AMPP middleware stacks available on Linux. With its tight integration, XAMPP makes it possible to run anything from a personal home page to a full-featured production site (though only for development purposes; XAMPP is not meant to be used on a production server due to security issues).
XAMPP really shines in the following areas:
- It is easy to install and set up.
- It contains a number of useful packages that make it easy to do things like generate traffic reports and accelerate PHP content.
- It has been thoroughly tested on the SUSE, Red Hat, Mandrake, and Debian Linux distributions, as well as on Windows? and Solaris.
For this article, we will install XAMPP under Mandrake Linux 10.0. Let's start by looking at the default packages that come with XAMPP.
【译文】
XAMPP介绍
XAMPP是一个功能齐全的AMPP(Apache MySQL, PHP, Perl)套件,是为数不多的支持 Linux 的非商业AMPP。凭借它集成的软件功能齐全,XAMPP能够支持简单的个人主页甚至任何一个全功能<php>建站软件(仅限用于开发软件的目的; 不意味着XAMPP能使用在需要更安全的商业服务器上)。
XAMPP的几大亮点:
- 容易安装和设置。
- 包含了几个有用的软件,这使得产生流量报告和加快PHP内容显示等更容易。
- 通过测试证明它能够运行在SUSE,红帽,Mandrake和Debian 等Linux发行版,也可以运行在Windows和Solaris系统上。
在本文中,我们将在Mandrake 10.0下演示安装XAMPP。让我们以安装使用XAMPP默认包来开始。
【原文】
Basic packages
Basic packages include system, programming, and server software:
- Apache, the famous Web server
- MySQL, an excellent, free, open source database
- PHP, the programming language (in versions 4.3.8 and 5.0.1 at the time of this writing)
- Perl, the programming language
- ProFTPD, an FTP server
- OpenSSL, for secure sockets layer support
- Graphics packages
XAMPP includes the following graphics-related packages:
- GD, the "Graphics Draw" library
- libpng, the official PNG reference library
- libjpeg, the official JPEG reference library
- ncurses, the character graphics library
- Database packages
【译文】
基本软件包
基本软件包包括系统,编程和服务器软件:
- Apache(阿帕奇),流行的Web服务器软件
- MySQL,一个优秀的免费开源数据库软件
- PHP,编程语言(在撰写本文时php的版本是4.3.8和5.0.1)
- Perl,另一种编程语言
- proftpd,FTP服务器软件
- OpenSSL,用于安全链接的支持
图形支持程序包
XAMPP的包括以下图形相关的软件包:
- GD:“图形绘制”库
- libpng,官方指定的PNG显示库
- 的libjpeg,官方指定的JPEG显示库
- ncurses,文字绘制库
- 数据库程序包
【原文】
And what would an integrated stack be without some database packages such as:
- gdbm, the GNU implementation of the standard UNIX? dbm library
- SQLite, an extremely small, zero-configuration SQL database engine
- FreeTDS, a database library that gives UNIX and Linux programs the ability to talk to Microsoft SQL and Sybase databases
XML packages
For XML development, XAMPP includes the following:
- expat, an XML parser library
- Salbotron, an XML toolkit
- libxml, an XML C parser and toolkit for GNOME
【译文】
一个整合的服务器软件包如果没有下面的数据库软件将是怎么样的呢(XAMMPP包含下面的软件):
- gdbm,GNU规定的标准UNIX系统dbm库
- SQLite,一个体积非常小不用零配置的SQL数据库引擎
- FreeTDS,一个能让UNIX和Linux的软件能够与Microsoft SQL、ybase数据库和XML软件交换数据的数据库库软件
为了支持XML的开发,XAMPP包含了:
- expat,一个XML解析库
- Salbotron,一个XML工具包
- libxml,一个XML 解析器和GNOME的工具包
【原文】
PHP packages
For PHP development, XAMPP includes the following:
- PEAR, the PHP library
- A pdf class that generates dynamic PDF documents with PHP
- TURCK MMCache, a PHP performance enhancer
- Other packages
And finally, XAMPP demonstrates its versatility by including the following packages:
- zlib, a compression library
- mod_perl, which embeds a persistent Perl interpreter in Apache
- gettext, a toolset that assists GNU packages in producing multi-lingual messages
- mcrypt, an encryption program
- Ming, a Flash (SWF) output library
- Freetype2, a software font engine
- IMAP C-Client, a mail program API
Now let's talk about installing XAMPP.
【译文】
PHP软件包
为了支持PHP的开发,XAMPP的包含:
- PEAR,PHP库
- 一个使PHP动态生成PDF文件的PDF类
- TURCK MMCache,一个增强PHP性能的软件
- 其它软件包
最后,XAMPP包含下面这些软件使它拥有更多功能:
zlib,一个压缩/解压缩库
mod_perl,一个永久嵌入在Apache的Perl解释库
gettext的,一个协助GNU软件生成多语言信息的工具
mcrypt,一个加密程序
Ming,一个Flash(SWF)的输出库
freetype2,软件字体支持引擎
IMAP C-Client,一个邮件程序的API
现在让我们了解一下XAMPP的安装。
【原文】
To install XAMPP, download the latest binary from the Apache Friends Web site (see Resources for a link). Untar it to /opt using the following command:
tar xvfz xampp-linux-1.4.7.tar.gz -C /opt
That's it! XAMPP is now installed in /opt/lampp. Any previous installations that were in /opt have been overwritten. If you are running an older version of XAMPP and don't want to download the entire package again, Apache Friends has an upgrade package available for download.
Now that everything is installed, let's start the new daemons. Change your current working directory to /opt/lampp (cd /opt/lampp) and enter the following:
./lampp start
You should see the following:
Starting XAMPP for Linux 1.4.7...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
XAMPP is now up and running. The best way to verify this is to open a browser and type localhost in the address bar and hit the Enter key. You should be redirected to the XAMPP welcome page.
【译文】
要安装XAMPP,请先从Apache Friends的网站下载最新的整合包(参见资源连接)。使用以下命令把它解压缩到 /opt :
tar xvfz xampp-linux-1.4.7.tar.gz -C /opt
就是这样! XAMPP已经安装在 /opt/lampp 下面。任何以前安装在 /opt 的XAMPP已经被覆盖。如果您已经在运行旧版本的XAMPP并且不想下载整个XAMPP包,Apache Friends 提供了一个升级包下载。
现在一切都安装完了,让我们在 终端 中启动这个新软件。进入 /opt/lampp 目录(cd /opt/lampp),并输入以下内容:
./lampp start
您应该看到类似以下的内容:
Starting XAMPP for Linux 1.4.7...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
XAMPP现在已经运行。最好的验证方法是打开浏览器,在地址栏输入 localhost ,然后按下回车键。您应该被重定向到XAMPP的欢迎页面。
【原文】
Figure 1. The XAMPP welcome page
Click the Status link in the left navigator to see that the necessary services have started up correctly. If all is well, you should see the following page:
Figure 2. Service status page
单击左侧导航的状态链接查看必要的服务是否已经正常启动。如果一切正常,您应该看到以下网页:
图2。服务状态页
【原文】
Congratulations! You have just installed and set up a fully working AMPP development environment. Now let's install a simple application to demonstrate how you can use the environment
【译文】
恭喜!你已经安装了一个完全正常运行的开发环境。现在,让我们安装一个简单的程序来演示如何使用这个开发环境
【原文】
Installing a simple application
To make use of XAMPP's basic features, you need a simple application. The best application would be one that utilizes a database back end; a relatively simple database containing one table would be fine.
The test database will contain one table with one column. Let's follow the (computer-) age-old tradition of test programs and plan for our table to hold a single record of "Hello World!". We'll access this datab
ase using both a Perl and a PHP script. Both scripts will access the database, retrieving the single row and outputting it to the screen.
【译文】
安装一个简单的应用程序
使用XAMPP的基本功能,您只需要一个简单的应用程序。最好的程序是一个能建立仅一个数据库表的程序。
测试数据库是仅含含一列的表。让我们按照传统的软件测试项目,在数据库中保存一个记录的“Hello World!”。我们将使用一个Perl和PHP脚本访问此数据库。这两个脚本都能访问数据库,检索这个列,并把它输出到屏幕上。
【原文】
The tool
Our database will be created and administered using phpMyAdmin, an excellent Web-based MySQL administration tool written in PHP. It has a great user interface and allows you to do many things of varying complexity, ranging from creating/dropping/altering databases and tables to exporting data, managing keys, and processing SQL files. phpMyAdmin is a great tool because:
- It helps beginners familiarize themselves with MySQL without having to deal with what can be intimidating command-line interfaces.
- It allows advanced users to do the more simple and routine tasks with speed and ease.
- It's handy for those occasions when you want to give someone database administration privileges without allowing them the almighty shell access.
- 它可以帮助初学者熟悉MySQL,而不必面对那些吓人的命令行。
- 它允许高级用户用简单的方法快速解决那些常规和简单的任务。
- 它允许你把用户设置为非完全权限的管理员模式。
【原文】
Creating the database
【译文】
工具
我们使用phpMyAdmin————一个用PHP编写的MySQL的优秀Web管理工具————创建和管理这个数据库。它有一个优秀的用户界面,允许你做从创建/删除/更改数据库及数据表和导出数据,管理表的键值,处理SQL文件等复杂事情。 phpMyAdmin是一个了不起的工具,因为:
To create the test database in phpMyAdmin:
- Go to the XAMPP start page (localhost).
- Select phpMyAdmin in the left navigator under Tools.
- In the Create New Database field on the phpMyAdmin home page, enter hello_world and click Create.
Now you must create a table within this database and specify how many fields the table should contain (a field is analogous to a column). Let's call our table "hello_table" and have it contain one field to hold our record of "Hello World!". Enter hello_table in the Name text field and enter 1 in the Fields text field. When you are done, click Go.
Now it's time to execute the last step of database creation: choose a name and a data type definition for our column. Let's stick with the "hello" theme and name our column "hello_column"; enter hello_column in the Field text field.
Because we will be storing the string "Hello World!" in our column, its type must be a type of char with a length of 12 (the length of the string "Hello World!"). The default type varchar is sufficient. In the Length/Values text field next to Type, enter 12 for a max length of 12 characters. Don't worry about the rest of the fields on this page. Go ahead and click Save.
If everything was done correctly, you should see the following:
Figure 3. Hello World database summary
在phpMyAdmin中创建测试数据库:
打开XAMPP的起始页(localhost)。
在左侧的导航栏下选择phpMyAdmin工具。
在phpMyAdmin的主页找到“创建新的数据库”,输入“hello_world”并单击“创建”。
现在,您必须在这个数据库中创建一个表,并指定这个表中有多少个字段(一个字段类似于一列)。我们把这个表起名为“hello_table”,并且它包含一个字段来保存我们的记录的“Hello World!”。
在“名字”字字框中输入“hello_table”,然后后面的文本框(Number of fields)中填入 “1”。当您完成,单击“执行”/“Go”。
现在来执行建立数据库的最后一个步骤:选择我们的列名和数据类型的定义。
点击“hello”和我们把这个“字段”起名为“hello_column”,字段文本框中输入“hello_column”。
因为我们将要将字符串“Hello World!”保存在这一字段中,它的类型必须是一个长度为12的字符型(字符串“Hello World!”的长度)。默认类型为varchar就足够了。在 Length/Values 文本框中,输入的12即最大长度为12个字符。不要管其他的类型值。单击保存。
如果一切操作正常,您应该看到以下内容:
图3。建立数据库Hello World
【原文】
Now let's insert our record of "Hello World!". Click the Insert tab and enter "Hello World!" in the Value text field. The Function drop-down list can be left alone in this case. Click Go to insert your "Hello World!" record into the database.
To confirm that the record was inserted successfully, click the Browse tab. Your "hello world" listing should be displayed.
Scripting
Now that the back end is up and running, it's time to handle the scripting part. We will use two scripts, one in Perl and one in PHP. Our only requirements for each script will be one database connect, one database access, and an output to the screen of the retrieved row.
Listing 1. Simple database connection and retrieval in PHP using PEAR::DB
require_once 'DB.php'; // must be included in any script that uses PEAR::DB // it is a huge security risk to store your database connection information // in the same file as your code. We have done it here solely for the purpose // of this example. Please store your database connection information in another // file that is not in your document root directory and adequately protected. // database connection information $db_host = "localhost"; // hostname of the database server $db_user = "root"; // database user's username $db_pass = ""; // database user's password, nothing by default $db_name = "hello_world"; // the name of the database to connect to $db_type = "mysql"; // the type of database server. // your data source name string. This contains the connection // information for your database. $dsn = "$db_type://$db_user:$db_pass@$db_host/$db_name"; // creates a database connection object or a database error // object based on the success of the database connection. $db = DB::connect($dsn, TRUE); // if an error was encountered, the script exits with an error message if (DB::isError($db)) { die($db->getMessage()); } // SQL query that you wish to use to query the database $sql = "SELECT * FROM hello_table"; // query the database, store result in $result $result = $db->query($sql); // exits with an error message if the query was unsuccessful if(DB::isError($result)){ die($result->getMessage()); } // fetch rows from the database until no more rows exist. // output the "hello_column" field of each row to the screen. // once no more rows exist, exit with an error message. while($row = $result->fetchRow(DB_FETCHMODE_OBJECT)){ if(DB::isError($row)){ die($row->getMessage()); } print("<H1>$row->hello_column</H1>"); $result->free(); } $db->disconnect(); //disconnect from the database |
【译文】
现在,让我们插入的“Hello World!”这个记录。单击“插入”标签,在值文本字段输入“Hello World!”。在这种情况下会有下拉选择列表,点击“Go”把“Hello World!”插入数据库。
确认记录记录是否插入成功,单击“浏览”(Browse)标签。helloworld表中应该显示您刚才插入的内容。
脚本
后台已经运行起来,现在来处理脚本部分。我们将使用两种脚本,一Perl和PHP。脚本的任务是连接一个数据库并访问,将检索到的行在屏幕上输出。
1。在PHP中使用PEAR::DB进行简单的数据库连接和检索
require_once 'DB.php'; // must be included in any script that uses PEAR::DB // it is a huge security risk to store your database connection information // in the same file as your code. We have done it here solely for the purpose // of this example. Please store your database connection information in another // file that is not in your document root directory and adequately protected. // database connection information $db_host = "localhost"; // hostname of the database server $db_user = "root"; // database user's username $db_pass = ""; // database user's password, nothing by default $db_name = "hello_world"; // the name of the database to connect to $db_type = "mysql"; // the type of database server. // your data source name string. This contains the connection // information for your database. $dsn = "$db_type://$db_user:$db_pass@$db_host/$db_name"; // creates a database connection object or a database error // object based on the success of the database connection. $db = DB::connect($dsn, TRUE); // if an error was encountered, the script exits with an error message if (DB::isError($db)) { die($db->getMessage()); } // SQL query that you wish to use to query the database $sql = "SELECT * FROM hello_table"; // query the database, store result in $result $result = $db->query($sql); // exits with an error message if the query was unsuccessful if(DB::isError($result)){ die($result->getMessage()); } // fetch rows from the database until no more rows exist. // output the "hello_column" field of each row to the screen. // once no more rows exist, exit with an error message. while($row = $result->fetchRow(DB_FETCHMODE_OBJECT)){ if(DB::isError($row)){ die($row->getMessage()); } print("<H1>$row->hello_column</H1>"); $result->free(); } $db->disconnect(); //disconnect from the database |
【原文】
Each script connects to the database, retrieves a row of data, and outputs that row to the screen. PHP's database accesses are done using PEAR::DB, a handy database abstraction layer that allows the same database-access code to be used regardless of what database is implemented. Unfortunately XAMPP doesn't yet come with a database abstraction layer for Perl.
Placing the scripts
So, now we have everything we need. Our database is up and running and we have two scripts with which to test it. All we've got to do now is put the scripts in the right place. Let's take a quick look at how XAMPP is laid out on the hard drive in Listing 2.
The directory that interests us here is /opt/lampp/htdocs/, the Apache Documents directory. Any Web pages and associated files that you want to be displayed when someone accesses your Web site's root address are placed here. Since we were able to view the XAMPP welcome page, this directory already has some files in it. Let's take a quick peek at the directory listing to confirm this (type ls /opt/lampp/htdocs):
drwxr-xr-x 2 root root 4096 Jan 24 2003 apache
-rwxr-xr-x 1 nobody root 163 Oct 31 2003 index.htmldrwxr-xr-x 2 nobody root 4096 Sep 12 21:54 webalizer
drwxr-xr-x 5 root root 4096 Jun 15 06:24 xampp
【译文】
每个脚本连接到数据库,检索数据行,该行输出到屏幕上。 PHP的数据库访问可以使用PEAR::DB完成,一个方便的数据库抽象层,允许相同的数据库访问代码用于不同的数据库执行。不幸的XAMPP还没有Perl的数据库抽象层。
运行脚本
现在我们准备好了需要的一切。我们的数据库运行起来,我们有两个用来测试数据库的脚本。现在我们要做的就是把脚本放在正确的地方。我们来看看XAMPP如何将硬盘上的内容输出。
2、
这里供我们使用的是Apache的文档目录 /opt/lampp/htdocs/ 。当有人访问您的网站的根地址显示的任何网页和相关的文件都应该放在这里。因为这个目录已经有一些文件,所以我们能够看到XAMPP的欢迎页面。让我们在快速列目录表,看看文件夹中有什么(键入 ls/opt/lampp/htdocs):
drwxr-xr-x 2 root root 4096 Jan 24 2003 apache-rwxr-xr-x 1 nobody root 163 Oct 31 2003 index.html
drwxr-xr-x 2 nobody root 4096 Sep 12 21:54 webalizer
drwxr-xr-x 5 root root 4096 Jun 15 06:24 xampp
【原文】
As you can see, there is material here already. Let's make our own directory called hello_world (mkdir hello_world) in which to store our scripts. From now on, you can access all materials in the hello_world directory by typing localhost/hello_world. Now, save your two scripts to that directory. You are done!
Testing the application
To test the application, go to your browser of choice, and enter localhost/hello_world. You should see the following:
Figure 4. Hello World!
【译文】
正如你所看到的,这里已经有文件了。我们为测试脚本建一个独立的目录hello_world(mkdir hello_world)。现在,您可以通过输入 localhost/hello_world 来访问 /hello_world 目录中的所有文件。现在,将两个脚本保存到这个目录。
测试应用程序
要测试应用程序,打开浏览器,输入 localhost/hello_world 。您应该看到以下内容:
图4。Hello World!
【原文】
Congratulations! You have set up an application on XAMPP.
【译文】
祝贺!您已经在XAMPP中写完了一个应用程序。
【原文】
The purpose of XAMPP is to be a development environment. It is configured to give the programmer free reign over the toolset with no restrictions. As a result of that freedom of movement, the default XAMPP installation is extremely insecure. For example, there are almost no logins required for anything.
For versions of XAMPP 0.9.5 and later, you can beef up security by running the command:
/opt/lampp/lampp security
You will be prompted with various statements that note the insecurities that exist, and you will be given a choice whether to fix that insecurity. While this makes your XAMPP installation more secure, you should still avoid running XAMPP on a production server. Listing 3 illustrates the security prompts:
Listing 3. Security issues prompted in XAMPP
XAMPP: Quick security check... XAMPP: Your XAMPP pages are NOT secured by a password. XAMPP: Do you want to set a password? [yes] yes XAMPP: Password: XAMPP: Password (again): XAMPP: Password protection active. Please use 'lampp' as user name! XAMPP: MySQL is accessable via network. XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes XAMPP: Turned off. XAMPP: Stopping MySQL... XAMPP: Starting MySQL... XAMPP: The MySQL/phpMyAdmin user pma has no password set!!! XAMPP: Do you want to set a password? [yes] yes XAMPP: Password: XAMPP: Password (again): XAMPP: Setting new MySQL pma password. XAMPP: Setting phpMyAdmin's pma password to the new one. XAMPP: MySQL has no root passwort set!!! XAMPP: Do you want to set a password? [yes] yes XAMPP: Write the password somewhere down to make sure you won't forget it!!! XAMPP: Password: XAMPP: Password (again): XAMPP: Setting new MySQL root password. XAMPP: Setting phpMyAdmin's root password to the new one. XAMPP: The FTP password is still set to 'lampp'. XAMPP: Do you want to change the password? [yes] yes XAMPP: Password: XAMPP: Password (again): XAMPP: Reload ProFTPD... XAMPP: Done. |
【译文】
XAMPP的目的是建立一个开发环境。它定义为给程序员一个没有任何限制的开发环境。由于这种追求自由的原因,默认的XAMPP安装是及其不安全的。举例来说,几乎任何登录都不需要验证(密码)。
对于XAMPP 0.9.5版本和更高版本,可以通过运行这个命令来强化安全:
/opt/lampp/lampp security
这个命令将展示你的服务器状态并提示不安全的地方,并给出是否修复这个非安全选项的选项。尽管这使得XAMPP更安全,但你也应该避免在商业服务器上运行XAMPP。
3、示例安全提示:
3、XAMPP提示的安全问题
【原文】
So, your XAMPP installation has been up and running for a couple of weeks and you've amassed quite a sizeable set of data that you don't want to be at risk from a hard drive crash. What do you do about backups?
This is quite simple with XAMPP. Change your current working directory to /opt/lampp (cd /opt/lampp) and type in the following command:
./lampp backup
You will want to add on your MySQL root password if you have it set to the end of that command. You should then see the following:
Backing up databases...
Backing up configuration, log and htdocs files...Calculating checksums...
Building final backup file...
Backup finished.
Take care of /opt/lampp/backup/xampp-backup-15-09-04.sh
【译文】
如果你的XAMPP已安装并运行了几个星期,你已经有了不少的数据,你不希望因为硬盘的损坏而丢失数据。你怎么备份呢?
这在XAMPP中很简单。改变当前工作目录到 /opt/xampp(cd /opt/lampp)并输入如下命令:
./lampp backup
您将需要在该命令的末尾输入你的MySQL root密码如果您已经设置。您应该看到以下内容:
Backing up databases...Backing up configuration, log and htdocs files...
Calculating checksums...
Building final backup file...
Backup finished.
保存好 /opt/lampp/backup/xampp-backup-15-09-04.sh 这个备份文件
【原文】
To restore your backup, run the following command as root:
sh backupfilename
You will see the following if all goes well:
Checking integrity of files...
Restoring configuration, log and htdocs files...Checking versions...
Installed: XAMPP 1.4.7
Backup from: XAMPP 1.4.7
Restoring MySQL databases...
Restoring MySQL user databases...
Backup complete. Have fun!
【译文】
要恢复备份,以root身份运行以下命令:
sh backupfilename
如果一切顺利你应该看到类似以下内容:
Checking integrity of files...Restoring configuration, log and htdocs files...
Checking versions...
Installed: XAMPP 1.4.7
Backup from: XAMPP 1.4.7
Restoring MySQL databases...
Restoring MySQL user databases...
Backup complete. Have fun!
【原文】
Restart XAMPP (cd /opt/lampp, ./lampp restart), and your restored data should be readily available.
【译文】
重新启动XAMPP(cd /opt/lampp, ./lampp restart),这样你恢复的数据应该能用了。
【原文】
Ready to rAMPP up?
Whether integrated solution stacks ever fully compete with J2EE solutions remains to be seen, but the recent release of PHP 5.0 (its major addition includes full object orientation) coupled with the rapid growth of the MySQL database indicates that integrated AMPP solution stacks are becoming more popular among developers. This means that open source middleware stacks like XAMPP might have some elbow room at the lower end of the software market.
【译文】
rAMPP准备好了吗?
尽管整合的软件包没有对J2EE解决方案造成充分的竞争,但最近的PHP 5.0发布(它主要增加的是全面的面向对象),再加上MySQL数据库的快速增长,这表明整合的软件包在开发人员中正变得越来越受欢迎。这意味着,像XAMPP这样的开源集成软件包在低端软件市场上有一定的空间。
【原文】
Resources
Download XAMPP at Apache Friends, a nonprofit organization that promotes the Apache Web server and has the latest XAMPP information and releases.
Find extensive PHP resources on developerWorks.
The Road to better programming series (developerWorks) is an excellent hands-on series for sharpening your Perl perspective. For more on Perl, search the developerWorks site.
These two articles, Connecting PHP Applications to Apache Derby (developerWorks, September 2004) and Develop Perl applications with Apache Derby (developerWorks, October 2004) are a must-read for PHP and Perl application developers.
The phpMyAdmin project contains a lot of great information as well as downloads of the awesome Web-based MySQL administration tool.
Practical Unix & Internet Security (O'Reilly & Associates, 1996) is an excellent reference on all aspects of system security from user management to drafting a security policy.
【译文】介绍能翻译过来但是这些文章和资源我是无能为力的,看不懂E文的就不要看了
资源
在Apache Friends网站下载的XAMPP,一个旨在促进Apache Web服务器非营利性组织网站,有最新的更新信息和XAMPP。
你可以在developerWorks上找到丰富的PHP的资源。
The Road to better programming series (developerWorks)是一个极好的Perl提升教程手把手教学系列。更多有关Perl的内容,请到搜索developerWorks站点。
Connecting PHP Applications to Apache Derby (developerWorks, September 2004) 和 Develop Perl applications with Apache Derby (developerWorks, October 2004)两篇文章是PHP和Perl的应用程序开发者必读文章。
phpMyAdmin project 网站上有很多的关于phpMyAdmin 的信息以及相关下载。
Practical Unix & Internet Security (O'Reilly & Associates, 1996)是优秀的从用户管理到安全政策的全面安全指导手册。
版权声明:
作者:xinyu2ru
链接:https://www.rxx0.com/software/translation-install-xampp-for-easy-integrated-development.html
来源:RUBLOG-分享我的生活
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论