`
天梯梦
  • 浏览: 13706921 次
  • 性别: Icon_minigender_2
  • 来自: 洛杉矶
社区版块
存档分类
最新评论

Ubuntu 16.04 安装 LAMP Install Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04

 
阅读更多
LAMP-LIGHTING
Verified and Tested 03/1/16

 

Introduction

In this How-To, we install LAMP on an Ubuntu 16.04 Server. LAMP is a simple software bundle made of 4 components, Linux, Apache, MySQL, and PHP. Linux the core of the platform, in this case, we are using Ubuntu 16.04. Apache is the web server, majority of the web servers in the world are running Apache MySQL is a database management system, developed by Oracle. PHP is an extremely popular programming language that is widely used in web development. Altogether this forms LAMP or LAMP stack.

 

Prerequisites

A server with Ubuntu 16.04  installed. Get a reliable server from Atlantic.Net if you do not have one.

 

Installing LAMP on Ubuntu 16.04

Before we begin the installation, it is important that your system is up to date, you can do so with the following command:

apt update

 

Once updating, we can get to the first step of making a LAMP stack by installing Apache.

 

Installing Apache on Ubuntu 16.04

Install Apache by running the following command:

apt install apache2

 

Hit enter to when it asks “Do you want to continue?” during the install.

After the install, you can check to see if Apache is running by running the command:

service apache2 status

 

Also, you can verify if all is working by opening your browser and going to http://youripaddress

If you do not know your IP address, you can run the following command:

ifconfig

 

anet-linux-apache-mysql-and-php-lamp-on-ubuntu-14-04-01

An example of ifconfig showing the IP address 172.20.6.154

In our case, we would put http://172.20.6.154 in your browser’s address bar and get the following page:

anet-linux-apache-mysql-and-php-lamp-on-ubuntu-14-04-02

The default page for Apache on Ubuntu 14.04

 

Installing MySQL on Ubuntu 16.04

Install MySQL with the following command:

sudo apt install mysql-server php7.0-mysql

 

Hit enter to when it asks “Do you want to continue?” during the install.

During the install, it will prompt you to enter a MySQL root password. Set any password that you would like. It should be a strong password.

anet-linux-apache-mysql-and-php-lamp-on-ubuntu-14-04-03

Enter a strong password of your choice

After you enter your MySQL root password, you will need to re-enter it.

anet-linux-apache-mysql-and-php-lamp-on-ubuntu-14-04-04

Re-enter the password you set before

Continue with the MySQL Security installation with the following command:

mysql_secure_installation

 

Note: You will be prompted with a series of questions. Just type N for the change root password and Y for yes on all of the rest, see the screen shot below:

anet-linux-apache-mysql-and-php-lamp-on-ubuntu-14-04-05

An example of what mysql_secure_installation looks like

Verify that MySQL is running with the following command:

service mysql status

 

Installing PHP on Ubuntu 16.04

Install PHP with the following command:

apt install php

 

Hit enter to when it asks “Do you want to continue?” during the install.

Create a test PHP file called info.php in /var/www/html/. In this how-to, we will be using the text editor nano with the following command:

nano /var/www/html/info.php

 

Insert the following code in the text editor then save and exit:

<?php
    phpinfo();
?>

 

Since we made changes, we need to restart Apache so that the changes take effect:

service apache2 restart

 

Test your page in your browser with the following hyperlink changed with your IP address:

http://localhost/info.php

install-linux-anet-apache-mysql-php-lamp-stack-on-ubuntu-16-04-06

The result of the php.info file you made.

Congratulations! You have just installed LAMP on your Ubuntu 16.04 Server. Thank you for following this How-To on installing LAMP, please check back for more updates.

from: https://www.atlantic.net/community/howto/install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04/

 

 

转自/原文:Ubuntu 16.04 安装 LAMP Install Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04

 

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    ubuntu16.04 mysql5.7 离线包及依赖

    内网环境安装mysql5.7数据库所需deb安装包,libaio1_0.3.110-2_amd64.deb ,libmecab2_0.996-1.2ubuntu1_amd64.deb ,libmysqlclient20_5.7.25-1ubuntu16.04_amd64.deb,libmysqlclient-dev_5.7.25-1ubuntu16.04_amd...

    Ubuntu16.04安装VMtools

    ### Ubuntu 16.04 安装 VMware Tools 的详细步骤 #### 一、前言 在使用虚拟化技术时,提高宿主机与虚拟机之间的兼容性和交互性是非常重要的。VMware Tools 是一种增强工具包,它能显著提升 VMware 虚拟机的性能,...

    ubuntu 16.04 安装 eclipse教程和总结

    ### Ubuntu 16.04 下 Eclipse 的安装与配置教程 #### 一、前言 随着软件开发领域的不断发展,集成开发环境(IDE)已经成为开发者不可或缺的工具之一。Eclipse 是一款非常受欢迎且功能强大的开源 IDE,它支持多种...

    ubuntu16.04安装mysql5.7脚本

    在Ubuntu 16.04上安装MySQL 5.7是一项常见的系统管理任务,尤其对于开发者和运维人员来说。MySQL 5.7是该数据库管理系统的一个稳定版本,提供了许多性能改进和新特性。以下是关于使用脚本在Ubuntu 16.04上自动安装...

    Ubuntu 16.04 LTS 安装JDK8 MYSQL5 和Tomcat8

    在Ubuntu 16.04 LTS操作系统中,安装Java Development Kit (JDK) 8、MySQL 5和Apache Tomcat 8是构建服务器环境的基础步骤,特别是对于开发和运行Java应用程序来说。以下将详细介绍这些组件的安装过程。 首先,确保...

    U盘制作ubuntu16.04系统,下载,安装整理

    - 选择“Try Ubuntu without installing”(试用Ubuntu而不安装)或直接选择“Install Ubuntu 16.04 LTS”(安装Ubuntu 16.04 LTS)。 5. **安装Ubuntu 16.04** - 如果选择试用,可以体验系统后再决定是否安装。...

    Ubuntu16.04搭建配置LAMP环境的步骤1

    根据当前的PHP版本(例如,Ubuntu 16.04默认是PHP7.0),运行`sudo apt-get install libapache2-mod-php7.0 php7.0`来安装PHP和相应的Apache模块。安装后,再次重启Apache2。 5. **测试PHP**: 创建一个名为`test...

    MySQL8 Ubuntu16.04 64位 懒人安装包

    MySQL8在Ubuntu 16.04 64位系统上的安装通常涉及到多个步骤,包括获取软件源,更新系统库,安装依赖项,配置服务,以及初始化数据库。这个"MySQL8 Ubuntu16.04 64位 懒人安装包"提供了便捷的方式,通过一个名为`...

    Ubuntu16.04离线安装软件-离线安装包mysql5.7.33

    在Ubuntu 16.04操作系统中,有时由于网络限制,我们无法直接使用`apt install`命令在线安装MySQL Server 5.7.33。此时,我们需要采用离线安装的方法来解决这个问题。以下是一个详细的步骤指南,涵盖了如何使用提供的...

    Ubuntu 16.04 LTS下安装Apache2+PHP7.0+MySQL+phpMyAdmin图文详解.doc

    详细的讲解了Ubuntu 16.04 LTS下安装Apache2+PHP7.0+MySQL+phpMyAdmin图文详解

    ubuntu16.04安装oracle操作文档

    ### Ubuntu 16.04 安装 Oracle 操作指南 #### 一、环境准备 在开始安装 Oracle 数据库之前,需要确保您的 Ubuntu 16.04 系统已经安装了必要的 Java 开发工具包 (JDK)。本文档将详细介绍如何在 Ubuntu 16.04 上安装...

    Ubuntu 16.04安装Calibre电子书管理软件.docx

    Ubuntu 16.04 安装 Calibre 电子书管理软件 Calibre 是一款功能强大、开源的电子书管理软件,为用户提供了一站式的电子书解决计划。用户可以利用 Calibre 对电子书进行格式转换、归类收拾、组织成属于自己的电子...

    mysql-Ubuntu16.04安装及配置

    ubuntu 16.04下mysql的安装及配置文档,很工整,齐全

    Ubuntu16.04LTS正版镜像-Ubuntu16.04系统ios-Linux官网资源

    在安装Ubuntu 16.04时,用户可以选择不同的安装类型,如最小化安装、桌面版安装或服务器版安装。此外,Ubuntu 16.04还支持多种语言,适应全球用户的使用需求。 总的来说,Ubuntu 16.04 LTS是一款强大、稳定的Linux...

    ubuntu16.04中安装使用docker

    ubuntu16.04中安装使用dockerubuntu16.04中安装使用docker

    钉钉 for ubuntu16.04

    【钉钉 for Ubuntu 16.04】是一款专为Ubuntu 16.04操作系统设计的钉钉桌面客户端,让Linux用户也能享受便捷的企业级通讯体验。在Ubuntu上安装这款应用,通常需要通过Debian包(.deb)格式进行。下面我们将详细探讨...

    Ubuntu16.04安装Redis3.2.8

    在本教程中,我们将深入探讨如何在Ubuntu 16.04上安装Redis 3.2.8,这是一个流行的开源键值存储系统,常用于缓存、消息队列和其他高性能数据处理场景。以下是你需要知道的关键步骤和相关知识点: 1. **了解Redis**...

    Ubuntu 16.04 安装 ROS

    在Ubuntu 16.04上安装ROS(Robot Operating System)是机器人开发中的一个重要步骤。ROS是一个广泛使用的机器人软件框架,其提供了一系列的软件库和工具,使得开发复杂的机器人应用程序变得可能。ROS虽然被称为...

    ubuntu16.04安装包,百度云下载链接与密码

    - 运行U盘启动制作工具,选择合适的选项来创建可引导的Ubuntu安装介质; - 选择之前下载好的Ubuntu 16.04 LTS ISO文件并开始制作过程; - 等待制作完成。 3. **设置BIOS/UEFI启动项**: - 重启计算机并进入BIOS...

    ubuntu16.04安装opencv教程

    ubuntu16.04安装opencv教程,简单快捷,讲解详细明了。

Global site tag (gtag.js) - Google Analytics