Centos 搭建wordpress我的博客

 

一、裝apache、mariadbphp

yum install  httpd  mariadb-server  php php-mysql -y
systemctl start httpd
systemctl enable httpd
systemctl start mariadb
systemctl enable mariadb

二、mariadb配置html

密碼初始化
mysql_secure_installation


建立一個數據庫wordpress
mysql -u root -p
MariaDB [(none)]> create database wordpress character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all on wordpress.* to  wordpress@'localhost' identified by 'wordpress';
MariaDB [(none)]> grant all on wordpress.* to  wordpress@'%' identified by 'wordpress';
MariaDB [(none)]> exit

 三、安裝wordpressmysql

官網:https://cn.wordpress.org/web

下載
wget https://cn.wordpress.org/wordpress-4.8.1-zh_CN.tar.gz
解壓
tar -zxf wordpress-4.8.1-zh_CN.tar.gz
移動到html目錄下
mv wordpress /var/www/html/
重啓httpd服務
systemctl restart httpd

四、頁面訪問 ip/wordpress web端安裝sql

按照提示在 wordpress目錄下建立wp-config.php並配置
cd /var/www/html/wordpress/
vi wp-config.php

最後面填入一些帳號密碼信息便可完成!數據庫

相關文章
相關標籤/搜索