有道词典 for Catalina

macOS 更新 Catalina 之后有道词典闪退的解决办法 打开系统偏好设置 => 语言与地区 => App => 点击+号 => 选择有道词典,语言设置成英语

November 3, 2019 · 1 min · K8sCat

NuxtJS 自定义 layout

NuxtJS 的 SPA 项目怎么处理不同的布局? # Use the layout key in your pages components to define which layout to use: # In this example, Nuxt.js will include the layouts/blog.vue file as a layout for this page component. export default { layout: 'blog', // OR layout (context) { return 'blog' } } Refer: API: The layout Property

November 2, 2019 · 1 min · K8sCat

不到10分钟搞定 CentOS7 部署 HBase

Apache HBase™ is the Hadoop database, a distributed, scalable, big data store. Use Apache HBase™ when you need random, realtime read/write access to your Big Data. This project’s goal is the hosting of very large tables – billions of rows X millions of columns – atop clusters of commodity hardware. Apache HBase is an open-source, distributed, versioned, non-relational database modeled after Google’s Bigtable: A Distributed Storage System for Structured Data by Chang et al....

November 1, 2019 · 3 min · K8sCat

基于 Vagrant + CentOS7 伪分布式与分布式部署 Hadoop

The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures....

October 31, 2019 · 4 min · K8sCat

Linux 给用户添加 sudo 权限

CentOS7 上新建一个用户(useradd test), 执行命令 sudo yum update, 提示 test 不在 sudoers 文件中。此事将被报告。, 那就添加吧! Q: 什么是 sudo ? 有什么用? A: Sudoers allows particular users to run various commands as the root user, without needing the root password. # 切换到root或者可以执行sudo命令的用户下, 然后编辑 /etc/sudoers sudo vi /etc/sudoers # 添加以下内容(需要使用 :wq! 强制保存) test ALL=(ALL) ALL

October 29, 2019 · 1 min · K8sCat

MySQL8 重置密码

MySQL8 忘记密码怎么办? sudo vi /etc/mysql/my.cnf # 添加以下内容 [mysqld] skip-grant-tables # 保存后重启MySQL sudo service mysqld restart # 无密码进入MySQL mysql -uroot -p mysql> alter user 'root'@'%' identified by ''; mysql> flush privileges; mysql> exit # 将配置文件复原 sudo vi /etc/mysql/my.cnf # 注释掉之前添加的内容, 修改为以下内容 [mysqld] # skip-grant-tables # 重启MySQL sudo service mysqld restart # 空密码进入MySQL mysql -uroot -p mysql> alter user 'root'@'%' identified by '123456' mysql> flush privileges; 参考: CentOS 安装 MySQL mysql什么时候需要flush privileges

October 29, 2019 · 1 min · K8sCat

CentOS 安装 MySQL

MySQL 被 Oracle 收购后,CentOS 的镜像仓库中提供的默认的数据库也变为了 MariaDB, 那如何在 CentOS 上如何安装 MySQL 呢? 现在一般都是用 Docker, 跑个 MySQL: docker run -d --name mysql8 -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 mysql:8. 本文安装的是 MySQL8 # CentOS7 阿里源 sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo sudo yum update -y # centos7 # 下载mysql的rpm包: https://dev.mysql.com/downloads/repo/yum/ wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm # 安装rpm包 sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm # 安装MySQL sudo yum install mysql-community-server # 启动MySQL sudo service mysqld start # 查看MySQL状态 # service mysqld status # 获取临时密码 sudo cat /var/log/mysqld....

October 28, 2019 · 3 min · K8sCat

pip 配置源

pip 可以通过配置国内源加快安装依赖的速度, 可以直接舔加 -i 参数, 但是每次安装依赖都要添加很麻烦, 所以可以通过修改配置文件, 这样以后安装依赖就不需要添加了,但不同的系统的配置文件所在的位置不同(Mac: ~/.config/pip/pip.conf, Windows: ~/AppData/Roaming/pip/pip.ini), 可以通过 pip config 达到不同系统下修改配置的目的. pip 国内的一些镜像 阿里云 https://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/ 修改源方法: 临时使用: 可以在使用pip的时候在后面加上-i参数,指定pip源 eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple 配置文件 Linux 修改 ~/.pip/pip.conf (没有就创建一个), 内容如下: [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.tsinghua.edu.cn Windows: 直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下 [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.tsinghua.edu.cn 命令行方式 pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/

October 20, 2019 · 1 min · K8sCat