mysql安裝,php
sudo apt-get install mysql-server-**(**表示版本,5.5或5.6).mysql
下載php源碼sql
解壓後,進入目錄php7
sudo ./configure --prefix=/usr/local/php --enable-fpm --with-libxml-dir --with-zlib --with-zlib-dir --enable-bcmath --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-mhash --enable-mbstring --with-mcrypt= --with-mysql= --with-mysqli --with-pdo-mysql --enable-soap --enable-sockets --enable-zip --with-pcre-dir --with-zlib-dir --with-readline --with-openssl --with-config-file-path=/usrcurl
遇到缺乏的庫,通常這麼解決 sudo apt-get install lib******-dev(*****通常是庫名),不知道名字的,lib + ** + 按兩下tab鍵,找到後綴是-dev的安裝socket
如:url
sudo apt-get install libreadline6-dev server
sudo apt-get install libmcrypt-devxml
sudo apt-get install libfreetype6-dev ip
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg8-dev
如下php7
./configure --prefix=/usr/local/php7 --enable-opcache --enable-fpm --with-libxml-dir --with-zlib --with-zlib-dir --enable-bcmath --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-mhash --enable-mbstring --with-mcrypt --with-mysqli --with-pdo-mysql --enable-soap --enable-sockets --enable-zip --with-pcre-dir --with-zlib-dir --with-readline --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data