1 更新yum
yum update -y

2 新建用户
useradd -d /home/huchangyi -m huchangyi

修改用户密码
passwd huchangyi

3 安装ftp
yum install vsftpd
systemctl enable vsftpd
systemctl restart vsftpd

4 安装php
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php72w
yum -y install php72w-common php72w-fpm php72w-opcache php72w-gd php72w-mysqlnd php72w-mbstring php72w-pecl-redis php72w-pecl-memcached php72w-devel php72w-embedded php72w-cli php72w-pdo php72w-xml
systemctl enable php-fpm
systemctl restart php-fpm

5 安装nginx
yum list |grep nginx
yum install nginx
systemctl enable nginx
systemctl restart nginx

6 安装mysql
查看最新的源
https://dev.mysql.com/downloads/repo/yum/

下载mysql的repo源
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

安装mysql-community-release-el7-5.noarch.rpm包
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum -y install mysql57-community-release-el7-11.noarch.rpm

安装这个包后,会获得两个mysql的yum repo源
/etc/yum.repos.d/mysql-community.repo
/etc/yum.repos.d/mysql-community-source.repo

安装
yum -y install mysql-server

重置mysql密码
mysql -u root
use mysql;
delete from user where user=”;
update user set password=password(‘huchangyi′) where user=’root’;
GRANT ALL ON . TO root@’%’;
FLUSH PRIVILEGES;
select user,host,password from user;
exit;

重启
systemctl restart mysqld
systemctl enable mysqld

7 下载wordpress
cd /home/huchangyi
wget https://cn.wordpress.org/latest-zh_CN.zip
解压
unzip huchangyi.zip

8 配置nginx
vim /etc/nginx/conf.d/huchangyi.conf
内容如下:
server {

listen 80;
#listen 443 ssl;
server_name  huchangyi.com wp.huchangyi.com;
#ssl_certificate   /etc/nginx/conf.d/214616336130727.pem;
#ssl_certificate_key  /etc/nginx/conf.d/214616336130727.key;
#ssl_session_timeout 5m;
#ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#ssl_prefer_server_ciphers on;

#charset koi8-r;
#access_log  /var/log/nginx/host.access.log  main;

location / {
    root   /home/huchangyi/wordpress;
    index  index.html index.htm index.php;
    if (!-d $request_filename){
    set $rule_0 1$rule_0;
    }
    if ($rule_0 = "1"){
    rewrite ^/(.*)/$ /$1 permanent;
    }
    if (!-d $request_filename){
    set $rule_1 1$rule_1;
    }
    if (!-f $request_filename){
    set $rule_1 2$rule_1;
    }
    if ($rule_1 = "21"){
    rewrite ^/ /index.php last;
    }
}

#error_page  404              /404.html;

# redirect server error pages to the static page /50x.html
#
error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#    proxy_pass   http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

location ~ \.php$ {
    root           /home/huchangyi/wordpress;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
    }

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
#    deny  all;
#}

}

一 一键生成CRUD
一定写上字段注释和表注释,否则生成的菜单为英文
//生成fa_test表的CRUD且一键生成菜单
php think crud -t medic -u 1
//删除fa_test表生成的CRUD
php think crud -t medic -d 1
覆盖模式
php think crud -t medic -u -f 1

二 修改表注释
alter table medic comment '中医药材';
//一键生成test控制器的权限菜单
php think medic -c test

三 修改主页内容
/application/index/view/index/index.html

四 自定义路由
修改route.php
如果使用了前台基类控制器,默认都是开启权限控制的,如果不需要权限控制判断,在当前控制器中定义
protected $noNeedRight = '*';
protected ¥layout = '';

三十五 txt文件读取后显示乱码的问题
ansi格式替换为uft8格式
下载replace pioneer
官网地址为:http://www.mind-pioneer.com/
安装后打开tools的batch runner
pick files后选择encode convert
编码由gbk(cp936)改为uft-8

三十六 通过自定义属性获取书名传参
{{book0}}
var book_name = e.currentTarget.dataset.name;

三十七 暂时写死书名 测试预览情况
000-神农本草经.txt
001-吴普本草.txt
002-本草经集注.txt
003-新修本草.txt
004-食疗本草.txt
005-海药本草.txt
006-本草图经.txt
007-本草衍义.txt
008-汤液本草.txt
009-饮膳正要.txt
010-滇南本草.txt
011-本草品汇精要.txt
012-本草蒙筌.txt
013-本草纲目.txt
014-本草乘雅半偈.txt
015-本草征要.txt
016-本草易读.txt
017-本草新编.txt
018-本草备要.txt
019-本经逢原.txt
020-本草经解.txt
021-本草从新.txt
022-神农本草经百种录.txt
023-本草纲目拾遗.txt
024-本草崇原.txt
025-本草求真.txt
026-神农本草经读.txt
027-本草述钩元.txt
028-食鉴本草.txt
029-本草思辨录.txt
030-本草纲目别名录.txt
031-本草便读.txt
032-本草撮要.txt
033-本草问答.txt
034-神农本草经赞.txt
035-本草择要纲目.txt
036-得配本草.txt
037-本草害利.txt
038-本草分经.txt
039-雷公炮炙论.txt
040-炮炙全书.txt
041-炮炙大法.txt
042-雷公炮制药性解.txt
043-濒湖炮炙法.txt
044-要药分剂.txt
045-珍珠囊补遗药性赋.txt
046-药鉴.txt
047-药征.txt
048-思考中医.txt
049-五十二病方.txt
050-名医别录.txt

三十八 更改起始页
app.json中的pages
第一个页面前移

三十九 小程序上传版本 提交审核
审核失败原因存在所添加插件类目超出小程序主体类型当前开放类目范围行为,违反 《插件接入指南》
详情描述你好,个人主体小程序暂不支持使用工具 ,效率插件,请修改后再提交。
具体为kbone扩展库
删除app.json中的

"useExtendedLib": {
    "kbone": true,
    "weui": true
}

四十 微信小程序与微信公众号关联
登录微信公众号,在小程序管理中添加

四十一 自定义菜单中跳转小程序
页面填写app.json中的pages
pages/medic/index
pages/medic_book/index