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