in the previous period, the lamp environment was installed under Ubuntu, recording the installation process for easy access later. InstallationLampEnvironment
① Installing Apache
sudo Install apache2
The system will pop up prompt, at this time need to enter the user's password to install, the following other installation operations need to enter the password, each time the same.
At this point, open the browser input localhost, the following interface shows that the installation was successful.
② Installing PHP
sudo Install PHP5
③ installing MySQL
sudo Install Mysql-server
At this point the lamp Environment installation is complete. The test is correct .
After the Apache installation is complete , The root directory is /var/www/html
CD /var/www/htmlsudovi phpinfo.php
Input
<? PHP Phpinfo ();? >
Then open the browser input localhost/phpinfo.php, the following page appears to indicate that the installation was successful.
InstallationPHPThe development package
Extensions can only be installed if a development package is installed
sudo Install Php5-dev
InstallationPHPthe extension
A) Install php-mysql
This installation comes with the system library and is installed directly.
sudo Install Php5-mysql
Restart Apache to load mysql support
sudo service apache2 restart
b) Install YAF
Install yaf before installing pcre Library, otherwise installation YAF will error
sudo Install libpcre3 Libpcre3-dev
Download the latest yaf file
CD /usr/local/src/sudowget https://github.com/laruence/php-yaf/ Archive/master.zip
- Prevent the same name as the file you downloaded later, so change the name to differentiate.
Extract
sudo Unzip Yaf. Zip
After decompression as shown
CD php-yaf-mastersudo /usr/bin/phpize
Configuration
Compile
Compiling the installation
After completion, the yaf.so file is generated in the following directory
Modify The configuration of the php.ini, load the yaf
sudo VI
extended directory changed to survive So directory where the files are located
New
Restart Apache
sudo service apache2 restart
At this point, the refresh found yaf has been installed correctly
If you need additional installation steps that extend similar to YAF.
Installation of the lamp environment under UBUNTU14 and installation of the YAF extension