GoAdminGroup/go-admin的安装和运行的教程详解

使用这个GoAdminGroup/go-admin框架的最简单的例子就可以把项目运行起来 , go-admin 是以扩展库的形式使用的.

建一个main.go

package main

import (
  "io/ioutil"
  "log"
  "os"
  "os/signal"

  _ "github.com/GoAdminGroup/go-admin/adapter/gin"
  _ "github.com/GoAdminGroup/go-admin/modules/db/drivers/mysql"
  _ "github.com/GoAdminGroup/themes/sword"

  "github.com/GoAdminGroup/go-admin/engine"
  "github.com/GoAdminGroup/go-admin/examples/datamodel"
  "github.com/GoAdminGroup/go-admin/modules/config"
  "github.com/GoAdminGroup/go-admin/modules/language"
  "github.com/GoAdminGroup/go-admin/plugins/example"
  "github.com/GoAdminGroup/go-admin/template"
  "github.com/GoAdminGroup/go-admin/template/chartjs"
  "github.com/GoAdminGroup/themes/adminlte"
  "github.com/gin-gonic/gin"
)

func main() {
  gin.SetMode(gin.ReleaseMode)
  gin.DefaultWriter = ioutil.Discard

  r := gin.New()

  e := engine.Default()

  cfg := config.Config{
    Env: config.EnvLocal,
    Databases: config.DatabaseList{
      "default": {
        Host:    "127.0.0.1",
        Port:    "3306",
        User:    "goadmin",
        Pwd:    "goadmin",
        Name:    "goadmin",
        MaxIdleCon: 50,
        MaxOpenCon: 150,
        Driver:   config.DriverMysql,

        //Driver: config.DriverSqlite,
        //File:  "../datamodel/admin.db",
      },
    },
    UrlPrefix: "admin",
    Store: config.Store{
      Path:  "./uploads",
      Prefix: "uploads",
    },
    Language:      language.CN,
    IndexUrl:      "/",
    Debug:       true,
    AccessAssetsLogOff: true,
    Animation: config.PageAnimation{
      Type: "fadeInUp",
    },
    ColorScheme:    adminlte.ColorschemeSkinBlack,
    BootstrapFilePath: "./../datamodel/bootstrap.go",
  }

  template.AddComp(chartjs.NewChart())

  // customize a plugin

  examplePlugin := example.NewExample()

  // load from golang.Plugin
  //
  // examplePlugin := plugins.LoadFromPlugin("../datamodel/example.so")

  // customize the login page
  // example: https://github.com/GoAdminGroup/demo.go-admin.cn/blob/master/main.go#L39
  //
  // template.AddComp("login", datamodel.LoginPage)

  // load config from json file
  //
  // e.AddConfigFromJSON("../datamodel/config.json")

  if err := e.AddConfig(cfg).
    AddGenerators(datamodel.Generators).
    // add generator, first parameter is the url prefix of table when visit.
    // example:
    //
    // "user" => http://localhost:9033/admin/info/user
    //
    AddGenerator("user", datamodel.GetUserTable).
    AddDisplayFilterXssJsFilter().
    AddPlugins(examplePlugin).
    Use(r); err != nil {
    panic(err)
  }

  r.Static("/uploads", "./uploads")

  // customize your pages

  e.HTML("GET", "/admin", datamodel.GetContent)

  go func() {
    _ = r.Run(":9033")
  }()

  quit := make(chan os.Signal, 1)
  signal.Notify(quit, os.Interrupt)
  <-quit
  log.Print("closing database connection")
  e.MysqlConnection().Close()
}

注意数据库用户名和密码 , 直接运行go run main.go , 在开启go module的情况下 , 所有依赖会自动安装

访问 http://localhost:9033/admin 用户名密码:admin / admin

建一个数据库 , 把数据库sql导进去

# ************************************************************
# Sequel Pro SQL dump
# Version 4468
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.19)
# Database: godmin
# Generation Time: 2019-09-12 04:16:47 +0000
# ************************************************************

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

