showdoc忘记管理员密码

进入目录修改sqlite3数据库文件showdoc.db.php为可以读写修改。

[root@netpc.com.cn ~]# cd /showdoc/Sqlite/
sqlite3 showdoc.db.php
SQLite version 3.3.6
Enter “.help” for instructions
sqlite> update user set password=”a89da13684490eb9ec9e613f91d24d00″ where username=”showdoc”

以上sql语句修改默认showdoc账号,密码初始化为:123456,重新登录后再修改。

发表在 服务器 | 标签为 , | 留下评论

@vue-cli 5.0.8创建VUE3或VUE2项目

1、首先查看版本并安装个,这里的环境如下

vue:@vue/cli 5.0.8
npm:8.1.0
node:v16.13.0

2.开始创建项目

2.1创建命令:vue create test 并选择创建项目类型

Vue CLI v5.0.8
? Please pick a preset:
vue3 ([Vue 3] dart-sass, babel, router, eslint) // 保存过自定义默认选项
Default ([Vue 3] babel, eslint)//默认(安装bable、eslint)
Default ([Vue 2] babel, eslint)//默认(安装bable、eslint)
> Manually select features //自定义

2.2选择自定义配置:

Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and
<enter> to proceed)
>(*) Babel //是一个 JavaScript 编译器ES6先后兼容ES5
( ) TypeScript // 微软开发的一个开源的编程语言,在JS的基础上构建而成超集
( ) Progressive Web App (PWA) Support //  渐进式Web应用
( ) Router // 路由
( ) Vuex // 状态管理库
( ) CSS Pre-processors // CSS预处理
(*) Linter / Formatter // 规范代码检查工具
( ) Unit Testing // 测试
( ) E2E Testing  // 测试

2.3选择组件相关参数

Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Router, Vuex, CSS Pre-processors, Linter

2.3.1选择vue版本
? Choose a version of Vue.js that you want to start the project with (Use arrow keys)
> 3.x
2.x

2.3.2选择是否使用history历史模式的路由
? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n)

2.3.3选择CSS预处理器
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): (Use arrow keys)
> Sass/SCSS (with dart-sass)
Less
Stylus

2.3.4选择哪个自动化代码格式化检测
? Pick a linter / formatter config: (Use arrow keys)
ESLint with error prevention only
ESLint + Airbnb config
ESLint + Standard config
> ESLint + Prettier

