centos怎样使用yum安装lamp

[root@8ca0f44c4202 ~]# yum install httpd-devel httpd mairadb mariadb-devel mariadb-server  php php-devel php-mysql -y
[root@8ca0f44c4202 ~]# yum -y  install  curl  curl-devel  net-snmp net-snmp-devel  perl-DBI  mariadb-devel mysql-deve

启动服务

[root@8ca0f44c4202 /]# systemctl start httpd
[root@8ca0f44c4202 /]# systemctl start mariadb

测试

[root@8ca0f44c4202 ~]# vi /var/www/html/index.php 
<?php
     phpinfo();
?>

打开页面测试

发表评论

登录... 后才能评论