# Dump of table goadmin_menu
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_menu`;

CREATE TABLE `goadmin_menu` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `parent_id` int(11) unsigned NOT NULL DEFAULT '0',
 `type` tinyint(4) unsigned NOT NULL DEFAULT '0',
 `order` int(11) unsigned NOT NULL DEFAULT '0',
 `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
 `icon` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
 `uri` varchar(3000) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
 `header` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `plugin_name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
 `uuid` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_menu` WRITE;
/*!40000 ALTER TABLE `goadmin_menu` DISABLE KEYS */;

INSERT INTO `goadmin_menu` (`id`, `parent_id`, `type`, `order`, `title`, `icon`, `uri`, `plugin_name`, `header`, `created_at`, `updated_at`)
VALUES
  (1,0,1,2,'Admin','fa-tasks','','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,1,1,2,'Users','fa-users','/info/manager','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (3,1,1,3,'Roles','fa-user','/info/roles','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (4,1,1,4,'Permission','fa-ban','/info/permission','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (5,1,1,5,'Menu','fa-bars','/menu','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (6,1,1,6,'Operation log','fa-history','/info/op','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (7,0,1,1,'Dashboard','fa-bar-chart','/','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_menu` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_operation_log
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_operation_log`;

CREATE TABLE `goadmin_operation_log` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `user_id` int(11) unsigned NOT NULL,
 `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
 `method` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
 `ip` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
 `input` text COLLATE utf8mb4_unicode_ci NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 KEY `admin_operation_log_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

# Dump of table goadmin_site
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_site`;

CREATE TABLE `goadmin_site` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `key` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `value` longtext COLLATE utf8mb4_unicode_ci,
 `description` varchar(3000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `state` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

# Dump of table goadmin_permissions
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_permissions`;

CREATE TABLE `goadmin_permissions` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
 `slug` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
 `http_method` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `http_path` text COLLATE utf8mb4_unicode_ci NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 UNIQUE KEY `admin_permissions_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_permissions` WRITE;
/*!40000 ALTER TABLE `goadmin_permissions` DISABLE KEYS */;

INSERT INTO `goadmin_permissions` (`id`, `name`, `slug`, `http_method`, `http_path`, `created_at`, `updated_at`)
VALUES
  (1,'All permission','*','','*','2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,'Dashboard','dashboard','GET,PUT,POST,DELETE','/','2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_permissions` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_role_menu
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_role_menu`;

CREATE TABLE `goadmin_role_menu` (
 `role_id` int(11) unsigned NOT NULL,
 `menu_id` int(11) unsigned NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 KEY `admin_role_menu_role_id_menu_id_index` (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_role_menu` WRITE;
/*!40000 ALTER TABLE `goadmin_role_menu` DISABLE KEYS */;

INSERT INTO `goadmin_role_menu` (`role_id`, `menu_id`, `created_at`, `updated_at`)
VALUES
  (1,1,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (1,7,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,7,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (1,8,'2019-09-11 10:20:55','2019-09-11 10:20:55'),
  (2,8,'2019-09-11 10:20:55','2019-09-11 10:20:55');

/*!40000 ALTER TABLE `goadmin_role_menu` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_role_permissions
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_role_permissions`;

CREATE TABLE `goadmin_role_permissions` (
 `role_id` int(11) unsigned NOT NULL,
 `permission_id` int(11) unsigned NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 UNIQUE KEY `admin_role_permissions` (`role_id`,`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_role_permissions` WRITE;
/*!40000 ALTER TABLE `goadmin_role_permissions` DISABLE KEYS */;

INSERT INTO `goadmin_role_permissions` (`role_id`, `permission_id`, `created_at`, `updated_at`)
VALUES
  (1,1,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (1,2,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,2,'2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_role_permissions` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_role_users
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_role_users`;

CREATE TABLE `goadmin_role_users` (
 `role_id` int(11) unsigned NOT NULL,
 `user_id` int(11) unsigned NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 UNIQUE KEY `admin_user_roles` (`role_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_role_users` WRITE;
/*!40000 ALTER TABLE `goadmin_role_users` DISABLE KEYS */;

INSERT INTO `goadmin_role_users` (`role_id`, `user_id`, `created_at`, `updated_at`)
VALUES
  (1,1,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,2,'2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_role_users` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_roles
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_roles`;

CREATE TABLE `goadmin_roles` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
 `slug` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 UNIQUE KEY `admin_roles_name_unique` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_roles` WRITE;
/*!40000 ALTER TABLE `goadmin_roles` DISABLE KEYS */;

INSERT INTO `goadmin_roles` (`id`, `name`, `slug`, `created_at`, `updated_at`)
VALUES
  (1,'Administrator','administrator','2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,'Operator','operator','2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_roles` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_session
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_session`;

CREATE TABLE `goadmin_session` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `sid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
 `values` varchar(3000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

# Dump of table goadmin_user_permissions
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_user_permissions`;

CREATE TABLE `goadmin_user_permissions` (
 `user_id` int(11) unsigned NOT NULL,
 `permission_id` int(11) unsigned NOT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 UNIQUE KEY `admin_user_permissions` (`user_id`,`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_user_permissions` WRITE;
/*!40000 ALTER TABLE `goadmin_user_permissions` DISABLE KEYS */;

INSERT INTO `goadmin_user_permissions` (`user_id`, `permission_id`, `created_at`, `updated_at`)
VALUES
  (1,1,'2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,2,'2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_user_permissions` ENABLE KEYS */;
UNLOCK TABLES;

# Dump of table goadmin_users
# ------------------------------------------------------------

DROP TABLE IF EXISTS `goadmin_users`;

CREATE TABLE `goadmin_users` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `username` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
 `password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
 `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
 `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
 `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 UNIQUE KEY `admin_users_username_unique` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

LOCK TABLES `goadmin_users` WRITE;
/*!40000 ALTER TABLE `goadmin_users` DISABLE KEYS */;

INSERT INTO `goadmin_users` (`id`, `username`, `password`, `name`, `avatar`, `remember_token`, `created_at`, `updated_at`)
VALUES
  (1,'admin','$2a$10$U3F/NSaf2kaVbyXTBp7ppOn0jZFyRqXRnYXB.AMioCjXl3Ciaj4oy','admin','','tlNcBVK9AvfYH7WEnwB1RKvocJu8FfRy4um3DJtwdHuJy0dwFsLOgAc0xUfh','2019-09-10 00:00:00','2019-09-10 00:00:00'),
  (2,'operator','$2a$10$rVqkOzHjN2MdlEprRflb1eGP0oZXuSrbJLOmJagFsCd81YZm0bsh.','Operator','',NULL,'2019-09-10 00:00:00','2019-09-10 00:00:00');

/*!40000 ALTER TABLE `goadmin_users` ENABLE KEYS */;
UNLOCK TABLES;

/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

总结

到此这篇关于GoAdminGroup/go-admin的安装和运行的教程详解的文章就介绍到这了,更多相关go-admin 安装和运行内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • 使用django-guardian实现django-admin的行级权限控制的方法

    用django框架来做一些后台管理的web页面简直太方便了,django自带模块级的权限系统,用来做一些内部的系统非常合适,可以大大的减少开发量.但是django自带的权限系统还不支持行级的权限控制,如果要实现行级的权限控制,需要依赖第三方的app来开发,或者自己重新写一个. 需求描述 我们项目组开发的一些系统通常会用mysql数据库来存储一些配置,但是如果每次有配置修改的时候都去手动修改mysql数据的话,会挺麻烦的,同时也比较容易出错.django-admin能够根据定义的model自动的生

  • GoAdminGroup/go-admin的安装和运行的教程详解

    使用这个GoAdminGroup/go-admin框架的最简单的例子就可以把项目运行起来 , go-admin 是以扩展库的形式使用的. 建一个main.go package main import ( "io/ioutil" "log" "os" "os/signal" _ "github.com/GoAdminGroup/go-admin/adapter/gin" _ "github.com/

  • MongoDB4.0在windows10下的安装与服务配置教程详解

    本地安装及网页测试 1.在官网下载最新的安装文件 下载地址 : https://www.mongodb.com/download-center#community 可以在MongoDB官网选择Community Server版本下载,但是它似乎经常没有响应.可以在这里直接选择需要的版本下载,要在Windows下安装可以直接选msi安装文件. 安装msi文件 下载好后,一致next,在中间一步选择 custom 选项,以选定自己喜好的安装位置 修改安装路径. 这个MSI文件有问题,这里必须不能改动

  • linux 编译安装python3.6的教程详解

    1. 首先去官网  https://www.python.org/downloads/source/ 下载 Gzipped source tarball 不要下载 " XZ compressed source tarball " ,目前 python3.6 最新版压缩包名字是:Python-3.6.7.tgz. 把下载的压缩包随便放到一个地方,也可以放到桌面(便于安装过后删除安装包和解压后的安装包). 2. 命令行切换到上面压缩文件所在的目录(比如桌面),然后输入 tar -xzf P

  • 在 CentOS 7 中安装 MySQL 8 的教程详解

    准备 本文环境信息: 软件 版本 CentOS CentOS 7.4 MySQL 8.0.x 安装前先更新系统所有包 sudo yum update 安装 1. 添加 Yum 包 wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm # 或者 wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm sudo yum up

  • vue cli安装使用less的教程详解

    vue-cli构建的项目默认是不支持less的,需要自己添加依赖 1.安装less和less-loader ,在项目目录下运行如下命令 npm install less less-loader --save-dev 2.安装成功后,打开build/webpack.base.conf.js ,在 module.exports = 的对象的module.rules 后面添加一段: module.exports = { // 此处省略无数行,已有的的其他的内容 module: { rules: [ /

  • CentOS7 下载安装Tomcat 9的教程详解

    tomcat 不多解释,直接开车: 1.官网下载安装包 将tomcat 安装到  /usr/local/tomcat/   目录下 cd /usr/local/ mkdir tomcat/ cd tomcat/ wget http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.0.M18/bin/apache-tomcat-9.0.0.M18.tar.gz 2.解压 ,执行以下命令 tar -zxvf apache-tomcat-9.0.0.M18

  • Python 安装 virturalenv 虚拟环境的教程详解

    一.概述 有时候会在一台主机上安装多个不同的Python版本,用以运行不同时期开发的项目, 而在这些不同的Python版本上有时又会加装不同的库和包.因此需要一种工具来管理各个不同的Python版本和运行环境. virtualenv工具可以为每个Python项目创建一个"独立隔离"的虚拟Python运行环境,而且每个项目都可以为自己独立的Python 运行环境加装不同的扩展包和库,而不影响其他项目. 在使用virtualenv之前,首先需要保证你的操作系统上已经安装了所需的Python

  • PyQt5+Pycharm安装和配置图文教程详解

    PyQt5安装 之前安装过anaconda,里面是含有pyqt的,在环境里搜索可以看到,但是针对实际开发,并没有全部的qt5工具,所以需要再次安装. 在cmd里面运行: pip install PyQt5 -i https://pypi.douban.com/simple 安装常用的Qt工具: pip install PyQt5-tools -i https://pypi.douban.com/simple 在C:\Users\Administrator\Anaconda3\Lib\site-p

  • PyCharm2020.1.2社区版安装,配置及使用教程详解(Windows)

    本文内容皆为作者原创,码字不易,如需转载,请注明出处:https://www.cnblogs.com/temari/p/13048977.html 前提:本篇为PyCharm2020.1.2社区版安装,配置及使用教程,建议阅读本篇教程前先安装python,未安装的小伙伴可参看上一篇博客,链接:https://www.cnblogs.com/temari/p/13044416.html 下面开始本次安装教程: PyCharm分为专业版,教育版和社区版,专业版是收费的,教育版和社区版免费.专业版适用

  • 最新版Eclipse安装、配置图文教程详解

    新版Eclipse安装.配置,需要可收藏! 1.去Oracle官网下载一个版本的JDK 注意选适合自己系统的 下载链接:https://www.oracle.com/java/technologies/javase-downloads.html 2.下载好后双击打开 3.下一步 4.记住安装的路径后面会用到!!! 5.关闭 6.配置环境变量,如果不设置PATH变量,则每次运行可执行文件时都必须指定该文件的完整路径 点击桌面的 '此电脑'之后点击箭头处,打开电脑属性 选择高级系统设置 选择环境变量

随机推荐