2.3.5选择什么时候进行语法检查
? Pick additional lint features: (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
>(*) Lint on save // 语法检查配置文件保存时检查
( ) Lint and fix on commit // 文件提交时检查

2.3.6配置文件的存放位置(推荐独立放置配置文件)
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> In dedicated config files // 独立配置文件
In package.json // 放package.json里

2.3.6 是否保存以上设置(选择yes的话下次就可以直接使用刚才的配置了)
? Save this as a preset for future projects? (y/N)

3.最后回车等待组件下载创建成功

Vue CLI v5.0.8
✨ Creating project in D:\www\test\test.
🗃 Initializing git repository…
⚙️ Installing CLI plugins. This might take a while…

added 861 packages in 3m
🚀 Invoking generators…
📦 Installing additional dependencies…

added 113 packages in 2m
⚓ Running completion hooks…

📄 Generating README.md…

🎉 Successfully created project test.
👉 Get started with the following commands:

$ cd test
$ npm run serve

 

 

发表在 服务器 | 留下评论

windows7安装nodejs14成功创建VUE3

在windows7上是必须用node14才能正常创建vue3,刚开始很多网上还写着@vue/cli3.X结果创建出来的实际是vue2.6,根据查看package.json文件查看能知道实际使用的vue版本

"dependencies": {
 "core-js": "^3.8.3",
 "vue": "^3.2.13",
 "vue-router": "^4.0.3",
 "vuex": "^4.0.0"
},

最后是成功的,但是最高只能到nodejs14.17.6,不然会有dll动态链接库接口错误提示:无法定位程序输入点 getHostNameW 于动态链接库 WS2_32.dll

1、先下载windows7最后一个正常安装node-v13.4.0版本,下面地址
https://registry.npmmirror.com/-/binary/node/v13.4.0/node-v13.4.0-x64.msi

2、上面安装好后,下载下载的解压覆盖
https://registry.npmmirror.com/-/binary/node/v14.17.6/node-v14.17.6-win-x64.zip

3、打开cmd输入set NODE_SKIP_PLATFORM_CHECK=1,忽略版本检测
接着node -v看版本

以上都是镜像下载地址,官网不知为啥打不开

接着安装npm install-g @vue/cli,查看vue -V
@vue/cli 5.0.8

查看npm -v
8.13.2

执行vue create test
就可以选择创建vue3或vue2了

发表在 服务器 | 标签为 | 留下评论

WinMerge对比文件夹忽略svn目录

如题,很简单,可以使用WinMerge自带的过滤器

如下图,点击文件夹过滤器的选择,弹出过滤器界面,点击新建,弹出让你选择私有还是共享用户,随便喜欢,然后找个地方起个svn名字保存,弹出svn.flt记事本,内容如下,name和desc修改为SVN,注释掉F(过滤文件),留下D过滤目录改成 \.svn$,保存后点击安装,加载刚才保存的svn.flt文件,下拉下列表在下面选择SVN,点确定,这样就能在你对比过程中过滤svn目录了

WinMerge对比文件夹忽略svn

自从公司不让用破解Beyond Compare后,就习惯上使用WinMerge了.

发表在 服务器 | 标签为 , | 留下评论

安装Kibana管理Elasticsearch单机版

环境centos7,目前项目需要用到分布式,Elasticsearch直接做单机版,需要配置副本分片为0,让它不要去同步即可,不然状态会变成yellow,正常是green。

Elasticsearch
安装环境:yum install java-1.8.0-openjdk* -y
下载:wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.4.tar.gz
解压:tar -zxvf ./elasticsearch-6.8.4.tar.gz
root下不能跑,添加用户:useradd elasticsearch
设置目录所属:chown -R elasticsearch.elasticsearch ./elasticsearch-6.8.4
切换用户:su elasticsearch
启动:./bin/elasticsearch -d
停止:./bin/elasticsearch stop

配置文件:config/elasticsearch.yml
network.host: 127.0.0.1
http.port: 9200

kibana官网
https://www.elastic.co/cn/downloads/past-releases/kibana-6-8-23
下载:wget https://artifacts.elastic.co/downloads/kibana/kibana-6.8.23-linux-x86_64.tar.gz
解压:tar -zxvf kibana-6.8.23-linux-x86_64.tar.gz

root下不能跑,添加用户:useradd kibana
设置目录所属: chown -R kibana.kibana ./kibana-6.8.23-linux-x86_64
切换用户:su kibana
启动:./bin/kibana

配置文件:config/kibana.yml
server.port: 9800
server.host: “172.27.126.154”
elasticsearch.hosts: [“http://127.0.0.1:9200”]
kibana.index: “.kibana”
i18n.locale: “zh-CN”

Kibana报错:版本对应不上
FATAL ProductNotSupportedError: The client noticed that the server is not Elasticsearch and we do not support this unknown product.
Unable to retrieve version information from Elasticsearch nodes

修改elasticsearch配置

PUT /index/_settings
{
“number_of_replicas”: 0
}

{
“acknowledged” : true
}

查看elasticsearch状态,正常status为green
GET _cluster/health

发表在 服务器 | 标签为 , | 留下评论

python提示ImportError: No module named mysql.connector

今天在centos7下Python版本2.7.5执行脚本提示缺少mysql模块

很简单执行yum install mysql-connector-python安装下模块即可

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
–> Running transaction check
—> Package mysql-connector-python.noarch 0:1.1.6-1.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================
Package Arch Version Repository Size
====================================================================================================================
Installing:
mysql-connector-python noarch 1.1.6-1.el7 epel 154 k

Transaction Summary
====================================================================================================================
Install 1 Package

Total download size: 154 k
Installed size: 636 k
Is this ok [y/d/N]: y
Downloading packages:
mysql-connector-python-1.1.6-1.el7.noarch.rpm | 154 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql-connector-python-1.1.6-1.el7.noarch 1/1
Verifying : mysql-connector-python-1.1.6-1.el7.noarch 1/1

Installed:
mysql-connector-python.noarch 0:1.1.6-1.el7

Complete!

发表在 服务器 | 标签为 | 留下评论

恢复Microsoft Store微软应用商店卸载找不到了

可能是ghost系统的关系,压根就没见过有这东西

1、按下Win+X快捷键,选择“Windows PowerShell(管理员)”。

2、输入以下内容,可以一行一行复制粘贴,再按回车执行。
get-appxpackage *store* | remove-Appxpackage
add-appxpackage -register "C:\Program Files\WindowsApps\*Store*\AppxManifest.xml" -disabledevelopmentmode

Windows Terminal3、再搜索关键字store,打开即可,可能需要刷新或重新第二次打开才能正常显示。
microsoft store微软应用商店

发表在 服务器 | 标签为 | 留下评论

Windows Terminal绿色安装方法

Windows Terminal终端是一个面向命令行工具和 shell(如命令提示符、PowerShell 和适用于 Linux 的 Windows 子系统 (WSL))用户的新式终端应用程序。

1. 到Windows Terminal的Github仓库下载最新的release包,即以 .msixbundle 为后缀的文件
2. 正常windows10下可以直接执行安装该文件类型,如果不能安装将文件后缀名改为.zip后解压缩文件。
3. 在解压后的文件夹中找到名为 CascadiaPackage*.msixbundle 的文件,有x86、x64和ARM64版本的,选择x64那个文件,修改后缀名为.zip,然后解压
4. 在解压后的文件夹中,找到 WindowsTerminal.exe 的文件,直接点击即可。

下载地址:https://github.com/microsoft/terminal/releases

Windows Terminal

发表在 服务器 | 标签为 | 留下评论

Windows10安装Docker出现WSL kernel version报错

好多年没弄docker了,今天安装个windows版本的docker看看
1、首先windows系统控制面板->程序->程序和功能->启用或关闭windows功能,勾选Hyper-V然后单击确定安装。
2、下载:Docker Desktop on Windows
地址:https://docs.docker.com/desktop/install/windows-install/
一顿下一步安装后启动出现以下错误

wsl kernel version提示wsl版本有问题,根据网上攻略cmd执行wsl –update发现当前wsl版本并不支持该参数

3、最后决定把整个windows10也顺便升级下,上微软官网下载Windows10Upgrade9252.exe,按照提示安装即可,分三步,我在最后一步分别停在88%-90%的漫长等待,幸好最后还是完成了。

地址:https://www.microsoft.com/zh-cn/software-download/windows10

4、重新cmd执行wsl –update升级成功,此时执行Docker Desktop顺利打开程序

5、启动后设置国内镜像加速,有以下3个镜像可以选择

  • 阿里云加速器 https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors 会提登录
  • 网易云加速器 hub-mirror.c.163.com
  • 百度云加速器 mirror.baidubce.com

docker国内镜像

应用重启后cmd输入docker run -d -p 80:80 docker/getting-started启动示例容器

发表在 服务器 | 标签为 | 留下评论

让IDEA2021.2支持golang的插件

如何让IntelliJ IDEA2021.1支持golang,很简单如下:

1、首先上官万下载go插件

https://plugins.jetbrains.com/plugin/9568-go/versions/stable

2、选择对应的版本下载后,直接拉到idea界面,会提示你重启ide

接着在“File”–> “New” –> “Project” 新建项目里就能看到Go项目类型了
idea支持goland

发表在 服务器 | 留下评论