centos7 在线快速安装php7.2以及各种扩展

1.今天翻到一年前的笔记,觉得小伙伴用得着,特别是对linux不熟悉的人对于php扩展的安装很是偷痛,不管是编译安装,pecl安装,方式很多但还是其他方式都可能遇到问题,下面是我整理的最简单的方式,粗鲁暴力php在线安装以及扩展一步到位,此方式方法不支持源码编译安装,我也懒得整理了,不讲思路只体现大概过程

 

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml       。。。。。继续加其他扩展

或者

yum  -y install php72w php72w-* 

安装各种扩展,上面的部分都可以用这个代替

 

2.下面是原来的笔记 centos7.5安装lam5.6p7.2

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
yum install httpd
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum repolist enabled | grep "mysql.*-community.*"
yum -y install mysql-community-server
systemctl enable mysqld
systemctl start mysqld
mysql_secure_installation
service httpd restart
service httpd restart

 

over

 

你可能感兴趣的:(Linux,Centos7,PHP)