zoukankan      html  css  js  c++  java
  • LAMP应用部署

    LAMP+wordpress 部署博客

    软件安装

    1 yum -y install httpd
    2 yum -y install php
    3 yum -y install php-mysql
    4 yum -y install mariadb-server

    编辑Web服务配置文件

    vim /etc/httpd/conf/httpd.conf
    
        ServerName www.example.com:80 # 服务器有域名解析就填写
    
        DirectoryIndex index.html index.php

    不讨论防火墙的影响

    1 systemctl stop firewalld

    启动服务

    systemctl restart httpd
    systemctl restart mariadb
    systemctl enable httpd
    systemctl enable mariadb

    创建应用数据库、用户并授权

    >create database blog charset=utf8;
    
    >grant all on blog.* to aaa@localhost identified by '123456';
    
    >flush privileges;

    官网下载wordpress: https://wordpress.org/download/

    将wordpress文件移动到http服务目录之下

    cp -r wordpress /var/www/html/.
    
    cd /var/www/html/wordpress
    
    cp wp-config-sample.php wp-config.php

    编辑wordpress配置文件

    vim wp-config.php
    
        # 修改使用的本地数据库名
    
            define('DB_NAME', 'blog');
    
        # /** MySQL database username */
    
            define('DB_USER', 'aaa');
    
        # /** MySQL database password */
    
            define('DB_PASSWORD', '123456');
    
        # /** MySQL hostname */
    
            define('DB_HOST', 'localhost');
    
        # /** Database Charset to use in creating database tables. */
    
            define('DB_CHARSET', 'utf8');

    访问博客网站

    http://127.0.0.1/wordpress
    
    http://192.168.198.128/wordpress
  • 相关阅读:
    [洛谷P1155] 双栈排序
    [洛谷P4315] 月下”毛景“树
    [洛谷P2486] [SDOI2011]染色
    [HNOI2010] 弾飞绵羊
    mysql注入总结
    cisco交换机实现端口聚合
    python为运维人员打造一个监控脚本
    复习ACCESS注入
    利用sfc文件构建网络渗透
    FTP站点设置
  • 原文地址:https://www.cnblogs.com/cq146637/p/8353039.html
Copyright © 2011-2022 走看看