CentOS 安装 PHP7

2016-11-24 18:23:38 5123 1 技术文章
yum install epel-release
#wget https://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.rpm

yum install yum-utils
yum-config-manager --enable remi-php72
yum install php-cli php-fpm php-opcache php-mbstring php-mysql php-gd php-xml php-json php-devel php-pear ImageMagick-devel

创建 www 用户组

groupadd www
useradd -g www www

安装 Tengine

安装依赖

yum install openssl-devel pcre-devel
wget http://tengine.taobao.org/download/tengine-2.2.2.tar.gz
tar xzvf tengine-2.2.2.tar.gz
cd tengine-2.2.2
./configure --with-http_v2_module  // 支持 http2 协议
make && make install
yum --enablerepo=remi-php70 install php-opcache php-mbstring php-mysql php-gd php-xml php-json php-devel php-pear ImageMagick-devel

yum 安装 php 7.2 生成文档要用 php 7.1.18 编译安装 php 7.1.18

yum install curl-devel
yum install libxml2-devel
./configure --with-pdo-mysql --with-openssl --with-curl --enable-mbstring
make clean
make 
make install

git

composer

memcached

redis

yum whatprovides *pdflatex yum install texlive yum install texlive-cyrillic 如果你的硬盘足够大,请执行下面的命令 yum -y install texlive texlive-*.noarch

您的邮箱不会被公开