phpdebian
⑴ Debian下用thinkphp框架 部署完畢之後提示緩存文件寫入失敗,請問如何解決 在線等
1. 先確認諸如.cache這樣的文件夾已創建成功
2. 執行:sudo chmod 777 -R /www,其中/www更換為項目根目錄
3. 如果是生產環境謹慎設置目錄許可權,可以只設置需要寫許可權的目錄為777。
⑵ debian8怎麼安裝php7
debian8 編譯安裝 php7
目錄(?)[-]
Please reinstall the libcurl distributionCannot find OpenSSL
configure error Unable to locate gmph
Can not find recodeh anywhere under usr usrlocal usr optCannot find pspell
Please reinstall the mysql distribution
mcrypth not found Please reinstall libmcryptxml2-config not found
安裝編譯器
apt-get install build-essential autoconf automake libtool bison re2c獲取PHP安裝包
wget https://downloads.php.net/~ab/php-7.0.13RC1.tar.gz安裝dev包
apt-get install libxml2-dev libssl-dev libbz2-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libgmp-dev libgmp3-dev libmcrypt-dev libmysqlclient15-dev libpspell-dev librecode-dev進行編譯安裝
./buildconf //用來生成configure腳本
./configure \
--prefix=/usr \
--with-config-file-path=/etc \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--with-t1lib=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-pdo-mysql=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
--with-mysqli=/usr/bin/mysql_config
備註:錯誤1:Cannot find OpenSSL's libraries 解決:
確認已安裝過 openssl、libssl-dev 包,還是會提示該錯誤;解決辦法:
root@test2:~/php-5.3.27# find / -name libssl.so輸出結果為: /usr/lib/x86_64-linux-gnu/libssl.so初步判斷它可能只會在 /usr/lib/ 下尋找 libssl.so 文件,於是:
ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib錯誤2:debian Please reinstall the libcurl distribution 解決:
# RetHat CentOS or Fedora 使用下面安裝命令yum install curl curl-devel
# Debian or Ubuntu使用下面的安裝命令
apt-get install curl
apt-get install libcurl4-gnutls-dev
錯誤3:Unable to locate gmp.h 解決:
在https://launchpad.net/debian/+source/gmp 下載 gmp源碼包,接著 ./configure && make && make install編譯 安裝
make &&make install
報錯處理
Please reinstall the libcurl distributionaptitude search libcurl4
aptitude install libcurl4-gnutls-dev
Cannot find OpenSSL』
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gztar -zxvf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j
./config
make && make install
configure: error: Unable to locate gmp.h
sudo apt-get install libgmp-dev libgmp3-devln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.hCan not find recode.h anywhere under /usr /usr/local /usr /opt.
apt-get install librecode-dev
Cannot find pspell
apt-get install libpspell-dev
Please reinstall the mysql distribution
apt-get install libmysqlclient15-dev
mcrypt.h not found. Please reinstall libmcrypt.
apt-get install libmcrypt-dev
xml2-config not found
apt-get install libxml2-dev
⑶ debian nginx php應該放在哪個目錄
這個沒有規定, 默認安裝是在 /usr/bin下面, 這樣就不用加入到系統的PATH, LIB
如果是自己編譯,一般會是/usr/local/phpxx, 編譯完成之後, 設置當前用戶或者系統的PATH