动态网页基本框架
lamp l-linux 平台 a-apache 服务应用程序 m-mariable 默认开源数据库 p-php 应用程序
第一步安装httpd服务
[root@redhat ~]
修改配置文件
[root@redhat ~]
打开文件添加如下
<VirtualHost 192.168.159.128:80>
DocumentRoot /www/boke
ServerName www.boke.com
</VirtualHost>
<Directory /www>
AllowOverride none
Require all granted
</Directory>
重启服务、关闭防火墙、关闭selinx
[root@redhat ~]
[root@redhat ~]
[root@redhat ~]
新建目录
[root@redhat ~]
导入博客资源包 进入boke目录,rz命令导入资源包
[root@redhat ~]
[root@redhat boke]
 解压资源包
[root@redhat boke]
安装数据库
[root@redhat ~]
启动服务
[root@redhat ~]
初始化数据库 输入设置密码,后面一直按y回车即可
[root@redhat ~]
登录数据库
[root@redhat ~]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.3.28-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database boke1;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| boke |
| boke1 |
| hxfluntan |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
6 rows in set (0.000 sec)
MariaDB [(none)]> exit;
Bye
重启数据库
[root@redhat ~]
下载php程序
[root@redhat ~]
修改Windows下的hosts文件 
浏览器输入自定义的域名+/解压资源包出的目录 
 点击现在开始 填写相关信息然后提交 
新建文件 
[root@redhat wordpress]
[root@redhat wordpress]
cp: overwrite 'wp-config.php'? y
[root@redhat wordpress]
// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //
/** WordPress数据库的名称 */
define('DB_NAME', 'boke1');
/** MySQL数据库用户名 */
define('DB_USER', 'root');
/** MySQL数据库密码 */
define('DB_PASSWORD', 'root');
/** MySQL主机 */
define('DB_HOST', 'localhost');
/** 创建数据表时默认的文字编码 */
define('DB_CHARSET', 'utf8');
/** 数据库整理类型。如不确定请勿更改 */
define('DB_COLLATE', '');
然后点击现在安装
填写相应信息,点击安装 
安装完成  vim /etc/httpd/conf.d/vhost.conf中的DocumentRoot改为/www/boke/wordpress/ 网站输入域名访问 
|