LAMP

一个人想着一个人 提交于 2019-12-31 21:34:39
  1. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!