Home Backend Development PHP Tutorial 高速搭建php运行环境之WampServer

高速搭建php运行环境之WampServer

Jun 13, 2016 am 10:31 AM
apache discuz mysql php wamp

快速搭建php运行环境之WampServer

据我所知很多同学都想要试着学习一下PHP,无奈要在Windows下安装搭建好一个PHP环境来学习对于菜鸟同学来说繁琐程度足以让一半以上的人放弃,毕竟 Apache+PHP+MySQL 这3个程序配置起来比较麻烦,对于新手来说,要弄清楚那些配置还真是云里雾里。所以傻瓜式整合型的WAMP程序(Windows+Apache+PHP+MySQL)就出来了,这类软件可以让懒人和新手朋友们免除安装配置多款服务器软件的麻烦,让同学们更快地投入到PHP语言本身的开发与学习当中去。

WAMP类的软件有许多,并且基本上都是免费的,比如 XAMPP 等,而今天在这里我们要向大家介绍的是——WAMP Server,没错!它就是叫做WAMP!

LAMP是一个缩写,它指一组通常一起使用来运行动态网站或者服务器的著名免费开源的软件,其中包括:Linux操作系统;Apache网页服务器;MySQL数据库管理系统(或者数据库服务器);PHP 和有时 Perl 或 Python脚本语言。取各自名字的首个字母就组成LAMP这个词了。同样,在Windows操作系统下使用这些软件组合,就叫做WAMP了。

????? 虽然这些开放源代码程序本身并不是专门设计成同另外几个程序一起工作的,但由于它们都是用于构建Web服务器的影响较大的开源软件,这就导致了这些组件经常配合在一起使用。在过去的几年里,这些组件的兼容性不断完善,在一起的应用情形变得更加普遍。并且它们为了改善不同组件之间的协作,已经创建了某些扩展功能。目前,几乎在所有的Linux发布版中都默认包含了这些产品。Linux操作系统、Apache服务器、MySQL数据库和Perl、PHP或者 Python语言,这些产品共同组成了一个强大的Web应用程序平台。

最新的WAMP Server包括:Apache 2.2.11 / MySQL 5.1.33 / PHP 5.2.9-2,它的配置超容易,激动了吧?好了,开始吧!!

双击下载的文件(下载地址下有),出现安装界面,告诉你要卸载旧版本的WAMP再安装新版

?

来自17ftp.com

?

选择“是”开始安装,然后一路Next吧,然后选择安装目录,建议使用默认的地址

?

来自17ftp.com

?

选择安装目录选好之后点next继续,接下来就是快捷图标,域名等等,这个我就不多说了,点next就行了,安装到最后会出现选择explorer的提示,定位到%windir%explorer.exe即可

?

来自17ftp.com

?

安装完毕会出现图标

?

来自17ftp.com

?

运行之,这时托盘会出现一个带点红色的白色图标,不过默认是鸟语,不要担心,这个是多国语言。右击托盘图标-language-Chinese即可改成中文版

?

来自17ftp.com

?

这时就会切换成简体中文,单击那个图标,启动所有服务

?

来自17ftp.com

?

这时图标就会变成白色。

附:如果Apache无法启动,请先退出占用80端口的软件,启动workstation和DNS Client服务,网络协议安装Microsoft网络客户端,如果还不能启动,就到你的连接名-属性-网络-Internet协议-属性-高级-WINS-导入LMHOSTS—你的apache的httpd.exe地址(一般为wamp\bin\apache\bin\httpd.exe)就可以了

(根据X-Force的经验,迅雷、电驴、QQ音乐等程序均会占用80端口哟)

再选择PHPmyAdmin(一款网页版的用于管理MySQL数据库的程序)

?

来自17ftp.com

?

点击添加新用户,我们增加一个数据库的用户

?

来自17ftp.com

?

按照我的设置,用户名和密码随意,我的就是123 123。这时我们就可以在本机安装一些常用的PHP程序来玩玩了,例如异次元正在使用的WordPress,又或者一个Discuz论坛。现在我们以discuz为榜样,试验一下,Discuz安装前还要小小的设置一下,Php-php设置-勾选short open tag

?

来自17ftp.com

?

下载Discuz,解压,将discuz的upload文件夹里的所有文件复制到wamp的www目录下,在浏览器访问 http://localhost/upload/install/index.php,这时就会出现discuz的安装界面了,点击我同意-检测通过,出现:

?

来自17ftp.com

?

数据库用户名和密码按照上面的设置,下面的是Discuz管理员用户名,密码随便,点击“填写完毕,进行下一步”。就会出现安装完成的界面,好了!我们成功地在Windows本机上建立起一个自己的论坛了,总体的步骤都是非常简单的。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1252
24
MySQL: The Database, phpMyAdmin: The Management Interface MySQL: The Database, phpMyAdmin: The Management Interface Apr 29, 2025 am 12:44 AM

MySQL and phpMyAdmin can be effectively managed through the following steps: 1. Create and delete database: Just click in phpMyAdmin to complete. 2. Manage tables: You can create tables, modify structures, and add indexes. 3. Data operation: Supports inserting, updating, deleting data and executing SQL queries. 4. Import and export data: Supports SQL, CSV, XML and other formats. 5. Optimization and monitoring: Use the OPTIMIZETABLE command to optimize tables and use query analyzers and monitoring tools to solve performance problems.

Composer: Aiding PHP Development Through AI Composer: Aiding PHP Development Through AI Apr 29, 2025 am 12:27 AM

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

Steps to add and delete fields to MySQL tables Steps to add and delete fields to MySQL tables Apr 29, 2025 pm 04:15 PM

In MySQL, add fields using ALTERTABLEtable_nameADDCOLUMNnew_columnVARCHAR(255)AFTERexisting_column, delete fields using ALTERTABLEtable_nameDROPCOLUMNcolumn_to_drop. When adding fields, you need to specify a location to optimize query performance and data structure; before deleting fields, you need to confirm that the operation is irreversible; modifying table structure using online DDL, backup data, test environment, and low-load time periods is performance optimization and best practice.

What is the significance of the session_start() function? What is the significance of the session_start() function? May 03, 2025 am 12:18 AM

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

How to uninstall MySQL and clean residual files How to uninstall MySQL and clean residual files Apr 29, 2025 pm 04:03 PM

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.

An efficient way to batch insert data in MySQL An efficient way to batch insert data in MySQL Apr 29, 2025 pm 04:18 PM

Efficient methods for batch inserting data in MySQL include: 1. Using INSERTINTO...VALUES syntax, 2. Using LOADDATAINFILE command, 3. Using transaction processing, 4. Adjust batch size, 5. Disable indexing, 6. Using INSERTIGNORE or INSERT...ONDUPLICATEKEYUPDATE, these methods can significantly improve database operation efficiency.

How to use MySQL functions for data processing and calculation How to use MySQL functions for data processing and calculation Apr 29, 2025 pm 04:21 PM

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

How to configure the character set and collation rules of MySQL How to configure the character set and collation rules of MySQL Apr 29, 2025 pm 04:06 PM

Methods for configuring character sets and collations in MySQL include: 1. Setting the character sets and collations at the server level: SETNAMES'utf8'; SETCHARACTERSETutf8; SETCOLLATION_CONNECTION='utf8_general_ci'; 2. Create a database that uses specific character sets and collations: CREATEDATABASEexample_dbCHARACTERSETutf8COLLATEutf8_general_ci; 3. Specify character sets and collations when creating a table: CREATETABLEexample_table(idINT

See all articles