prepare env
yum install python3 yum-utils -y
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
systemctl enable docker && service docker start
systemctl disable firewalld && service firewalld stop
Download the cephadm script
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/pacific/src/cephadm/cephadm
chmod +x cephadm
Configure the Ceph repository based on the release name:
./cephadm add-repo --release Octopus
#https://docs.ceph.com/en/latest/releases/index.html
Install the appropriate packages. You can install them using your package management tool (e.g., APT, Yum) directly, or you can also use the cephadm wrapper. For example:
sudo rpm --import 'https://download.ceph.com/keys/release.asc'
./cephadm install
./cephadm install ceph-common
The ceph-deploy tool operates out of a directory on an admin node. Any host with network connectivity and a modern python environment and ssh (such as Linux) should work.
register the target machine with subscription-manager, verify your subscriptions, and enable the “Extras” repository for package dependencies. For example:
yum install subscription-manager -y
sudo subscription-manager repos --enable=rhel-7-server-extras-rpms
Install and enable the Extra Packages for Enterprise Linux (EPEL) repository:
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Add the Ceph repository to your yum configuration file at /etc/yum.repos.d/ceph.repo with the following command. Replace {ceph-stable-release} with a stable Ceph release (e.g., luminous.) For example:
cat << EOM > /etc/yum.repos.d/ceph.repo
[ceph-noarch]
name=Ceph noarch packages
baseurl=https:
Check if SSH client service is enabled. Will return 'False' if 'Disabled'.
esxcli network firewall ruleset list --ruleset-id sshClient
Then enable SSH client.
esxcli network firewall ruleset set --ruleset-id sshClient --enabled=true
List disk
df -hl
copy file between esxi
scp -r workspace/ 192.168.0.111:/vmfs/volumes/datastore1
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/unregister 13
MicroK8s is the smallest, fastest, fully-conformant Kubernetes that tracks upstream releases and makes clustering trivial. MicroK8s is great for offline development, prototyping, and testing.
snapd
For Centos7
service firewall stop && systemctl disable firewalld
yum install epel-release
yum install snapd
systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
MicroK8s will install a minimal, lightweight Kubernetes you can run and use on practically any machine. It can be installed with a snap:
snap install microk8s --classic --channel=1.21/stable
snap install microk8s --classic --channel=1.19/stable
#from 1.21 to 1.19
snap refresh --classic --channel=1.19/stable microk8s
All the currently available channels are shown if you run
snap info m
Debian / Ubuntu:
apt-get install python-pip
pip install shadowsocks
CentOS:
yum install python-setuptools && easy_install pip
#curl -o get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && python get-pip.py
pip install shadowsocks
Windows:
See [Install Server on Windows]
ssserver -p 443 -k password -m aes-256-cfb
To run in the background:
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
ssserver --log-file /var/log/shadowsocks-12300.log --pid-file /var/run/shadowsocks-12300.pid --user nobody -p 12300 -k password -m aes-256-cfb -s 0.0.0.0 -d start
To stop:
sudo ssserver -d stop
To check the log:
sudo less /var/log/shadowsocks.log
Check all the options via -h
. You can also use a [Configuration] file
instead.
Use GUI clients on your local PC/phones. Check the README of your client
for more information.
yum install ntp
vi /etc/ntp.conf
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst
server ntp3.aliyun.com iburst
systemctl enable ntpd
systemctl start ntpd
wget https://archive.apache.org/dist/hadoop/core/hadoop-2.7.5/hadoop-2.7.5.tar.gz
tar zxvf hadoop-2.7.5.tar.gz
cd hadoop-2.7.5/
Config Env
vi .bashrc
export JAVA_HOME=/opt/jdk1.8.0_202
export HADOOP_PID_DIR=/data/hadooptemp
Configure slaves
vi slaves
test01
test02
test03
Configure core-site.xml
mkdir /data/hadoop
mkdir /data/hadooptemp
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/data/hadoop</value>
<description>
A base for other temporary directories.
</description>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://cluster01</value>
<descr
MongoDB only supports the 64-bit versions of these platforms.
Follow these steps to install MongoDB Community Edition using the yum package manager.
Create a /etc/yum.repos.d/mongodb-org-4.4.repo
file so that you can install MongoDB directly using yum
:
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
To install the latest stable version of MongoDB, issue the following command:
sudo yum install -y mongodb-org
Alternatively, to install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
sudo yum install -y mongodb-org-4.4.11 mongodb-org-server-4.4.11 mongodb-org-shell-4.4.11 mongodb-org-mongos-4.4.11 mongodb-org-tools-4.4.11
You can specify
Make sure that git is installed.
Run this command to download and install krew:
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)
Add the $HOME/.krew/bin directory to your PATH environment variable. To do this, update your .bashrc or .zshrc file and append the following line:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
and restart your shell.
Run kubectl krew to check the installation.
export HTTP_PROXY=http://192.168.0.201:6666
export HTTPS_PROXY=http://192.168.0.201:6666
kubectl krew install ctx
kubectl krew install ns
Download the latest Kafka release and extract it:
wget https://dlcdn.apache.org/kafka/3.1.0/kafka_2.12-3.1.0.tgz --no-check-certificate
Config Kafka Broker server.properties
#broker.id=0
log.dirs=/data/kafka
zookeeper.connect=test01:2181,test02:2181,test03:2181/kafka
Copy To All Nodes
scp -r kafka_2.12-3.1.0/ test02:~
scp -r kafka_2.12-3.1.0/ test03:~
Start kafka service
ssh test01 'cd kafka_2.12-3.1.0 && bin/kafka-server-start.sh -daemon config/server.properties'
ssh test02 'cd kafka_2.12-3.1.0 && bin/kafka-server-start.sh -daemon config/server.properties'
ssh test03 'cd kafka_2.12-3.1.0 && bin/kafka-server-start.sh -daemon config/server.properties'
Run Kafka Ui
with kafka-ui
docker run -d --name=kafkaui -p 19092:8080 \
--add-host test01:192.168.0.161 \
--add-host test02:192.168.0.162 \
--add-host test03:192.168.0.163 \
-e KAFKA_CLUSTERS_0_NAME=kafka01 \
-e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=test01:90
Install
yum install bind bind-utils
backup named.conf file
cp /etc/named.conf /etc/named.conf.bak
configure named.conf
listen-on port 53 { 127.0.0.1; 192.168.0.201; };
allow-query { any; };
zone "louyj.com" IN{
type master;
file "louyj.com.zone";
};
type:
add zone
vi /var/named/louyj.com.zone
$TTL 1D
@ IN SOA ns1.louyj.com. ns2.louyj.com. (
0;serial
1D;refresh
1H;retry
1W;expire
3H;minimum
);
@ IN NS ns1
@ IN NS ns2
ns1 IN A 192.168.0.201
ns2 IN A 192.168.0.200
www IN A 192.168.0.201
esxi IN A 192.168.0.201
cloud IN A 192.168.0.201
image IN A 192.168.0.201
media IN A 192.168.0.201
no