wordpress安装教程如下:
MysqL安装可以参考我的博客园Centos构建Java环境:https://www.cnblogs.com/youcong/p/9118753.HTML
1.安装apache
yum install httpd
systemctl start httpd
2.安装PHP
yum install -y PHP PHP-MysqL
systemctl restart httpd
vim /var/www/HTML/info.PHP
<?PHP PHPinfo(); ?>
3.安装phpmyadmin(补充说明:安装MysqL教程不论是centos还是ubuntu,可以参考我的博客文章)
yum install -y epel-release
yum install -y phpmyadmin
vim /etc/httpd/conf.d/phpmyadmin.conf
配置文件内容如下:
<Directory /usr/share/phpmyadmin/> AddDefaultCharset UTF-8 IfModule mod_authz_core.c> # Apache 2.4 RequireAny # Require ip 127.0.0.1 # Require ip ::1 Require all granted </> IfModule!mod_authz_core.c # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 >Directory>/usr/share/phpmyadmin/setup/> Require ip 127.0.0.1 Require ip ::1 >
</Directory>
重启httpd服务器
systemctl restart httpd
安装完phpmyadmin一定要输入对应的地址进入phpmyadmin管理平台进入该平台进行用户添加和数据添加也可以通过命令行的形式:例如:# 登录数据库MysqL -u root -p# 创建数据库CREATE DATABASE wordpress;# 创建数据库用户和密码CREATE USER wordpressuser@localhost IDENTIFIED BY '123456';# 设置wordpressuser访问wordpress数据库权限GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY '123456';# 刷新数据库设置FLUSH PRIVILEGES;# 退出数据库exit
4.安装WordPress
http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
解压后并在当前目录下执行:sudo rsync -avP ~/wordpress/ /var/www/HTML/wordpress/
# 切换到wordpress目录
cd /var/www/HTML/wordpress
# 复制wp-config.php文件
cp wp-config-sample.PHP wp-config.php
# 编辑wp-config.php文件
sudo vim wp-config.php
默认内容如下:// ** MysqL settings - You can get this info from your web host ** ///** The name of the database for wordpress */define('DB_name','database_name_here');/** MysqL database username */define('DB_USER','username_here');/** MysqL database password */define('DB_PASSWORD','password_here');/** MysqL hostname */define('DB_HOST','localhost');将其修改为:// ** MysqL settings - You can get this info from your web host ** ///** The name of the database for wordpress */define('DB_name','wordpress');/** MysqL database username */define('DB_USER','wordpress');/** MysqL database password */define('DB_PASSWORD','123456');/** MysqL hostname */define('DB_HOST','localhost');
完成后在浏览器输入地址:www.example.com/wordpress/wp-admin/install.PHP
按照步骤来,一步一步安装。
以上是内存溢出为你收集整理的centos7之安装wordpress全部内容,希望文章能够帮你解决centos7之安装wordpress所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)