wordpress
record
nginx.conf /etc/nginx/nginx.conf
html目录
/usr/share/nginx/html
或者
/usr/local/nginx/html/
log 目录
/var/log/nginx
China 简体中文 « 下载 — WordPress
https://cn.wordpress.org/download/
wordpress安装教程_如何在linux中安装wordpress程序 - 太平洋学习网www.tpyyes.com的博客 - CSDN博客
https://blog.csdn.net/wjycgl/article/details/80306829
【CentOS】阿里云CentOS安装php环境 - weknow619 - 博客园
https://www.cnblogs.com/weknow619/p/8118425.html
Centos7安装PHP、安装MySQL、安装apache - 随缘盛世 - 博客园
https://www.cnblogs.com/shengChristine/p/9293996.html
摘要:
Linux下启动,停止,重启Nginx、Mysql、PHP - 叶少翔 - 博客园
https://www.cnblogs.com/yeshaoxiang/p/8659708.html
安装php
yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum search php72w
sudo yum install php72w php72w-fpm php72w-cli php72w-common php72w-devel php72w-gd php72w-pdo php72w-mysql php72w-mbstring php72w-bcmath
service php-fpm.service status 查看状态
systemctl start php-fpm.service 启动
systemctl stop php-fpm.service 停止
systemctl restart php-fpm.service 重启
systemctl reload php-fpm.service 重启修改配置
/etc/php.ini
PHP出现access denied问题及解决办法 | 一个程序员的简单生活
https://www.ddkiss.com/archives/151.html
意思是,我们在Nginx里配置了 fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
。所以cgi.fix_pathinfo=0
必须改为1.
/etc/php.ini
安装mysql
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
service mysqld status 查看状态
systemctl start mysqld 启动
systemctl stop mysqld 停止
systemctl restart mysqld 重启
systemctl reload mysqld 重启修改配置
mysql 配置
更改root 的 mysql密码
set password for 'root'@'localhost' =password('123AbC');
grant all privileges on *.* to root@'%'identified by '123AbC';
create user 'username'@'%' identified by 'password';
username是用户名,%是所有IP地址,如果输入的是IP地址,就规定只有改IP地址才能使用,password是登录密码。
开机启动MySQL配置
vi /etc/rc.local
将service mysqld start添加下去
MySQL添加新用户、创建数据库、为新用户分配权限 - xufengzhu的专栏 - CSDN博客
https://blog.csdn.net/xufengzhu/article/details/81112783
MySql授权和撤销权限操作 - QiaoZhi - 博客园
https://www.cnblogs.com/qlqwjy/p/8022575.html
MySQL用户管理:添加用户、授权、删除用户 - J'KYO - 博客园
https://www.cnblogs.com/pejsidney/p/8945934.html
create user 'wordpress'@'localhost' identified by '123456';
flush privileges;
CREATE DATABASE dbtest;
CREATE USER 'testUser'@'%' IDENTIFIED BY '123456';
GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, TRIGGER, CREATE VIEW, SHOW VIEW, EXECUTE, ALTER ROUTINE, CREATE ROUTINE, CREATE TEMPORARY TABLES, LOCK TABLES, EVENT ON `wordpress_db`.* TO 'wordpress'@'localhost';
GRANT GRANT OPTION ON `wordpress_db`.* TO 'wordpress'@'localhost';
grant all on *.* to 'wordpress'@'localhost'IDENTIFIED by 'hhsmpdb6';
revoke all on *.* from worpress@localhost;
drop user worpress@'localhost';
Apache安装(linux下叫做httpd)
yum install httpd
systemctl start httpd
Apache配置
/etc/httpd
/var/www
linux系统安装mysql数据库 - 段然涛 - 博客园
https://www.cnblogs.com/duanrantao/p/8988116.html
PHP 7.2 on CentOS/RHEL 7.5 via Yum – Webtatic.com
https://webtatic.com/packages/php72/
EPEL源-是什么?为什么安装? - ... - CSDN博客
https://blog.csdn.net/u011341352/article/details/82943871
EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为“红帽系”的操作系统提供额外的软件包,适用于RHEL、CentOS和Scientific Linux.
使用很简单:
首先需要安装一个叫”epel-release”的软件包,这个软件包会自动配置yum的软件仓库。当然你也可以不安装这个包,自己配置软件仓库也是一样的。
发表评论