lamp示例1

lamp

部署分离的LAMP(wordpress论坛),部署到二台服务器上,php加载xcache模块

  1. 第一台主机安装mariadb(IP=192.168.20.17)
    1. 安装mariadb
      yum install mariadb-server -y
    2. 关闭防火墙
      systemctl disable firewalld
      systemctl stop firewalld
    3. 配置
      # 启用mariadb
      systemctl start mariadb
      systemctl enable mariadb
      # 安全配置mariadb
      mysql_secure_installation
      # 配置mariadb的数据
      mysql -p -e "create database wpdb;
      grant all privileges on wpdb.* to wpuser@'%' identified by '123456';"
      
  2. 第二台主机安装php,apache,xcache(IP=192.168.20.7)
    1. 安装软件
      yum install httpd php php-mysql php-xcache -y
    2. 解压wordpress
      unzip WordPress-5.0-branch.zip
      mv WordPress-5.0-branch/* /var/www/html/
      setfacl –R –m u:apache:rwx /var/www/html/
      
    3. 设置httpd
      更改文件 /etc/httpd/conf/httpd.conf:
      <IfModule dir_module>
          DirectoryIndex index.php index.html
      </IfModule>
      
      systemctl enable httpd
      systemctl start httpd
    4. 网页设置wordpress
      登录wordpress安装界面
      1. 点 "let's go"

      2. 输入

        项目名 对应值
        Database Name wpdb
        Username wpuser
        Password 123456
        Database Host 192.168.20.17
        Table Prefix wp_

        点submit

      3. information needeod

        项目名 对应值
        site title xxxx
        username chao
        passowrd 123
        your email 123@123.123
      4. 登录

posted @ 2020-02-09 11:28  stars_wisper  阅读(114)  评论(0编辑  收藏  举报