云计算学习路线教程大纲课件:部署博客系统wordpress:
========================================================
一、基础环境[已完成]
[root@apache ~]# sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
[root@apache ~]# setenforce 0
[root@apache ~]# systemctl stop firewalld.service
[root@apache ~]# systemctl disable firewalld.service
二、安装LAMP[已完成]
[root@apache ~]# yum -y install httpd mariadb-server mariadb php php-mysql gd php-gd php-fpm
[root@apache ~]# systemctl start httpd mariadb
[root@apache ~]# systemctl enable httpd mariadb
[root@apache ~]# mysql_secure_installation /// mysqladmin -uroot password “123”
mysql -uroot -p123 进入mysql
三、安装wordpress
- Apache 配置虚拟主机
[root@apache ~]# vim /etc/httpd/conf.d/tianyun.conf
ServerName www.tianyun.com
ServerAlias tianyun.com
DocumentRoot /web/tianyun
Require all granted
systemctl restart httpd
- 导入wordpress网站源码
[root@apache ~]# mkdir -p /webroot/tianyun
[root@apache ~]# tar xf wordpress-4.5.3-zh_CN.tar.gz
[root@apache ~]# cp -rf wordpress/* /webroot/tianyun/
-
准备数据库
- 安装wordpress [任何client]
[root@tianyun ~]# vim /etc/hosts
192.168.122.161 www.zhufo.top zhufo.top www.tianyun.com tianyun.com //161为 web server IP
[root@apache ~]# vim /webroot/tianyun/wp-config.php
59 vim /etc/yum.repos.d/
60 vim /etc/yum.repos.d/CentOS-Base.repo
62 yum -y install epel-release
63 vim /etc/yum.repos.d/epel.repo
64
65 yum -y install mariadb mariadb-server mariadb-libs php php-mysql php-gd php-fpm php-cli gd httpd
66 vim /etc/httpd/conf.d/blackmed.conf
67 mkdir -p /web/blackmed
70 cp -r /root/Desktop/wordpress/* /web/blackmed/
71 chmod 777 /web/blackmed/ -R
72 systemctl start httpd
73 systemctl start mariadb
74 mysqladmin -u root password '123'
75 mysql -u root -p123
76 systemctl stop firewalld
77 setenforce 0
78 vim /etc/hosts
79 cat /etc/httpd/conf.d/blackmed.conf
80 vim /etc/hosts
81 mysql -u root -p123
83 history