1.安装Ubuntu上安装LAMP

apt-get install lamp-server^

2.安装过程中设置MySql密码

3.测试 创建index.php

var/www/html/index.php

index.php的内容为

<?php phpinfo(); ?>

重启apache,

service apache2 restart

在浏览器中输入

http://localhost/index.php

或者localhost改为IP地址

5配置MYSql

cat /etc/hosts | grep localhost

显示:127.0.0.1  localhost

cat /etc/mysql/my.cnf | grep bind-address

显示:bind-address = 127.0.0.1

6.  安装phpMyAdmin

apt-get install phpmyadmin

7. 配置Apache服务器

cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf

然后重启apache

访问http://localhost/phpmyadmin页面

如果出现如下错误:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

解决方法:

/etc/mysql/my.cnf

[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

在Ubuntu上安装LAMP服务器的更多相关文章

  1. 【转载】如何在Ubuntu上安装LAMP服务器系统?

    转载自:http://os.51cto.com/art/201307/405333.htm [2013年7月25日 51CTO外电头条]为何应该在Ubuntu上安装LAMP服务器?从事Web开发工作时 ...

  2. [转载]如何在Ubuntu上安装LAMP服务器系统

    [2013年7月25日 51CTO外电头条]为何应该在Ubuntu上安装LAMP服务器?从事Web开发工作时,我更偏爱在不受干扰的情况下,在我那台计算机上的开发环境下进行开发.我宁愿所犯的错误大部分是 ...

  3. 如何在Ubuntu上安装LAMP服务器系统?

    在Ubuntu上安装LAMP Ubuntu的开发人员让人们很容易安装和配置LAMP软件包,只要借助一个终端命令.所以,打开终端窗口,让我们开始入手吧. sudo apt-get install lam ...

  4. Ubuntu上安装Samba服务器实现家庭共享

    如何在Ubuntu上安装Samba服务器 大多数Linux发行版都包含Samba. 要在Ubuntu上安装Samba,只需运行: sudo apt install samba 要检查您的Samba版本 ...

  5. Ubuntu上安装Minecraft服务器

    Minecraft由于其独特的魅力吸引了很多玩家.不过游戏的乐趣只有在和朋友一起玩的时候才最有意思,所以很早以前我就想建设自己的服务器.但由于专业知识欠缺,没有实现. 最近接触了Linux服务器,所以 ...

  6. 在Ubuntu上安装LAMP(Apache、Mysql、Php)

    原文地址:https://howtoubuntu.org/how-to-install-lamp-on-ubuntu Ubuntu有很多工具可以帮助我们一键配置LAMP环境,比如tasksel,但这些 ...

  7. ubuntu上安装lamp环境命令清单

    #install configuration manager sudo apt-get install tasksel #install basic lamp stack sudo tasksel i ...

  8. 「LAMP」在ubuntu及其衍生版上 安装LAMP

    在Ubuntu上安装LAMP 此种方法在Linux Mint 13/14/15/16/17.Ubuntu 12.10(Quantal Quetzal)和Ubuntu 13.04 Raring Ring ...

  9. Ubuntu 18.04 Server上安装LAMP

    由于要进行渗透测试,所以这两天就在搭LAMP的环境(过程及其痛苦) 这里分享一些我遇到的问题. 首先介绍一下我的使用环境  VM虚拟机,ubuntu 与主机NAT连接 由于之前一直使用的是kali(默 ...

随机推荐

  1. Your build settings specify a provisioning profile with the UUID, no provisioning profile

    在Archive项目时,出现了“Your build settings specify a provisioning profile with the UUID “”, however, no suc ...

  2. C#通过反射进行枚举描述相关操作

    C#可以通过反射,来获取枚举的描述信息或通过描述信息获取到指定类型的枚举 /// <summary> /// 获取枚举描述 /// </summary> /// <par ...

  3. React Native 的ES5 ES6写法对照表

    模块 引用 在ES5里,如果使用CommonJS标准,引入React包基本通过require进行,代码类似这样: //ES5 var React = require("react" ...

  4. [GodLove]Wine93 Tarining Round #10

    比赛链接: http://www.bnuoj.com/v3/contest_show.php?cid=4159 题目来源: lrj训练指南---几何算法 Flag ID Title   A Board ...

  5. Python-day3作业-haproxy配置文件管理脚本

    #!/usr/bin/env python import os,sys,time,re,prettytable,json from collections import defaultdict,Ord ...

  6. Model--汇总

    NSFileManager.NSURL.NSFileHandle.NSData.NSXMLParser.NSUserDefaults.NSKeyedArchiver.NSKeyedUnarchiver ...

  7. Gradle简介和安装

    一.Gradle介绍 Gradle是一个基于JVM的构建工具,它提供了:像Ant一样,通用灵活的构建工具,可以切换的,基于约定的构建框架,强大的多工程构建支持,基于Apache Ivy的强大的依赖管理 ...

  8. eclipse常用插件

    1. eclipse安装主题插件:http://www.eclipsecolorthemes.org/ 2. eclipse terminal插件:在eclipse中集成终端,使用非常方便,不用单独打 ...

  9. C++预处理详解

    本文在参考ISO/IEC 14882:2003和cppreference.com的C++ Preprocessor的基础上,对C++预处理做一个全面的总结讲解.如果没有特殊说明,所列内容均依据C++9 ...

  10. How to build the theory on a specific system - may be just a brain storm[clue found]

    Motivation An observation and thoughts on reading Tel G.. Introduction to Distributed Algorithm(seco ...