search
Homephp教程php手册ubuntu 11.10下面安装apache+php+mysql+phpadmin搭建web环境

1.下载ubuntu11.10和vmware。 vmware下载安装请看:http://www.myxzy.com/read.php/90.htm 虚拟机安装ubuntu,这里就不说了。安装好ubuntu并启动。 2.设置本地网络连接,ip地址等。演示用nat桥接的方式上网,IP:192.168.128.3。 3.安装apache。打开终端,可

1.下载ubuntu11.10和vmware。
vmware下载安装请看:http://www.myxzy.com/read.php/90.htm
虚拟机安装ubuntu,这里就不说了。安装好ubuntu并启动。

2.设置本地网络连接,ip地址等。演示用nat桥接的方式上网,IP:192.168.128.3。

3.安装apache。打开终端,可以切换到root模式(下面就不说了,直接写命令)
sudo -s                      这是切换到root模式,这里提示要密码,输入密码即可。
sudo apt-get install apache2
这里会自动安装apache,不要关闭终端。等待安装完成。
用firefox打开http://localhost/,提示有“it works”,就是正常工作了。

4.安装php。
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
测试:sudo gedit /var/www/test.php
写入,然后保存,并用firefox打开 http://localhost/test.php,会显示PHP配置信息就是正确安装了php

5.安装mysql数据库
sudo apt-get install mysql-server
等到弹出密码输入,输入密码

给外部连接mysql的权限http://www.myxzy.com/read.php/279.htm


6.安装MYSQL for Apache HTTP Server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
要让PHP与MySql一起工作,编辑
sudo gedit /etc/php5/apache2/php.ini
取消对;extension=mysql.so的注释,然后保存文件,最后重启apache
sudo /etc/init.d/apache2 restart

到了这里php+mysql+apache基本安装已经完成。


7.安装phpmyadmin

sudo apt-get install libapache2-mod-auth-mysql php5-mysqlphpmyadmin

 

cd /etc/apache2/sites-available/

mkdir phpmyadmin

cp /etc/phpmyadmin/apache.conf /etc/apache2/sites-available/phpmyadmin

cd /etc/apache2/sites-enabled/  

sudo ln -s ../sites-available/phpmyadmin

sudo /etc/init.d/apache2 restart

打开localhost/phpmyadmin




Statement
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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool