美文网首页
使用wp框架搭建网站 上

使用wp框架搭建网站 上

作者: qianglinc | 来源:发表于2019-01-09 19:20 被阅读0次

在搭建过程中遇到的问题,及个人总结:

环境:

LAMP+phpMyAdmin+wordpress

centos7.6+apache2.4.6+mariadb10.3.12+php7.1+phpMyAdmin4.8.4+wordpress5.0.2

a.Apache

流程:


yum install httpd* #通过yum安装

systemctl start httpd    #启动服务

systemctl status httpd    #查看状态

systemctl enable httpd    #设置为开机启动

知识点:

/var/www/html/ #网页根目录

/etc/httpd/conf/ #主配置目录

/etc/httpd/conf.d/ #其他配置目录

/var/log/httpd/access_log #访问日志

/var/log/httpd/error_log #错误日志

注意事项:

防火墙、selinux

参考文档:

官方手册

apache安装

b.Mysql

流程:


yum list installed | grep mariadb    #检查mariadb是否已安装

yum -y remove mariadb*      #卸载

vim /etc/yum.repos.d/Mariadb.repo     #mariadb添加[官方源](https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.3+%E7%BB%A7%E7%BB%AD++%E8%BF%94%E5%9B%9E)

yum clean all    #删除缓存

yum makecache all    #重构缓存

yum install MariaDB-server MariaDB-client    #安装

systemctl start mariadb.service    #启动服务

systemctl status mariadb.service    #查看状态

systemctl enable mariadb.service    #设置为开机启动

mysql_secure_installation     #设置安全选项

知识点:

/etc/my.cnf #配置文件

/var/lib/mysql/ #数据目录

c.PHP

流程:


rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm    

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm     #这两条更新源

yum search php7    #查找列表,选择目标版本

yum install php71w php71w-cli    #我选择了71版本

yum install php71w-mysql    #安装数据库模块

d.phpmyadmin

流程:


~~yum install epel-release~~ 

~~yum install phpmyadmin~~    #此方式会报错

官网下载最新版

放在网站目录文件夹下,apache默认是/var/www/html/*

在安装过程中查阅资料,需要做很多配置,但在实际安装中,我将包解压后能直接使用

链接:

报错例子

官方使用手册

e.wordpress

流程:

链接:

官方说明文档

相关文章

网友评论

      本文标题:使用wp框架搭建网站 上

      本文链接:https://www.haomeiwen.com/subject/zkzgrqtx.html