华为云鲲鹏服务器安装wordpress

由于鲲鹏服务器采用ARM架构不同于x86_64服务器,网络上的常见安装教程大多失效,因此整合安装过程于此博客。

1.更换yum源
参考此博文:centos 7-aarch64如何替换yum源

2.安装nginx
参考华为镜像站教程:http://arm.cloud-onlinelab.cn/
搜索框输入nginx即可

2.1 配置
1.创建nginx用户及用户组
groupadd nginx
useradd -g nginx -M nginx
2.  修改nginx配置文件
修改文件/usr/local/nginx/conf/nginx.conf 第2行,将nobody改为nginx

:在安装nginx未配置环境变量的情况下的启动与关闭nginx服务的方式
开启:/usr/local/nginx/sbin/nginx
关闭:/usr/local/nginx/sbin/nginx -s stop
重启:/usr/local/nginx/sbin/nginx -s reload

3.安装mysql
参考华为镜像站教程:http://arm.cloud-onlinelab.cn/
搜索框输入mysql即可

4.安装php
参考此教程: CentOS7.5-aarch64上手工部署WordPress指导 步骤三
注:安装cmake时make install 后应继续执行 gmake 与 gmake install

5.安装wordpress
继续按步骤4中的教程进行安装即可


1.DB_HOST需要设置为127.0.0.1,若使用localhost可能出现mysql密码错误的情况
2.若在注册完成后登录时出现403错误则在nginx的配置文件(/usr/local/nignx/conf/nginx.conf)中添加默认访问页面index.php :

    location / {
       root   html;
       index index.php index.html index.htm;
   }

6.设置伪静态(nginx配置方法)
编辑nginx.conf文件,输入如下代码:

location / {
     try_files $uri $uri/ /index.php?$args;
 }
 rewrite /wp-admin$ $scheme://$host$uri/ permanent; 

代码解释: 解释try_files $uri $uri/ /index.php$is_args$args;

注:若python pip install安装过慢,可在其后增加
-i https://pypi.tuna.tsinghua.edu.cn/simple 即可,如:

pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple

注:华为镜像源:http://mirrors.myhuaweicloud.com/pypi/web/simple

7.安装机器学习环境
若要跑机器学习建议直接安装anaconda,包管理能省很多事,具体安装过程可参考此博客:https://blog.csdn.net/frdevolcqzyxynjds/article/details/105939421
其中博主使用的版本为 Archiconda3-0.2.3 ,建议使用相同版本进行安装
若要安装python库,直接使用conda install 指令即可。conda基本指令可参考此博文:https://www.cnblogs.com/xbit/p/11336806.html

8.附安装包,可按需下载
1.wordpress-5.2.4安装包
2.nextcloud-18.0.4安装包

Related post

  1. php调用python脚本

    2020-07-05

  2. JDBC操作Hive概述

    2021-09-24

  3. 算法伪代码

    2020-08-07

  4. 设计模式-工厂模式

    2020-09-09

There are no comment yet.

COMMENT

Take a Coffee Break

Recommend post

  1. 常用工具指令

    2022-09-18

Category list

ABOUT

Welcome to FullStar, a captivating online destination where the realms of software development and personal reflections intertwine.

April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Life Logs

  1. 回首

    2023-07-14

Return Top