部署博客系统workpress

2020-02-13  本文已影响0人  磨剑_运维之旅

部署博客系统wordpress

sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config ####关闭selinx
setenforce 0
systemctl stop firewalld.service ###关闭防火墙
systemctl disable firewalld.service
yum -y install mariadb mariadb-server mariadb-libs php php-mysql php-gd php-fpm php-cli gd httpd
systemctl start httpd mariadb

mysqladmin -uroot password “123” 修改MYSQL密码

mysql -uroot -p123 进入mysql

create database tianyun; 创建tianyun数据库

vi vim /etc/httpd/conf.d/tianyun.conf

<VirtualHost *:80>
ServerName www.tianyun.com
ServerAlias tianyun.com
DocumentRoot /web/tianyun

</VirtualHost>

<Directory "/web/tianyun">
Require all granted
</Directory>

导入wordpress网站源码

wordpress-4.7.2-zh_CN.tar.gz
mkdir -p /web/tianyun
tar xf wordpress-4.7.2-zh_CN.tar.gz
cp -rf wordpress/* /web/tianyun/

chmod -R 777 /web/ 给777权限
vi /etc/hosts ##添加本地解析
192.168.31.167 www.tianyun.com
192.168.31.167 tianyun.com

使用浏览器 www.tianyun.com

数据库名 tianyun ##必须和数据库中库名字一样
用户名 root
密码 123
数据库 主机 locallhost
表前缀 wp_
点提交
进行安装

站点标题 tianyunhaha
用户名 tianyun
密码 123
确认使用弱密码

安装wordpress 2分钟左右

已安装过

您的WordPress看起来已经安装妥当。如果想重新安装,请删除数据库中的旧数据表。

登录

输入密码

成功了

[root@www /]# 问题:我的博客服务器访问不到了^C
[root@www /]# 小红回答:1先看防火墙和selinux^C
[root@www /]# 2看httpd status 3没起看配置文件和端口^C
[root@www /]# 重启httpd 在看一下中间jian ^C
[root@www /]# 数据库 O分^C
[root@www /]# ^C
0分

[root@www /]# 问题:我的博客服务器访问不到了^C
[root@www /]# 1ping服务器 2通->网络没问题^C
[root@www /]# 证明服务有问题,-->SSH 问题->连接后-httpd status^C
[root@www /]# ps -ef | lsof -i: ^C
[root@www /]# 端口也开着 看配置文件-> 目录-> 文件全不全-权限->^C
[root@www /]# 中间件及数据库--> nfs挂载会看挂载点^C

上一篇 下一篇

猜你喜欢

热点阅读