猫言猫语

严以律己·宽以待人·自强不息·知行合一

K3s 安装时手动指定节点 IP

| K3s 安装时手动指定节点 IP已关闭评论

在使用多网卡服务器安装 K3s 时,默认会使用第一张网卡作为节点 IP 地址,如果第一张网卡的网络不通,就会造成非预期的结果。

我们可以在安装时手动指定 –node-ip 参数来指定节点 IP,规避这一问题。

curl -sfL https://get.k3s.io | sh -s - --node-ip=192.168.33.110

CentOS 7 安装 PostgreSQL 9.6

| CentOS 7 安装 PostgreSQL 9.6已关闭评论

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql96
yum install -y postgresql96-server
/usr/pgsql-9.6/bin/postgresql96-setup initdb
systemctl enable postgresql-9.6
systemctl start postgresql-9.6

CentOS 7 安装 PostgreSQL 9.2

| CentOS 7 安装 PostgreSQL 9.2已关闭评论

yum install -y postgresql-server
postgresql-setup initdb
systemctl restart postgresql
systemctl enable postgresql
su - postgres
psql
\list
CREATE DATABASE demodb;
\connect demodb
CREATE TABLE demotable(title char(32));
INSERT INTO demotable (title) VALUES('title');
SELECT * FROM demotable;
\quit

CentOS 7 安装 Docker 20.10.2

| CentOS 7 安装 Docker 20.10.2已关闭评论

yum install -y yum-utils
yum-config-manager \
  --add-repo \
  https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io
systemctl start docker
systemctl enable docker
docker run hello-world

使 OpenLDAP 支持 bcrypt 密码

| 使 OpenLDAP 支持 bcrypt 密码已关闭评论

一、编译 openldap 源码

yum install -y wget git libtool libdb-devel libtool-ltdl-devel krb5-devel
wget https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.57.tgz
tar zxvf openldap-2.4.57.tgz
cd openldap-2.4.57
./configure --libdir=/usr/lib64 --enable-modules
make depend
make
(更多…)

CentOS 7 安装 MySQL 8.0

| CentOS 7 安装 MySQL 8.0已关闭评论

yum install -y https://repo.mysql.com/mysql-community-release-el7.rpm
yum install -y mysql-community-server
systemctl enable mysqld
systemctl start mysqld

# 找临时密码
cat /var/log/mysqld.log

mysql -p 输入密码

set global validate_password.policy=0;
set global validate_password.length=1;
alter user 'root'@'localhost' identified by '新密码';

mysql -u root -p

macOS 手动安装 oh-my-zsh

| macOS 手动安装 oh-my-zsh已关闭评论

git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

Portainer 快速上手

| Portainer 快速上手已关闭评论

docker volume create portainer_data
docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer