Giter Site home page Giter Site logo

docs's Introduction

AntGrid on WSL2

环境

Windows 10 + WSL2 Ubuntu 18.04

p2pdatabase

此部分安装用户信息管理后端,即账号密码等.仓库位于https://github.com/Lin-xs/p2pdatabase.

按照README执行完"运行方法"一节即可.默认运行uvicorn main:app --host 0.0.0.0 --port 3000

此时打开浏览器访问localhost:3000/docs,若出现FastAPI文档即为配置完成.

可能出现的问题:

  • WSL下查看mysql运行状态请运行sudo service mysql status,而非systemctl.

  • 安装完成后运行mysql,报错

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    

    解决方法为将/etc/mysql/my.cnf 中的bind-address = 127.0.0.1改成bind-address = localhost.注意,如果你my.cof没有这一项,但文件中包含了其他目录,比如:

    !includedir /etc/mysql/conf.d/
    !includedir /etc/mysql/mysql.conf.d/
    

    则检索这两个目录下的配置文件中对于bind的设置并替换.例如:

    $ cat /etc/mysql/mysql.conf.d/mysqld.cnf  | grep address
    bind-address            = 127.0.0.1
    

    那么将此处改动即可.随后重启:sudo /etc/init.d/mysql restart.之后再尝试运行mysql.

  • sudo apt install mysql-server后,并没有设置root密码的部分.此时先运行sudo mysql_secure_installation设置root密码(默认使用123456),其余部分均回车跳过.随后sudo mysql -u root -p使用刚才的密码登录(此时如果不加sudo直接用root登录,可能会报错).随后运行ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new-password';设置你的root密码.之后应该就可以正常mysql -u root -p了.

NodeJS

查看node版本:

node -v

我使用的版本为v16.20.0.若未安装nodejs,可采用nvm方式安装:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source .bashrc
nvm install v16.20.0

此部分仓库位于https://github.com/xwhzz/demo. 完成README中的"快速开始"部分即可.

docs's People

Contributors

lin-xs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.