typecho 部署安装

typecho 下载

http://typecho.org/download

插件列表

http://docs.typecho.org/plugins/download

nginx 安装

yum -y install nginx
systemctl start nginx
systemctl enable nginx

下载 php

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm           
yum --enablerepo=remi-php74 install -y php-fpm php-mcrypt php-curl php-cli php-mysql php-gd php-xsl php-json php-intl php-pear php-devel php-common php-mbstring php-tidy php-zip php-soap curl

##设置php

vim /etc/php.ini
cgi.fix_pathinfo=1
#更改php-fpm配置文件
vim /etc/php-fpm.d/www.conf         //编辑配置文件

---
user = nginx
group = nginx

listen = /var/run/php-fpm/php-fpm.sock

listen.owner = nginx
listen.group = nginx
listen.mode = 0660

env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
---

启动php-fpm

systemctl start php-fpm
systemctl enable php-fpm

安装mysql

vim /etc/yum.repos.d/mariadb.repo      //新建repo

[mariadb]
name = MariaDB
baseurl = http://mirrors.aliyun.com/mariadb/yum/10.4/centos/7.6/x86_64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
enabled=1
gpgcheck=1

yum -y install MariaDB-server MariaDB-client
systemctl start mariadb
systemctl enable mariadb

初始化数据库

mysql_secure_installation      //初始化mysql,设置好root密码
mysql -u root -p ****          //登陆mysql

mysql > create database typechodb;   //新建数据库
mysql > create user 'typechodb'@'localhost' identified by 'Huayun@123';   //新建用户
mysql > grant all privileges on typechodb.* to typechodb@localhost identified by 'Huayun@123';     //赋予新建用户权限
mysql > flush privileges;       //刷新权限
mysql > exit;         //退出mysql视图

配置nginx 中typecho.conf

vim /etc/nginx/conf.d/typecho.conf

server {
   listen 80;
   server_name 10.100.214.212;
   root /opt/typecho;
 
   access_log  /var/log/nginx/typecho_access.log;
   error_log  /var/log/nginx/typecho_error.log;
 
   client_max_body_size 1G;
   fastcgi_buffers 64 4K;
 
   index  index.php;
 
   location / {
     try_files $uri $uri/ /index.php?$query_string;
   }
 
   location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
     deny all;
   }
 
   location ~ \.php(?:$|/) {
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     include fastcgi_params;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     fastcgi_param PATH_INFO $fastcgi_path_info;
     fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
   }
 
   location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
     expires 30d;
     access_log off;
   }
 }

备注

1.安装过程中
会提示usr/uploads/ 无权限 ,这个目录的绝对路径在 /opt/typecho/usr/uploads
2.mysql数据库填写完信息后会把信息放在根目录下

[root@localhost uploads]# cat /opt/typecho/config.inc.php
<?php
// site root path
define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));

// plugin directory (relative path)
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');

// theme directory (relative path)
define('__TYPECHO_THEME_DIR__', '/usr/themes');

// admin directory (relative path)
define('__TYPECHO_ADMIN_DIR__', '/admin/');

// register autoload
require_once __TYPECHO_ROOT_DIR__ . '/var/Typecho/Common.php';

// init
\Typecho\Common::init();

// config db
$db = new \Typecho\Db('Pdo_Mysql', 'typecho_');
$db->addServer(array (
  'host' => 'localhost',
  'port' => 3306,
  'user' => 'typechodb',
  'password' => 'Huayun@123',
  'charset' => 'utf8mb4',
  'database' => 'typechodb',
  'engine' => 'InnoDB',
), \Typecho\Db::READ | \Typecho\Db::WRITE);
\Typecho\Db::set($db);

安装 插件

  1. 插件列表

http://docs.typecho.org/plugins/download
Markdown左右编辑 :docs.typecho.org/_media/plugins/lreditor0.0.4.zip

这个主题目前测试还是比较满意

Joe主题

Github上的插件

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

石兴稳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值