您现在的位置是:首页 > 日记日记
centos 安装Ghost
薄荷2022-06-02【日记】1人已围观
简介centos 安装Ghost
安装mysql
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
systemctl start mysqld.service
systemctl status mysqld.service
grep "password" /var/log/mysqld.log
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
SHOW VARIABLES LIKE 'validate_password%';
set global validate_password_policy=LOW;
set global validate_password_length=6;
grant all privileges on *.* to 'root'@'192.168.0.1' identified by 'password' with grant option;
create database ghost;
mysql> flush privileges;
新建用户, ghost不能用root运行,官方已做说明( https://docs.ghost.org/docs/install)
useradd test
usermod -aG wheel test
passwd test123
su - ops
安装nginx
yum install nginx
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
配置nginx
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header Host localhost
proxy_set_header X-Forwarded-For $remote_addr;
}
service nginx start
nginx -v
systemctl status nginx
#配置 NodeJS 环境
wget https://nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.xz
tar -xvf node-v6.9.1-linux-x64.tar.xz
#配置环境变量
vi /etc/profile
#set for nodejs
export NODE_HOME=/opt/node-v6.9.1-linux-x64
export PATH=$NODE_HOME/bin:$PATH
export NODE_PATH=$NODE_HOME/lib/node_modules:$PATH
source /etc/profile
检查是否安装成功
node -v
npm –v
#安装Chost
wget https://ghost.org/zip/ghost-0.11.3.zip
unzip -uo ghost-0.11.3.zip -d ghost
yum -y install gcc gcc-c++
npm install -production
修改/var/www/ghost/core/shared/config/env目录下的config.development.json文件
url:localhost:2386
npm start --production
Tags:
上一篇:centos 安装typecho