Debian 8 Jessie install LAMP server tutorial

Source: Internet
Author: User
Tags apache php apcu

Debian 8 Jessie install LAMP server tutorial

LAMP is short for Linux, Apache, MySQL (or MariaDB), and PHP. It is a classic web server in Linux. This tutorial will show you how to install Apache2 web service, PHP 5 (mod_php), and MariaDB on the Debian Jessie (8) server. Let's talk about the MariaDB database, it is developed from Mysql. Since sun was acquired by Oracle, it is fully compatible with mysql because it is afraid that oracle is not good for the development of mysql open source database ). The latest version of MariaDB is better than MySQL database services in terms of performance. It is very suitable for the establishment of WordPress, Joomla, Drupal, and other program-driven websites.

Description: In this tutorial, Debian 8 Jessie, server1.example.com host name and 192.168.1.100 IP address are used. Modify the host according to your actual situation. The following operations are performed under the root account, switch to the root account.

1. First install the MariaDB database:


Apt-get-y install mariadb-server mariadb-client

During installation, you will be asked to set the Database root Account password:


New password for the MariaDB "root" user: Repeat password for the MariaDB "root" user:

2. Install the Apache 2.4 Server:


Apt-get-y install apache2

After the installation is complete, open the browser to view: http: // 192.168.1.100

The installation is successful. Let's explain the following:
• Default apache root directory/var/www In Debian system
• Configuration file/etc/apache2/apache2.conf
• Other configuration files are stored in the/etc/apache2 directory, such as the apache module file/etc/apache2/mod-enabled, VM file/etc/apache2/sites-enabled and/etc/apache2/conf-enabled

3. Install the PHP 5.6 and apache php modules

Apt-get-y install php5 libapache2-mod-php5

After the installation is complete, restart apache to take effect:

Service apache2 restart

4. test whether the PHP file is normally accessed and create a probe file:

Nano/var/www/html/info. php

Content:

 

Visit the file http: // 192.168.1.100/info. php in the browser.

Apache_phpinfo1

5. Obtain PHP support from MySQL or MariaDB.

Search for the module:

Apt-cache search php5

Installation module, description, the old mysql installation php5-mysql package to get support, but here we install mariaDB, it is best to install php5-mysqlnd, but will make the old mysql error, the good idea is to install other modules:


Apt-get-y install php5-mysqlnd php5-curl php5-gd php5-intl php5-imagick php5-imap php5-mcrypt php5-memcache php5-pspell php5-recode php5-snmp

Restart apache to activate the installation module.


Service apache2 restart

6. Install APCu PHP Cache to improve PHP speed.

APCu is a free PHP operation code to cache and optimize PHP intermediate code. We strongly recommend that you install PHP to speed up your PHP page.


Apt-get install php5-apcu

Restart apache to make the installation software take effect:


Service apache2 restart

7. Install phpMyAdmin to manage databases


Apt-get-y install phpmyadmin

Some configurations will be asked during installation:

Web server to reconfigure automatically: <-enter apache2 Configure database for phpmyadmin with dbconfig-common? <-Enter Yes Password of the database's administrative user: <-enter the root account password of the MariaDB database MySQL application Password for phpmyadmin: <-press enter, apt will automatically create a random password for installation. Use http: // 192.168.1.100/phpmyadmin/to access and manage your database!

You may also like the following LAMP-related content:

Install Xcache and Memcached on the LAMP platform to accelerate website operation

Build a LAMP platform environment in CentOS 7

CentOS 6.5 system installation and configuration LAMP (Apache + PHP5 + MySQL) server environment

Configure the LAMP + phpMyAdmin PHP (5.5.9) development environment in Ubuntu 14.04

Install LAMP in Ubuntu 14.10

LAMP combines NFS to build a small blog site

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.