-
LAMP安装部署:
准备工作:
1、关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
2、关闭selinux
setenforce 0
vim /etc/sysconfig/selinux
SELINUX=disabled
3、挂载光盘配置本地yum源
mount /dev/sr0 /mnt
vim /etc/yum.repos.d/base.repo
[base]
name=CentOS-$releasever - Base
baseurl=file:///mnt
gpgcheck=0
enabled=1
yum clean all
yum makecache
yum repolist
一、安装服务
yum -y install httpd php php-fpm mariadb-server php-mysql
二、测试php是否可用
vim /var/www/html/index.php
<?php
phpinfo();
?>三、启动服务 systemctl start httpd php-fpm mariadb 四、php应用程序解压到/var/www/html目录下 unzip phpMyAdmin-4.0.10.20-all-languages.zip mv phpMyAdmin-4.0.10.20-all-languages.zip phpmyy 五、测试是否成功 yum -y install php-mbstring 访问测试 六、配置数据库 mysql_secure_installation 设置root用户密码123 grant all privileges on *.* to test@'192.168.40.%' identified by 'centos'; flush privileges;
Apache:
默认网页目录:/var/www/html
配置文件:
主配置文件:/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/*.conf
来源:CSDN
作者:wangzihao-sxm
链接:https://blog.csdn.net/qq_45019159/article/details/103778848