Ubuntu14.04 Build Php+mysql+apache

Source: Internet
Author: User
Tags phpmyadmin zend

Ubuntu Build (Apache+php+mysql) +phpmyadmin

Ubuntu Build Apache+php+mysql
Basic Support environment. Zend optimizations are not applied for the time being, so there is no Zend Optimizer installation involved. In fact, installing in Ubuntu is much easier than setting up in a Windows system, and it's easier to set up in a terminal.
1. Install Apache service
sudo apt-get install apache2
then follow the prompts to complete the installation of APAHCE. Here you can open
http://127.0.0.1
, you can see it works
2, installation php5
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo/etc/init.d/apache2 Restart
OK, let's check to see if it takes effect.
Gksudo gedit/var/www/testphp.php
into the probe
Save Run
http://127.0.0.1/testphp.php
3. Install MySQL
sudo apt-get install mysql-server
installation Complete Follow the prompts to set the root secret
4, let Apache, PHP support MySQL
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo/etc/init.d/apache2 Restart
at this point apache2+php 5.2.4.2+mysql5.0.51 's environment is complete.
========================================================
Ubuntu Build (apache+php+mysql) +phpmyadmin
since the successful installation of Ubuntu 8.04.1 from the hard disk, has been trying to build a Web server in Ubuntu 8.04.1 Environment, LAMP (liunx+apache+mysql+php) +phpmyadmin of course become my first glare eventually I Ubuntu Wiki found the most detailed and comprehensive way to install the configuration Lamp Web server:
one. Installation
1. Install lamp
Select Edit in the new Rieter Package Manager--use task grouping to mark packages
in the window that opens, tick LAMP SERVER and then OK.
Click the Green Checkmark App button in the main window
it's all right. The next step is waiting ... Wait for the newly installed automatic download to complete.
In the middle there will be a prompt to enter the password of the root user of MySQL
You can also install from the command line in terminal mode:
sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql phpMyAdmin
2. Installing phpMyAdmin
running commands in terminal
sudo apt-get install phpMyAdmin
two. Configuration
1> Apache configuration file path/etc/apache2/apache2.conf
2> php.ini Path/etc/php5/apache2/php5.ini
3> mysql configuration file path/etc/mysql/my.cnf
4> phpmyadmin configuration file path/etc/phpmyadmin/apache.conf
5> Web site root directory/var/www
1. Configure Apache
using commands in the terminal
sudo gedit/etc/apache2/apache2.conf
Add the following lines to the last side of the configuration file:
Add File type support
addtype application/x-httpd-php. php. htm. html
default Character set according to your needs
Adddefaultcharset UTF-8
Server Address
ServerName 127.0.0.1
Add first page file three order can change the previous access priority (of course you can also add other such as default.php)
directoryindex index.htm index.html index.php
2. Configure PHP5
This is nothing to say, according to the individual's own needs
The following is the default time zone
;d efault.timezone= Remove the preceding semicolon and add a PRC. The People's Republic of China (Gmt+8 time zone)
default.timezone= PRC
3. Configure MySQL
sudo gedit/etc/mysql/my.cnf
Here's a place to watch .
because the default is to allow only local access to the database if you have to open it.
bind-address 127.0.0.1 This sentence is limited to local access to MySQL only. If there is a need for other machine access put this phrase in the # comment out
#bind-address 127.0.0.1
4. Configure phpMyAdmin
phpMyAdmin Default is not installed under/var/www, but in/usr/share/phpmyadmin
You can copy the phpMyAdmin over there, or someone on the internet says you can create a link and copy the link to the past (not tried)
then run the command in the terminal
sudo gedit/etc/phpmyadmin/apache.conf
then change the path of the following two sentences to/var/www/phpmyadmin
Alias/phpmyadmin/usr/share/phpmyadmin
instead:
Alias/phpmyadmin/var/www/phpmyadmin
characters: Common commands
1. Restart Apache
sudo/etc/init.d/apache2 Restart
2. Restart MySQL
sudo/etc/init.d/mysql Restart
now that the lamp environment is configured successfully, try Echo phpinfo ();
lamp is not so mysterious! Removing the download time, the entire configuration process will never take you five minutes.
installation of GD library
sudo apt-get install PHP5-GD
Remember to restart Apache after loading
sudo/etc/init.d/apache2 Restart
enable the Mod_rewrite module
sudo a2enmod rewrite

Ubuntu14.04 Build Php+mysql+apache

Related Article

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.