环境准备
防火墙配置
# yum -y install iptables-services
# vim /etc/sysconfig/iptables
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# 防火墙开机启动
# service iptables start
# chkconfig iptables on
php mysql 环境准备
# yum install -y httpd
# yum install -y mariadb-server
# yum install -y php
# yum install -y php-mysql
# yum install -y php-xml
# yum install -y php-gd
# 可以直接使用
yum install httpd php php-mysql php-gd php-xml mariadb-server mariadb
# 关闭 SELINUX, 不关闭的话php无法连接mysql
# getenforce
Enforcing
# vim /etc/selinux/config
# SELINUX=enforcing
SELINUX=disabled
解压wordpress 放入html路径
# cd /application/download/
# wget https://wordpress.org/latest.tar.gz
# mv latest.tar.gz WordPress.tar.gz
# tar -zxvf WordPress-4.3.1.tar.gz
# mv /application/download/wordpress/ /var/www/html/
# chown -R apache.apache /var/www/html/wordpress/
# ll -a
创建数据库用户名和密码
# mysql -h192.168.1.20 -uroot -p
Enter password:
MariaDB [(none)]> create database word_press default character set utf8;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> show create database word_press;
+------------+---------------------------------------------------------------------+
| Database | Create Database |
+------------+---------------------------------------------------------------------+
| word_press | CREATE DATABASE `word_press` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+------------+---------------------------------------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> grant all privileges on word_press.* to 'wordpress'@'%' identified by 'wordpress';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show grants for 'wordpress'@'%';
+----------------------------------------------------------------------------------------------------------+
| Grants for wordpress@% |
+----------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'wordpress'@'%' IDENTIFIED BY PASSWORD '*C260A4F79FA905AF65142FFE0B9A14FE0E1519CC' |
| GRANT ALL PRIVILEGES ON `word_press`.* TO 'wordpress'@'%' |
+----------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
访问 http://192.168.1.20/wordpress
输入数据库信息, 就可以使用了
分享到:
相关推荐
主要介绍了阿里云Centos7安装LNMP+wordpress的方法和步奏,十分的简洁明了,推荐给大家,有需要的小伙伴可以参考下
本文介绍了CentOS的系统安装和wordpress建站的全过程,相应的操作步骤和代码都在文中提供,方便大家进行学习,有兴趣大家可以相互交流。
在centos7系统下搭建Mysql5.0、apache2.4、php5.4环境,并配置使它们能够完整的搭建网站,例如wordpress
1.两种方式得到Wordpress 首先你可以去wordpress官方网站看下最新的wordpress的下载地址多少。比如wordpress 3.9.1的下载地址是: http://cn.wordpress.org/wordpress-3.9-zh_CN.zip 先用mkdir命令随便建立一...
centos5.9下安装部署并且优化wordpress文档
在centos7上简单安装Wordpress,Magento,Tomcat平台安装Magento2,TomCat,Wordpress和静态网站Nginx,centos 7代码这些说明将提供在本地计算机上安装和运行的项目的副本,以进行开发和测试。 有关如何将项目部署到...
最近做个项目,拿到一台CentOS 6服务器,需要在上面配置php环境,并安装WordPress,我们先来看看第一步,配置AMP(Apache,Mysql, PHP)环境
在centos6操作系统中搭建nginx web服务器和部署wordpress项目
WordPress在CentOS服务器下如何安装Varnish加速.docx
基于Centos7系统中LAMP环境下的WordPress站点进行Redis缓存加速服务的部署
ansible-centos7 CentOS7的Ansible剧本安装$ git clone https://github.com/castaneai/ansible-centos7$ cd ansible-centos7$ sudo ./install.sh用法可用的剧本位于playbooks/目录中。 使用ansible-playbook命令运行...
Centos7上配置Apache、PHP5.6、MariaDB 环境,建设属于自己的WordPress个人网站。 最近我想要在我的腾讯云服务器(CentOS 7.6 )上搭建一个WordPress个人网站,同样第一步去网上百度了很久,但是看到的教程总是有...
CentOS 7+ 因为,我还没有对这些进行测试,我很高兴在您的服务器上免费安装和设置它! 作为回报,在此感谢您提供测试机! 如何安装 请备份现有的配置文件... mkdir ~ /scripts & > /dev/null curl -Sso ~ /...
centos 8 下wordpress安装教程,亲测
主要介绍了CentOS下搭建PHP环境与WordPress博客程序的全流程总结,这里我们以Apache服务器程序和MySQL数据库程序为例进行讲解,需要的朋友可以参考下
centos6.5 wordpress的部署
服务器操作系统:CentOS 7.0 博客部署服务器:Apache 后台语言:PHP 数据库:MySql 前端框架:WordPress 步骤 一、安装Apache 安装 Apache 很简单,只需要在终端输入以下命令就可以了: sudo yum install ...
本脚本适用于centos7系统,软件均采用二进制包编译安装,小内存主机安装时间可能接近1小时 原始包预设存放位置为/ usr / local / src / 软件默认安装位置为/ usr / local / 原始包下载速度取决于网络环境,源文件夹...