wordpress mysql 搭建_apache mysql安装 wordpress搭建

apache安装

yum -y install httpd php mysql mysql-server php-mysql

yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc

yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql

管理服务

systemctl start httpd

systemctl status httpd

systemctl stop httpd

开始安装mysql

rpm -ivh mysql57-community-release-el7-9.noarch.rpm

yum -y install mysql-server

vim /etc/my.cnf

在[mysqld]下新增一行:

skip-grant-tables

保存退出,并重启数据库服务

service restart mysqld

mysql -u root -p

回车 ,在mysql> 下执行以下语句,设置mysql的 root为123456

update mysql.user set authentication_string=password('123456') where user= 'root' ;

刷新内存

flush privileges;

退出数据库

exit

再次编辑/etc/my.cnf 文件

# vim /etc/my.cnf

#skip-grant-tables (#表示注释)

systemctl restart mysqld 重启数据库

mysql -u root -p

密码 123456

在mysql下执行以下语句,把root密码修改为NLHnhy123456!

alter user user() identified by "NLHnhy123456!";

exit

systemctl restart mysqld

mysql -u root -p

密码:NLHnhy123456!

show databases;

CREATE DATABASE IF NOT EXISTS blog default charset utf8 COLLATE utf8_general_ci; 创建名为 my_db 的数据库

解决wordprfess安装插件(升级主题)失败的问题:

1、在wp-config.php文件末尾加上

define('WP_TEMP_DIR', ABSPATH . 'wp-content/temp');

define("FS_METHOD","direct");

define("FS_CHMOD_DIR", 0777);

define("FS_CHMOD_FILE", 0777);

2、mkdir /var/www/html/wp-content/temp

3、chmod -R 777 /var/www/html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值