码迷,mamicode.com
首页 > 数据库 > 详细

ubuntu——LAMP(Linux -3.13.0-32-generic ,Apache-2.4.18,MySQL-5.6.27,PHP -7.0.5)(二)

时间:2016-04-02 10:54:16      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:ubuntu   lamp   apache2.4   mysql5.6   php7   

The latest major release of PHP version 7.0 has been released with lots of speed optimizations and security. So you should try this version for your development. This tutorial will help you to install PHP 7.0, Apache >= 2.4.17, & MySQL 5.6 on Ubuntu 15.10, 15.04 & 14.04 LTS release.

技术分享

Install PHP 7

First install python-software-properties package on your system which provides add-apt-repository command then use the following set of commands to add PPA for PHP 7 in your Ubuntu system and install it.

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install -y php7.0

Install Apache 2.4

After successfully installation, lets begin installing Apache 2.4. Use the following set of commands to install Apache2 on your Ubuntu system available in default apt repositories.

$ sudo add-apt-repository ppa:ondrej/apache2
$ sudo apt-get update
$ sudo apt-get install apache2

Install MySQL 5.6

Use the following commands to install or upgrade MySQL 5.6 on your Ubuntu systems. At the last update of this tutorial MySQL 5.6.27 is latest available MySQL version in series of MySQL 5.6.X.

$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6
$ sudo apt-get update
$ sudo apt-get install mysql-server-5.6

Install Other Requirements

You may also need to install modules like PHP7-MySQL, libapache2-mod-php7.0 etc based on your application requirements. Use the following command to find our available php 7 modules.

$ sudo apt-cache search php7-*

Above command will list all available PHP7 modules for installation, Let’s begin installation of modules.

$ sudo apt-get install libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cli 
 php7.0-common   php7.0-mysql php7.0-fpm

Verify Setup

Finally verify installation of PHP7 with Apache2. Let’s create a file info.php on website document root using following content.

<?php
phpinfo();
?>

Now browse this file in web browser. It will so all the details about version’s and installation.

    技术分享


本文出自 “Mr_Computer” 博客,请务必保留此出处http://caochun.blog.51cto.com/4497308/1759480

ubuntu——LAMP(Linux -3.13.0-32-generic ,Apache-2.4.18,MySQL-5.6.27,PHP -7.0.5)(二)

标签:ubuntu   lamp   apache2.4   mysql5.6   php7   

原文地址:http://caochun.blog.51cto.com/4497308/1759480

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!