Home >Backend Development >PHP Tutorial >Installation of LAMP environment and installation of yaf extension under Ubuntu14
InstalllampEnvironment
① Install
<span>sudo</span> apt-get <span>install</span> apache2
The system will pop up the prompt as shown in the picture. At this time, you need to enter the user's password to install. All other installation operations below need to be entered. The password is the same every time.
Open the browser and enter
② Install php
<span>sudo</span> apt-get <span>install</span> php5
③ Install mysql
<span>sudo</span> apt-get <span>install</span> mysql-server
At this time, the environment installation of
ApacheAfter the installation is complete
cd /var/www/<span>html </span><span>sudo</span><span>vi</span> phpinfo.php
Enter
<?<span>php </span><span>phpinfo</span><span>(); </span>?>
Then open the browser and enter
Install the development package of php
Only after installing the development package can you install the extension
<span>sudo</span> apt-get <span>install</span> php5-dev
Install the extension of php
a) Installation
This installation comes with the system library, you can install it directly.
<span>sudo</span> apt-get <span>install</span> php5-mysql
Restart
<span>sudo</span> service apache2 restart
b) Install
Install
<span>sudo</span> apt-get <span>install</span> libpcre3 libpcre3-dev
Download the latest
cd /usr/local/src/ <span>sudo</span><span>wget</span> https:<span>//</span><span>github.com/laruence/php-yaf/archive/master.zip</span>
Unzip
<span>sudo</span><span>unzip</span> yaf.<span>zip</span>
After decompression, it is as shown in the picture below
cd php-yaf-<span>master </span><span>sudo</span> /usr/bin/phpize
Configuration
Compile
Compile and install
After completion, the yaf.so file is generated in the following directory
Modify the configuration of
<span>sudo</span><span>vi</span> php.ini
Change the expansion directory to survival The directory where the
Added
Restart
<span>sudo</span> service apache2 restart
Refresh at this time to find
If you need other extensions like yaf installation steps.
The above introduces the installation of the LAMP environment and the installation of the yaf extension under Ubuntu14, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.