Install the LAMP environment and yaf extension in Ubuntu14

Source: Internet
Author: User
: This article describes how to install the LAMP environment and yaf extension in Ubuntu14. For more information about PHP tutorials, see. Some time ago, the lamp environment was installed in ubuntu. record the installation process for future reference.

Install the lamp environment

① Install apache

sudo apt-get install apache2

The system prompts you to enter your password for installation. for other installation operations, you need to enter the password, which is the same every time.

Enter localhost in the browser. the following interface is displayed, indicating that the installation is successful.

② Install php

sudo apt-get install php5

③ Install mysql

sudo apt-get install mysql-server

The installation of the lamp environment is complete. Check whether it is correct.

After Apache is installed, the root directory is in/var/www/html

cd  /var/www/htmlsudovi phpinfo.php

Input

 

Open the browser and enter localhost/phpinfo. php. the following page appears, indicating that the installation is successful.

Install php Development Kit

Extensions can be installed only when the development kit is installed.

sudo apt-get install php5-dev

Install php extensions

A) install php-mysql

This installation is included in the system library and can be directly installed.

sudo apt-get install php5-mysql

Restart apache to load mysql

sudo service  apache2 restart

B) install yaf

Install the pcre library before installing yaf. Otherwise, an error is reported.

sudo apt-get install libpcre3 libpcre3-dev

Download the latest yaf file

cd  /usr/local/src/sudowget https://github.com/laruence/php-yaf/archive/master.zip

  • The name of the file to be downloaded is different from that of the file to be downloaded.

Extract

sudounzip yaf.zip

As shown in figure

cd php-yaf-mastersudo /usr/bin/phpize

Configuration

Compile

Compile and install

The yaf. so file is generated in the following Directory.

Modify the configuration of php. ini and load yaf

sudovi php.ini 

Change the extended directory to the directory where the so file is stored.

New

Restart apache

sudo service apache2 restart

Refresh the page and find that yaf is correctly installed.

If you need other installation steps similar to yaf.

The above introduces the installation of LAMP environment and yaf extension in Ubuntu14, including some content, and hope to help those who are interested in PHP tutorials.

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.