Category Archives: Linux

[Solved] Centos8 Install ntpdate Error: No match for argument: ntpdate

In the centos8 system, the original time synchronization service NTP/ntpdate service is no longer available. Install it using Yum and the prompt no longer exists

Previous versions: Yum install – y NTP

centos8:yum -y install chrony

At this time, the temporary synchronization time method is: chronyd – Q ‘server NTP ntsc. ac.cn iburst’

[Solved] fatal: unable to connect to gitee.com: gitee.com[0: 180.97.125.228]: errno=Unknown error

fatal: unable to connect to gitee. com:
go. com[0: 180.97.125.228]: errno=Unknown error

Solution:

Find the .gitconfig file directly, delete these configurations, and you can push normally

[url "[email protected]"]
insteadOf = https://github.com/:
[url "git://"]
insteadOf = https://
[url "https://"]
insteadOf = git:/ /

CentOS8 Failed to start docker.service: Unit docker.service not found [How to Solve]

The reason for this problem is the podman in CentOS 8. Podman is a docker like software preinstalled in CentOS 8, so you don’t need to uninstall it directly
solution:

dnf remove podman

Then reinstall docker

sudo yum install -y yum-utils  device-mapper-persistent-data  lvm2
 
sudo yum-config-manager  --add-repo   https://download.docker.com/linux/centos/docker-ce.repo
 
sudo yum install -y docker-ce docker-ce-cli containerd.io

Set startup and self startup

sudo systemctl enable docker

Oh!

Linux Vsftp error: TP folder error [How to Solve]

[FTP solution] vsftpd (FTP server) problem of windows accessing Ubuntu 200 switching to ASCII mode, 227 entering passive mode (0,0,0

Question: as follows,

—————————
FTP folder error
———————————————-
an error occurred while opening the folder on the FTP server. Check that you have permission to access the folder.

Details:
200 switching to ASCII mode
227 Entering Passive Mode (0,0,0,0,227,175).
———————————————–
OK
—————————

Solution:

A rather bullshit approach

Operating under Windows:

Open network and sharing center and find Internet Options -> [advanced] this page,

Cancel “use passive FTP (compatible with firewall and DSL modem)”

[Solved] SSH connect error: permission denied, please try again

Permission denied, please try again. Error is reported as follows

When using SSH to log in to ECS (elastic compute server) Linux server, if you are the root user, even if you enter the password correctly, the following error messages will appear.

Permission denied, please try again.

The ssh server rejected the password. Please try again.

However, non-root users can log in normally, and root users can log in normally through the management terminal.

The reason for the problem is that the server SSH service is configured with the policy of prohibiting root user login.

If this parameter is not configured, or if the parameter value is set to Yes (default), root user login is allowed. Root user login will be blocked only when the displayed setting is No.

This parameter only affects the user’s SSH login, and does not affect the user’s login to the system through management terminal and other methods.

service sshd restart
restart sshd

Then try again.

[Solved] CentOS 8 Insltall Docker Error: Problem: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.

CentOS8 install docker and docer-conpose
Error:
Problem: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed

1.upgrade yum

yum update

2. Installation dependent environment

yum install -y yum-utils device-mapper-persistent-data lvm2

3. Add docker source

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

4. Install docker CE

yum install  docker-ce

Error:
Problem: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
Need to install the latest version of containerd.io

dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

4. Install docker ce again

yum install  docker-ce

View the docker version

docker -v

5. Directly pull docker compose on GitHub

curl -L https://github.com/docker/compose/releases/download/1.24.0-rc1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

6. Grant authority

 chmod +x /usr/local/bin/docker-compose

After installation, check the version

docker-compose --version

[Solved] Nginx Error: could not build server_names_hash, you should increase server_names_hash_bucket_size

I’m setting up a new server. The HTTP server I selected is nginx. I already have 2 domains. It works normally, but when I try to add the above domain and start the server, the following error is reported

nginx: [emerg] could not build server_names_hash, you should increase server_nam 
es_hash_bucket_size: 32

Directly in nginx Add the following code to HTTP of conf

server_names_hash_bucket_size  512;

[Solved] Connect to Ubuntu Error Via xshell: Could not connect to ‘xxxxx’ (port 22)

Unable to connect to XXX when connecting to Ubuntu with xshell

At first, I thought it was a port problem. So port 22 was opened

firewall-cmd --zone=public --add-port=22/tcp --permanent

Then it still reports an error when it is used again.

zheng@ubuntu:~$ ps -e|grep ssh

  5548 ?       00:00:00 ssh-agent


The query is with an agent's end



So you need to install the server side
sudo apt-get install openssh-server

Next, check again
zheng@ubuntu:~$ ps -e|grep ssh
  5548 ?       00:00:00 ssh-agent
  9744 ?       00:00:00 sshd


That'll do it!

Later, I found that it was because I didn’t install the server side of SSH.