centos7搭建lamp环境(php7)
来源:互联网 发布:navicat输入sql语句 编辑:程序博客网 时间:2024/06/05 03:43
说明:搭建lamp嘛,说简单也简单,可如果是PHP7的教程可就很难找了,可能像stackoverflow上会有一些答案,但毕竟是英文的嘛,所以在这里照顾一下英语不是很好的撸友。
这里使用remi方式,因为webtatic方式无法安装。。。
wgethttps://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm-Uvh remi-release-7.rpmepel-release-latest-7.noarch.rpm
yum--enablerepo=remiupdate remi-release
yum --enablerepo=remi-php70
# 搜索PHP
yumsearch php70
yum install php70php70-php-develphp70-php-fpmphp70-php-mbstringphp70-php-mcryptphp70-php-mysqlndphp70-php-gdphp70-php-opcachephp70-php-pdophp70-php-jsonphp70-php-xmlphp70-php-pecl-xdebugphp70-php-pecl-zip
systemctlstart php70-php-fpm.service
systemctl enable php70-php-fpm.service
# PHP的执行文件不再是php,而是被命名为php70,所以需要做一个软连接
# /home ll /usr/bin/|grep php
# lrwxrwxrwx 1 root root 14 Dec 8 23:58 php -> /usr/bin/php70
# lrwxrwxrwx 1 root root 32 Dec 8 23:49 php70 -> /opt/remi/php70/root/usr/bin/php
# lrwxrwxrwx 1 root root 36 Dec 8 23:49 php70-cgi -> /opt/remi/php70/root/usr/bin/php-cgi
# lrwxrwxrwx 1 root root 33 Dec 8 23:57 php70-pear -> /opt/remi/php70/root/usr/bin/pear
# lrwxrwxrwx 1 root root 38 Dec 8 23:49 php70-phar -> /opt/remi/php70/root/usr/bin/phar.phar
# 其他以此类推
ln-s/usr/bin/php70/usr/bin/php
# PHP的配置文件位于
ls /etc/opt/remi/php70/|grep-E'\.conf|\.ini'
# pear.conf
# php-fpm.conf
# php.ini
# 还有php-fpm.d/php.d目录下的单独配置
# 需要注意的是session的文件路径需要写入权限,在php-fpm.d/www.conf下定义,默认在 /var/opt/remi/php70/lib/php/session/ 下,opcache、wsdlcache同理。
最后查看下版本,看得到版本说明没问题了=。=
php -v
php -v
0 0
- centos7搭建lamp环境(php7)
- centos7.2 lamp环境安装搭建mysql5.7.14+php7.0.9
- Centos7 LAMP环境搭建
- Centos7搭建lamp环境
- CentOS7 搭建 LAMP环境
- centos7搭建lamp环境
- Centos7 Lamp环境搭建
- CentOS7 搭建LAMP环境
- CentOS7 LAMP环境搭建
- CentOS7搭建LAMP环境
- Centos7 搭建LAMP 环境
- linux LAMP环境搭建(centos7)
- Ubuntu 16.04 LAMP(PHP7.0) 环境搭建并测试
- Linux上php7环境的搭建 Lamp
- centos7搭建LAMP平台环境
- centos7之lamp环境搭建
- centos7之lamp环境搭建
- centos7之lamp环境搭建
- 全网最强Android开发/源码资源汇总,倾力打造,绝对精品!!
- [nginx源码分析]set process title
- 如何使用JS来改变CSS样式
- 数字 & 字母的研究
- PHP中调用类方法时->和::的区别
- centos7搭建lamp环境(php7)
- Java基础之IO框架
- 动态输入多个字符串
- 剑指offer——在二维数组中查找元素
- Android 表情面板的展示和表情的显示
- Const,Const函数,Const变量,函数后面的Const
- UVA-The Largest Clique 11324
- [整合]境内人民币支付系统
- 二分查找