Small Forum Linux Server build Apache PHP mysql Environment

Source: Internet
Author: User
Tags apache php install php php mysql phpmyadmin

After the construction of the. NET in the front of the environment after the need to build database-related environments, first I choose the data is MySQL, in the choice of MySQL at the same time consider I use Tomcat to control the database or something else, Here I choose is the way of phpMyAdmin is very convenient, if using Tomcat so my home and the company's computer to install the software in operation, but with phpMyAdmin easy to use a browser to enter the account password on the line

Next start configuring

  

Install Apache2:

sudo apt-get install apache2

Install PHP:

sudo apt-get install PHP

(Note here PHP it defaults to php7,ubuntu16.0 without PHP5 version installed)

Let Apache2 support PHP:

sudo apt-get install libapache2-mod-php

Install MySQL and set a password

sudo apt-get install Mysql-server

Let Apache support MySQL:

sudo apt-get install Libapache2-mod-auth-mysql

sudo apt-get install Php-mysql

To install the MySQL visual client phpMyAdmin:

sudo apt-get install phpMyAdmin

Create a sync link

sudo ln-s/usr/share/phpmyadmin//var/www/html

"This next step can be skipped."

Modify the permissions of the Portal folder, changed to 777 is to facilitate the uploading of files, according to their own needs to change to the appropriate permissions

sudo chmod 777 HTML

Then reboot
sudo service apache2 Restart

Modify Apache Port number

    1. sudo vi/etc/apache2/ports.conf
    1. Namevirtualhost *:8080
    2. Listen 8080

Step2: Just modify the VirtualHost port

    1. sudo vi/etc/apache2/sites-available/default.conf
    1. <virtualhost *:8080>

Step3: Restart Apache2

      1. sudo service apache2 stop
      2. sudo service apache2 start

The port number must be modified after the configuration is complete because the same port number installed in front of the nginx will conflict "modify port number when modifying two files on top of the introduction"

Browser input ip:8080 After installation completes Apache installation if Apache interface is present

Enter the account root password to install MySQL password when re-entering the address [ip:8080/phpmyadmin] Login screen

This is where the environment is built.

Small Forum Linux Server build Apache PHP mysql Environment

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.