模版
root@192.168.235.130's password:┌──────────────────────────────────────────────────────────────────────┐│ • MobaXterm Personal Edition v23.2 • ││ (SSH client, X server and network tools) ││ ││ ⮞ SSH session to root@192.168.235.130 ││ • Direct SSH : ✓ ││ • SSH compression : ✓ ││ • SSH-browser : ✓ ││ • X11-forwarding : ✗ (disabled or not supported by server) ││ ││ ⮞ For more info, ctrl+click on help or visit our website. │└──────────────────────────────────────────────────────────────────────┘Last login: Fri Jul 11 20:17:22 2025
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defau lt qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 00:0c:29:72:7b:20 brd ff:ff:ff:ff:ff:ffinet 192.168.235.130/24 brd 192.168.235.255 scope global noprefixroute ens3 3valid_lft forever preferred_lft foreverinet6 fe80::20c:29ff:fe72:7b20/64 scope linkvalid_lft forever preferred_lft forever
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# setenforce 0
[root@localhost ~]# vim /etc/selinux/config
-bash: vim: command not found
[root@localhost ~]# vi /etc/selinux/config
[root@localhost ~]# cat /etc/selinux/config# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are pr otected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_ 64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
repo id repo name status
base/7/x86_64 CentOS-7 - Base 0
extras/7/x86_64 CentOS-7 - Extras 0
updates/7/x86_64 CentOS-7 - Updates 0
repolist: 0
[root@localhost ~]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_ 64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"One of the configured repositories failed (Unknown),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem .2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=tru eCannot find a valid baseurl for repo: base/7/x86_64
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# cat CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[root@localhost yum.repos.d]# LS
-bash: LS: command not found
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# tar -zcf repo.tar.gz *.repo
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo repo.tar.gz
[root@localhost yum.repos.d]# rm -rf *.repo
[root@localhost yum.repos.d]# ls
repo.tar.gz
[root@localhost yum.repos.d]# ls /mnt
[root@localhost yum.repos.d]# mount -o ro /dev/sr0 /mnt
mount: no medium found on /dev/sr0
[root@localhost yum.repos.d]# mount -o ro /dev/sr0 /mnt
[root@localhost yum.repos.d]# ls
repo.tar.gz
[root@localhost yum.repos.d]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part├─centos-root 253:0 0 17G 0 lvm /└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sr0 11:0 1 4.4G 0 rom /mnt
[root@localhost yum.repos.d]# chmod +x /etc/rc.local
[root@localhost yum.repos.d]# echo 'mount -o ro /etc/sr0 /mnt'>>/etc/rc.local
[root@localhost yum.repos.d]# ls
repo.tar.gz
[root@localhost yum.repos.d]# vim local.repo
-bash: vim: command not found
[root@localhost yum.repos.d]# vi local.repo
[root@localhost yum.repos.d]# cat local.repo
[local]
name=local name
baseurl=file:\\\mnt
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: local
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
file:///%5Cmnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /% 5Cmnt/repodata/repomd.xml"
Trying other mirror.One of the configured repositories failed (local name),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem .2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=local ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable localorsubscription-manager repos --disable=local5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=local.skip_if_unavailable=truefailure: repodata/repomd.xml from local: [Errno 256] No more mirrors to try.
file:\mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /%5Cmnt /repodata/repomd.xml"
[root@localhost yum.repos.d]# cat local.repo
[local]
name=local name
baseurl=file:\\\mnt
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# vi local.repo
[root@localhost yum.repos.d]# cat local.repo
[local]
name=local name
baseurl=file:///mnt
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: local
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
local | 3.6 kB 00:00:00
(1/4): local/group_gz | 153 kB 00:00:00
(2/4): local/primary_db | 3.3 MB 00:00:00
(3/4): local/filelists_db | 3.3 MB 00:00:00
(4/4): local/other_db | 1.3 MB 00:00:00
Metadata Cache Created
[root@localhost yum.repos.d]# yum install bash-completion vim net-tools ntpdate -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 1:2.1-8.el7 will be installed
---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
---> Package ntpdate.x86_64 0:4.2.6p5-29.el7.centos.2 will be installed
---> Package vim-enhanced.x86_64 2:7.4.629-7.el7 will be installed
--> Processing Dependency: vim-common = 2:7.4.629-7.el7 for package: 2:vim-enhanced-7.4.629-7.el7.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.629-7.el7.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-6.el7 will be installed
---> Package vim-common.x86_64 2:7.4.629-7.el7 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.629-7.el7.x86_64
--> Running transaction check
---> Package vim-filesystem.x86_64 2:7.4.629-7.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved=======================================================================================Package Arch Version Repository Size
=======================================================================================
Installing:bash-completion noarch 1:2.1-8.el7 local 87 knet-tools x86_64 2.0-0.25.20131004git.el7 local 306 kntpdate x86_64 4.2.6p5-29.el7.centos.2 local 87 kvim-enhanced x86_64 2:7.4.629-7.el7 local 1.1 M
Installing for dependencies:gpm-libs x86_64 1.20.7-6.el7 local 32 kvim-common x86_64 2:7.4.629-7.el7 local 5.9 Mvim-filesystem x86_64 2:7.4.629-7.el7 local 11 kTransaction Summary
=======================================================================================
Install 4 Packages (+3 Dependent packages)Total download size: 7.5 M
Installed size: 25 M
Downloading packages:
---------------------------------------------------------------------------------------
Total 20 MB/s | 7.5 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : gpm-libs-1.20.7-6.el7.x86_64 1/7Installing : 2:vim-filesystem-7.4.629-7.el7.x86_64 2/7Installing : 2:vim-common-7.4.629-7.el7.x86_64 3/7Installing : 2:vim-enhanced-7.4.629-7.el7.x86_64 4/7Installing : ntpdate-4.2.6p5-29.el7.centos.2.x86_64 5/7Installing : net-tools-2.0-0.25.20131004git.el7.x86_64 6/7Installing : 1:bash-completion-2.1-8.el7.noarch 7/7Verifying : 2:vim-common-7.4.629-7.el7.x86_64 1/7Verifying : 2:vim-filesystem-7.4.629-7.el7.x86_64 2/7Verifying : 1:bash-completion-2.1-8.el7.noarch 3/7Verifying : net-tools-2.0-0.25.20131004git.el7.x86_64 4/7Verifying : gpm-libs-1.20.7-6.el7.x86_64 5/7Verifying : ntpdate-4.2.6p5-29.el7.centos.2.x86_64 6/7Verifying : 2:vim-enhanced-7.4.629-7.el7.x86_64 7/7Installed:bash-completion.noarch 1:2.1-8.el7 net-tools.x86_64 0:2.0-0.25.20131004git.el7ntpdate.x86_64 0:4.2.6p5-29.el7.centos.2 vim-enhanced.x86_64 2:7.4.629-7.el7Dependency Installed:gpm-libs.x86_64 0:1.20.7-6.el7 vim-common.x86_64 2:7.4.629-7.el7vim-filesystem.x86_64 2:7.4.629-7.el7Complete!
[root@localhost yum.repos.d]# ntpdate 120.25.108.11
11 Jul 20:41:39 ntpdate[1991]: no server suitable for synchronization found
[root@localhost yum.repos.d]#
root@192.168.235.130's password:┌──────────────────────────────────────────────────────────────────────┐│ • MobaXterm Personal Edition v23.2 • ││ (SSH client, X server and network tools) ││ ││ ⮞ SSH session to root@192.168.235.130 ││ • Direct SSH : ✓ ││ • SSH compression : ✓ ││ • SSH-browser : ✓ ││ • X11-forwarding : ✗ (disabled or not supported by server) ││ ││ ⮞ For more info, ctrl+click on help or visit our website. │└──────────────────────────────────────────────────────────────────────┘Last login: Fri Jul 11 20:17:22 2025
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defau lt qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope hostvalid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000link/ether 00:0c:29:72:7b:20 brd ff:ff:ff:ff:ff:ffinet 192.168.235.130/24 brd 192.168.235.255 scope global noprefixroute ens3 3valid_lft forever preferred_lft foreverinet6 fe80::20c:29ff:fe72:7b20/64 scope linkvalid_lft forever preferred_lft forever
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# setenforce 0
[root@localhost ~]# vim /etc/selinux/config
-bash: vim: command not found
[root@localhost ~]# vi /etc/selinux/config
[root@localhost ~]# cat /etc/selinux/config# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are pr otected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_ 64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
repo id repo name status
base/7/x86_64 CentOS-7 - Base 0
extras/7/x86_64 CentOS-7 - Extras 0
updates/7/x86_64 CentOS-7 - Updates 0
repolist: 0
[root@localhost ~]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# yum install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_ 64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"One of the configured repositories failed (Unknown),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem .2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=tru eCannot find a valid baseurl for repo: base/7/x86_64
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# cat CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep o=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7[root@localhost yum.repos.d]# LS
-bash: LS: command not found
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
[root@localhost yum.repos.d]# tar -zcf repo.tar.gz *.repo
[root@localhost yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo repo.tar.gz
[root@localhost yum.repos.d]# rm -rf *.repo
[root@localhost yum.repos.d]# ls
repo.tar.gz
[root@localhost yum.repos.d]# ls /mnt
[root@localhost yum.repos.d]# mount -o ro /dev/sr0 /mnt
mount: no medium found on /dev/sr0
[root@localhost yum.repos.d]# mount -o ro /dev/sr0 /mnt
[root@localhost yum.repos.d]# ls
repo.tar.gz
[root@localhost yum.repos.d]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part├─centos-root 253:0 0 17G 0 lvm /└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sr0 11:0 1 4.4G 0 rom /mnt
[root@localhost yum.repos.d]# chmod +x /etc/rc.local
[root@localhost yum.repos.d]# echo 'mount -o ro /etc/sr0 /mnt'>>/etc/rc.local
[root@localhost yum.repos.d]# ls
repo.tar.gz
[root@localhost yum.repos.d]# vim local.repo
-bash: vim: command not found
[root@localhost yum.repos.d]# vi local.repo
[root@localhost yum.repos.d]# cat local.repo
[local]
name=local name
baseurl=file:\\\mnt
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: local
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
file:///%5Cmnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /% 5Cmnt/repodata/repomd.xml"
Trying other mirror.One of the configured repositories failed (local name),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem .2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=local ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable localorsubscription-manager repos --disable=local5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=local.skip_if_unavailable=truefailure: repodata/repomd.xml from local: [Errno 256] No more mirrors to try.
file:\mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /%5Cmnt /repodata/repomd.xml"
[root@localhost yum.repos.d]# cat local.repo
[local]
name=local name
baseurl=file:\\\mnt
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# vi local.repo
[root@localhost yum.repos.d]# cat local.repo
[local]
name=local name
baseurl=file:///mnt
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: local
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
local | 3.6 kB 00:00:00
(1/4): local/group_gz | 153 kB 00:00:00
(2/4): local/primary_db | 3.3 MB 00:00:00
(3/4): local/filelists_db | 3.3 MB 00:00:00
(4/4): local/other_db | 1.3 MB 00:00:00
Metadata Cache Created
[root@localhost yum.repos.d]# yum install bash-completion vim net-tools ntpdate -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 1:2.1-8.el7 will be installed
---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
---> Package ntpdate.x86_64 0:4.2.6p5-29.el7.centos.2 will be installed
---> Package vim-enhanced.x86_64 2:7.4.629-7.el7 will be installed
--> Processing Dependency: vim-common = 2:7.4.629-7.el7 for package: 2:vim-enhanced-7.4.629-7.el7.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.629-7.el7.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-6.el7 will be installed
---> Package vim-common.x86_64 2:7.4.629-7.el7 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.629-7.el7.x86_64
--> Running transaction check
---> Package vim-filesystem.x86_64 2:7.4.629-7.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved=======================================================================================Package Arch Version Repository Size
=======================================================================================
Installing:bash-completion noarch 1:2.1-8.el7 local 87 knet-tools x86_64 2.0-0.25.20131004git.el7 local 306 kntpdate x86_64 4.2.6p5-29.el7.centos.2 local 87 kvim-enhanced x86_64 2:7.4.629-7.el7 local 1.1 M
Installing for dependencies:gpm-libs x86_64 1.20.7-6.el7 local 32 kvim-common x86_64 2:7.4.629-7.el7 local 5.9 Mvim-filesystem x86_64 2:7.4.629-7.el7 local 11 kTransaction Summary
=======================================================================================
Install 4 Packages (+3 Dependent packages)Total download size: 7.5 M
Installed size: 25 M
Downloading packages:
---------------------------------------------------------------------------------------
Total 20 MB/s | 7.5 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : gpm-libs-1.20.7-6.el7.x86_64 1/7Installing : 2:vim-filesystem-7.4.629-7.el7.x86_64 2/7Installing : 2:vim-common-7.4.629-7.el7.x86_64 3/7Installing : 2:vim-enhanced-7.4.629-7.el7.x86_64 4/7Installing : ntpdate-4.2.6p5-29.el7.centos.2.x86_64 5/7Installing : net-tools-2.0-0.25.20131004git.el7.x86_64 6/7Installing : 1:bash-completion-2.1-8.el7.noarch 7/7Verifying : 2:vim-common-7.4.629-7.el7.x86_64 1/7Verifying : 2:vim-filesystem-7.4.629-7.el7.x86_64 2/7Verifying : 1:bash-completion-2.1-8.el7.noarch 3/7Verifying : net-tools-2.0-0.25.20131004git.el7.x86_64 4/7Verifying : gpm-libs-1.20.7-6.el7.x86_64 5/7Verifying : ntpdate-4.2.6p5-29.el7.centos.2.x86_64 6/7Verifying : 2:vim-enhanced-7.4.629-7.el7.x86_64 7/7Installed:bash-completion.noarch 1:2.1-8.el7 net-tools.x86_64 0:2.0-0.25.20131004git.el7ntpdate.x86_64 0:4.2.6p5-29.el7.centos.2 vim-enhanced.x86_64 2:7.4.629-7.el7Dependency Installed:gpm-libs.x86_64 0:1.20.7-6.el7 vim-common.x86_64 2:7.4.629-7.el7vim-filesystem.x86_64 2:7.4.629-7.el7Complete!
[root@localhost yum.repos.d]# ntpdate 120.25.108.11
11 Jul 20:41:39 ntpdate[1991]: no server suitable for synchronization found
[root@localhost yum.repos.d]#
Network error: Software caused connection abort───────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <Return> to exit tab- Press R to restart session- Press S to save terminal output to file
root@192.168.235.130's password:┌──────────────────────────────────────────────────────────────────────┐│ • MobaXterm Personal Edition v23.2 • ││ (SSH client, X server and network tools) ││ ││ ⮞ SSH session to root@192.168.235.130 ││ • Direct SSH : ✓ ││ • SSH compression : ✓ ││ • SSH-browser : ✓ ││ • X11-forwarding : ✗ (disabled or not supported by server) ││ ││ ⮞ For more info, ctrl+click on help or visit our website. │└──────────────────────────────────────────────────────────────────────┘Last login: Fri Jul 11 20:46:21 2025
[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]# hostnamectl set-hostname mysql.cn
[root@localhost ~]# hostname
hostname
mysql.cn
[root@localhost ~]# su
[root@mysql ~]# yum install libaio -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
Nothing to do
[root@mysql ~]# tar -xf mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz
[root@mysql ~]# ls mysql-
ls: cannot access mysql-: No such file or directory
[root@mysql ~]# ls mysql-5.7.31-linux-glibc2.12-x86_64
bin docs include lib LICENSE man README share support-files
[root@mysql ~]# useradd -r -s /sbin/nologin mysql
[root@mysql ~]# id mysql
uid=997(mysql) gid=995(mysql) groups=995(mysql)
[root@mysql ~]# rm -rf /etc/my.cnf
[root@mysql ~]# mv mysql-5.7.31-linux-glibc2.12-x86_64 /mysql_3306
[root@mysql ~]# cd /mysql_3306/
[root@mysql mysql_3306]# mkfir mysql-files
bash: mkfir: command not found
[root@mysql mysql_3306]# mkdir mysql-files
[root@mysql mysql_3306]# chown mysql.mysql mysql-files
[root@mysql mysql_3306]# chmod 750 mysql-files/
[root@mysql mysql_3306]# ll -d mysql-files/
drwxr-x--- 2 mysql mysql 6 Jul 11 20:53 mysql-files/
[root@mysql mysql_3306]# ll -d mysql-files/
drwxr-x--- 2 mysql mysql 6 Jul 11 20:53 mysql-files/
[root@mysql mysql_3306]# bin/mysqld --initialize --user=mysql --basedir=/mysql_3306
2025-07-11T12:55:53.417773Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2025-07-11T12:55:53.646073Z 0 [Warning] InnoDB: New log files created, LSN=45790
2025-07-11T12:55:53.708130Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2025-07-11T12:55:53.777522Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 6119f594-5e56-11f0-831c-000c29e7ffd9.
2025-07-11T12:55:53.779043Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2025-07-11T12:55:54.601385Z 0 [Warning] CA certificate ca.pem is self signed.
2025-07-11T12:55:54.698670Z 1 [Note] A temporary password is generated for root@localhost: B/IiqfB8me;d
[root@mysql mysql_3306]# bin/mysql_ssl_rsa_setup --datadir=/mysql_3306/data
[root@mysql mysql_3306]# cp support-files/mysql.server /etc/init.d/mysql_3306
[root@mysql mysql_3306]# vim /etc/init.d/mysql_3306
[root@mysql mysql_3306]# service mysql_3306 start
Starting MySQL.Logging to '/mysql_3306/data/mysql.cn.err'.SUCCESS!
[root@mysql mysql_3306]# chkconfig --listNote: This output shows SysV services only and does not include nativesystemd services. SysV configuration data might be overridden by nativesystemd configuration.If you want to list systemd services use 'systemctl list-unit-files'.To see services enabled on particular target use'systemctl list-dependencies [target]'.netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@mysql mysql_3306]# chkconfig --add mysql_3306
[root@mysql mysql_3306]# chkconfig mysql_3306 on
[root@mysql mysql_3306]# bin/mysqladmin -uroot password '123' -p
Enter password:
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
[root@mysql mysql_3306]# echo 'export PATH=$PATH:/mysql_3306/bin'>>/etc/profile
[root@mysql mysql_3306]# source /etc/profile
[root@mysql mysql_3306]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.31 MySQL Community Server (GPL)Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> exit
Bye
[root@mysql mysql_3306]# vim /mysql_3306/my.cnf
[root@mysql mysql_3306]# service mysql_3306 start
Starting MySQL SUCCESS!
[root@mysql mysql_3306]# 2025-07-11T13:13:02.183409Z mysqld_safe A mysqld process already exists
bye
bash: bye: command not found
[root@mysql mysql_3306]# service mysql_3306 restart
Shutting down MySQL.. SUCCESS!
Starting MySQL. SUCCESS!
[root@mysql mysql_3306]# mysql_secure_installationSecuring the MySQL server deployment.Enter password for user root:VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?Press y|Y for Yes, any other key for No: yThere are three levels of password validation policy:LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: yInvalid option provided.There are three levels of password validation policy:LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: yInvalid option provided.There are three levels of password validation policy:LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: yInvalid option provided.There are three levels of password validation policy:LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: yInvalid option provided.There are three levels of password validation policy:LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: yInvalid option provided.There are three levels of password validation policy:LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0
Using existing password for root.Estimated strength of the password: 0
Change the password for root ? ((Press y|Y for Yes, any other key for No) : yNew password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : nNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 25
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y... Failed! Error: Your password does not satisfy the current policy requirementsNew password:
Sorry, you can't use an empty password here.New password:
Sorry, you can't use an empty password here.New password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : nNew password:Re-enter new password:
Sorry, passwords do not match.New password:Re-enter new password:Estimated strength of the password: 25
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : noNew password:Re-enter new password:Estimated strength of the password: 0
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) :.
root@192.168.235.130's password:┌──────────────────────────────────────────────────────────────────────┐│ • MobaXterm Personal Edition v23.2 • ││ (SSH client, X server and network tools) ││ ││ ⮞ SSH session to root@192.168.235.130 ││ • Direct SSH : ✓ ││ • SSH compression : ✓ ││ • SSH-browser : ✓ ││ • X11-forwarding : ✗ (disabled or not supported by server) ││ ││ ⮞ For more info, ctrl+click on help or visit our website. │└──────────────────────────────────────────────────────────────────────┘Last login: Fri Jul 11 20:48:16 2025
[root@mysql ~]# service mysql_3306 restart
Shutting down MySQL.. SUCCESS!
Starting MySQL. SUCCESS!
[root@mysql ~]# mysql_secure_installationSecuring the MySQL server deployment.Enter password for user root:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.Estimated strength of the password: 0
Change the password for root ? ((Press y|Y for Yes, any other key for No) : no... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.Remove anonymous users? (Press y|Y for Yes, any other key for No) :... skipping.Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) :... skipping.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.Remove test database and access to it? (Press y|Y for Yes, any other key for No) :... skipping.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) :... skipping.
All done!
[root@mysql ~]# mysql_s
mysql_secure_installation mysql_ssl_rsa_setup
[root@mysql ~]# mysql_secure_installationSecuring the MySQL server deployment.Enter password for user root:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.Estimated strength of the password: 0
Change the password for root ? ((Press y|Y for Yes, any other key for No) : no... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y- Dropping test database...
Success.- Removing privileges on test database...
Success.Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.All done!
[root@mysql ~]# vim /mysql_3306/my.cnf
[root@mysql ~]# cat /mysql_3306/my.cnf
[mysqld]
basedir=/mysql_3306
datadir=/mysql_3306/data
socket=/tmp/mysql.sock
validate_password=OFF
[root@mysql ~]# service mysql_3306 restart
Shutting down MySQL.. SUCCESS!
Starting MySQL. SUCCESS!
[root@mysql ~]# yum install -y ncurses-devel.x86_64 liba
libabw.x86_64 libappstream-glib.x86_64 libatasmart.x86_64 l
libacl-devel.x86_64 libarchive.x86_64 libatomic-static.x86_64
libaio-devel.x86_64 libart_lgpl.x86_64 libatomic.x86_64
libao.x86_64 libasyncns.x86_64 libattr-devel.x86_64
[root@mysql ~]# yum install -y ncurses-devel.x86_64 libaio-devel.x86_64 cmake.x
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package cmake.x86_64 0:2.8.12.2-2.el7 will be installed
--> Processing Dependency: libarchive.so.13()(64bit) for package: cmake-2.8.12.
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
---> Package openssl-devel.x86_64 1:1.0.2k-19.el7 will be installed
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.15.1-50.el7 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-50.el7 for package: krb5-d
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-50.el7
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-50.e
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-50.e
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-5
---> Package libarchive.x86_64 0:3.1.2-14.el7_7 will be installed
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package libcom_err-devel.x86_64 0:1.42.9-19.el7 will be installed
---> Package libkadm5.x86_64 0:1.15.1-50.el7 will be installed
---> Package libselinux-devel.x86_64 0:2.5-15.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-10 for package: libsel
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version
===============================================================================
Installing:cmake x86_64 2.8.12.2-2.el7libaio-devel x86_64 0.3.109-13.el7ncurses-devel x86_64 5.9-14.20130511.el7openssl-devel x86_64 1:1.0.2k-19.el7
Installing for dependencies:keyutils-libs-devel x86_64 1.5.8-3.el7krb5-devel x86_64 1.15.1-50.el7libarchive x86_64 3.1.2-14.el7_7libcom_err-devel x86_64 1.42.9-19.el7libkadm5 x86_64 1.15.1-50.el7libselinux-devel x86_64 2.5-15.el7libsepol-devel x86_64 2.5-10.el7libverto-devel x86_64 0.2.5-4.el7pcre-devel x86_64 8.32-17.el7zlib-devel x86_64 1.2.7-18.el7Transaction Summary
===============================================================================
Install 4 Packages (+10 Dependent packages)Total download size: 11 M
Installed size: 36 M
Downloading packages:Error downloading packages:libkadm5-1.15.1-50.el7.x86_64: [Errno 256] No more mirrors to try.keyutils-libs-devel-1.5.8-3.el7.x86_64: [Errno 256] No more mirrors to try.libcom_err-devel-1.42.9-19.el7.x86_64: [Errno 256] No more mirrors to try.libsepol-devel-2.5-10.el7.x86_64: [Errno 256] No more mirrors to try.libarchive-3.1.2-14.el7_7.x86_64: [Errno 256] No more mirrors to try.zlib-devel-1.2.7-18.el7.x86_64: [Errno 256] No more mirrors to try.pcre-devel-8.32-17.el7.x86_64: [Errno 256] No more mirrors to try.cmake-2.8.12.2-2.el7.x86_64: [Errno 256] No more mirrors to try.libselinux-devel-2.5-15.el7.x86_64: [Errno 256] No more mirrors to try.krb5-devel-1.15.1-50.el7.x86_64: [Errno 256] No more mirrors to try.libaio-devel-0.3.109-13.el7.x86_64: [Errno 256] No more mirrors to try.1:openssl-devel-1.0.2k-19.el7.x86_64: [Errno 256] No more mirrors to try.libverto-devel-0.2.5-4.el7.x86_64: [Errno 256] No more mirrors to try.ncurses-devel-5.9-14.20130511.el7_4.x86_64: [Errno 256] No more mirrors to tr[root@mysql ~]# yum install -y ncurses-devel.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size
===============================================================================
Installing:ncurses-devel x86_64 5.9-14.20130511.el7_4 local 712 kTransaction Summary
===============================================================================
Install 1 PackageTotal download size: 712 k
Installed size: 2.1 M
Downloading packages:Error downloading packages:ncurses-devel-5.9-14.20130511.el7_4.x86_64: [Errno 256] No more mirrors to try.[root@mysql ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id repo name status
local local name 4,070
repolist: 4,070
[root@mysql ~]# yum install -y ncurses-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size
===============================================================================
Installing:ncurses-devel x86_64 5.9-14.20130511.el7_4 local 712 kTransaction Summary
===============================================================================
Install 1 PackageTotal download size: 712 k
Installed size: 2.1 M
Downloading packages:Error downloading packages:ncurses-devel-5.9-14.20130511.el7_4.x86_64: [Errno 256] No more mirrors to try.[root@mysql ~]# yum install cmake
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package cmake.x86_64 0:2.8.12.2-2.el7 will be installed
--> Processing Dependency: libarchive.so.13()(64bit) for package: cmake-2.8.12.2-2.el7.x86_64
--> Running transaction check
---> Package libarchive.x86_64 0:3.1.2-14.el7_7 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size
===============================================================================
Installing:cmake x86_64 2.8.12.2-2.el7 local 7.1 M
Installing for dependencies:libarchive x86_64 3.1.2-14.el7_7 local 319 kTransaction Summary
===============================================================================
Install 1 Package (+1 Dependent package)Total download size: 7.4 M
Installed size: 27 M
Is this ok [y/d/N]: y
Downloading packages:Error downloading packages:cmake-2.8.12.2-2.el7.x86_64: [Errno 256] No more mirrors to try.libarchive-3.1.2-14.el7_7.x86_64: [Errno 256] No more mirrors to try.[root@mysql ~]# cd /etc/yum.repos.d
[root@mysql yum.repos.d]# lls
-bash: lls: command not found
[root@mysql yum.repos.d]# ls
local.repo repo.tar.gz
[root@mysql yum.repos.d]# tar -zcf local.tar.gz local.repo
[root@mysql yum.repos.d]# ks
-bash: ks: command not found
[root@mysql yum.repos.d]# ls
local.repo local.tar.gz repo.tar.gz
[root@mysql yum.repos.d]# rm -rf local.repo
[root@mysql yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
-bash: wget: command not found
[root@mysql yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed
100 2523 100 2523 0 0 5673 0 --:--:-- --:--:-- --:--:-- 5682
[root@mysql yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors
Other repos take up 51 M of disk space (use --verbose for details)
[root@mysql yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
base | 3.6 kB 00:00
extras | 2.9 kB 00:00
updates | 2.9 kB 00:00
(1/10): base/7/x86_64/group_gz | 153 kB 00:00
(2/10): extras/7/x86_64/filelists_db | 305 kB 00:00
(3/10): extras/7/x86_64/other_db | 154 kB 00:00
(4/10): base/7/x86_64/other_db | 2.6 MB 00:00
(5/10): updates/7/x86_64/filelists_db | 15 MB 00:00
(6/10): updates/7/x86_64/other_db | 1.6 MB 00:00
(7/10): updates/7/x86_64/primary_db | 27 MB 00:02
base/7/x86_64/filelists_db FAILED
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
Trying other mirror.
base/7/x86_64/primary_db FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused"
Trying other mirror.
(8/10): base/7/x86_64/filelists_db | 7.2 MB 00:00
extras/7/x86_64/primary_db FAILED
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/e12dbf10e94bc2b33b1f45e026559bc8685728b139dddae0654d96bc624c5602-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"
Trying other mirror.
(9/10): extras/7/x86_64/primary_db | 253 kB 00:00
(10/10): base/7/x86_64/primary_db | 6.1 MB 00:00
Metadata Cache Created
[root@mysql yum.repos.d]# yum install ncurses-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size
===============================================================================
Installing:ncurses-devel x86_64 5.9-14.20130511.el7_4 base 712 kTransaction Summary
===============================================================================
Install 1 PackageTotal download size: 712 k
Installed size: 2.1 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/ncurses-devel-5.9-14.20130511.el7_4.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for ncurses-devel-5.9-14.20130511.el7_4.x86_64.rpm is not installed
ncurses-devel-5.9-14.20130511.el7_4.x86_64.rpm | 712 kB 00:00
Retrieving key from http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5From : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : ncurses-devel-5.9-14.20130511.el7_4.x86_64 1/1Verifying : ncurses-devel-5.9-14.20130511.el7_4.x86_64 1/1Installed:ncurses-devel.x86_64 0:5.9-14.20130511.el7_4Complete!
[root@mysql yum.repos.d]# yum install cmake
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package cmake.x86_64 0:2.8.12.2-2.el7 will be installed
--> Processing Dependency: libarchive.so.13()(64bit) for package: cmake-2.8.12.2-2.el7.x86_64
--> Running transaction check
---> Package libarchive.x86_64 0:3.1.2-14.el7_7 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size
===============================================================================
Installing:cmake x86_64 2.8.12.2-2.el7 base 7.1 M
Installing for dependencies:libarchive x86_64 3.1.2-14.el7_7 base 319 kTransaction Summary
===============================================================================
Install 1 Package (+1 Dependent package)Total download size: 7.4 M
Installed size: 27 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): libarchive-3.1.2-14.el7_7.x86_64.rpm | 319 kB 00:00
(2/2): cmake-2.8.12.2-2.el7.x86_64.rpm | 7.1 MB 00:00
-------------------------------------------------------------------------------
Total 9.6 MB/s | 7.4 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : libarchive-3.1.2-14.el7_7.x86_64 1/2Installing : cmake-2.8.12.2-2.el7.x86_64 2/2Verifying : cmake-2.8.12.2-2.el7.x86_64 1/2Verifying : libarchive-3.1.2-14.el7_7.x86_64 2/2Installed:cmake.x86_64 0:2.8.12.2-2.el7Dependency Installed:libarchive.x86_64 0:3.1.2-14.el7_7Complete!
[root@mysql yum.repos.d]# yum install openss
openssh-askpass.x86_64 openssl098e.x86_64
openssh-cavs.x86_64 openssl-devel.i686
openssh-clients.x86_64 openssl-devel.x86_64
openssh-keycat.x86_64 openssl-libs.i686
openssh-ldap.x86_64 openssl-libs.x86_64
openssh-server-sysvinit.x86_64 openssl-perl.x86_64
openssh-server.x86_64 openssl-static.i686
openssh.x86_64 openssl-static.x86_64
openssl098e.i686 openssl.x86_64
[root@mysql yum.repos.d]# yum install openssl
openssl098e.i686 openssl-libs.i686 openssl-static.x86_64
openssl098e.x86_64 openssl-libs.x86_64 openssl.x86_64
openssl-devel.i686 openssl-perl.x86_64
openssl-devel.x86_64 openssl-static.i686
[root@mysql yum.repos.d]# yum install openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.2k-26.el7_9 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-26.el7_9 for package: 1:openssl-devel-1.0.2k-26.el7_9.x86_64
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.2k-26.el7_9.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-26.el7_9.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.15.1-55.el7_9 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-55.el7_9 for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-55.el7_9 for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-19.el7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-19.el7 for package: 1:openssl-1.0.2k-19.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-26.el7_9 will be an update
---> Package zlib-devel.x86_64 0:1.2.7-21.el7_9 will be installed
--> Processing Dependency: zlib = 1.2.7-21.el7_9 for package: zlib-devel-1.2.7-21.el7_9.x86_64
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.15.1-50.el7 will be updated
---> Package krb5-libs.x86_64 0:1.15.1-55.el7_9 will be an update
---> Package libcom_err-devel.x86_64 0:1.42.9-19.el7 will be installed
---> Package libkadm5.x86_64 0:1.15.1-55.el7_9 will be installed
---> Package libselinux-devel.x86_64 0:2.5-15.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-10 for package: libselinux-devel-2.5-15.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-15.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5-15.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package openssl.x86_64 1:1.0.2k-19.el7 will be updated
---> Package openssl.x86_64 1:1.0.2k-26.el7_9 will be an update
---> Package zlib.x86_64 0:1.2.7-18.el7 will be updated
---> Package zlib.x86_64 0:1.2.7-21.el7_9 will be an update
--> Running transaction check
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved===============================================================================Package Arch Version Repository Size
===============================================================================
Installing:openssl-devel x86_64 1:1.0.2k-26.el7_9 updates 1.5 M
Installing for dependencies:keyutils-libs-devel x86_64 1.5.8-3.el7 base 37 kkrb5-devel x86_64 1.15.1-55.el7_9 updates 273 klibcom_err-devel x86_64 1.42.9-19.el7 base 32 klibkadm5 x86_64 1.15.1-55.el7_9 updates 180 klibselinux-devel x86_64 2.5-15.el7 base 187 klibsepol-devel x86_64 2.5-10.el7 base 77 klibverto-devel x86_64 0.2.5-4.el7 base 12 kpcre-devel x86_64 8.32-17.el7 base 480 kzlib-devel x86_64 1.2.7-21.el7_9 updates 50 k
Updating for dependencies:krb5-libs x86_64 1.15.1-55.el7_9 updates 810 kopenssl x86_64 1:1.0.2k-26.el7_9 updates 494 kopenssl-libs x86_64 1:1.0.2k-26.el7_9 updates 1.2 Mzlib x86_64 1.2.7-21.el7_9 updates 90 kTransaction Summary
===============================================================================
Install 1 Package (+9 Dependent packages)
Upgrade ( 4 Dependent packages)Total download size: 5.4 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/14): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm | 37 kB 00:00
(2/14): libcom_err-devel-1.42.9-19.el7.x86_64.rpm | 32 kB 00:00
(3/14): krb5-devel-1.15.1-55.el7_9.x86_64.rpm | 273 kB 00:00
(4/14): libkadm5-1.15.1-55.el7_9.x86_64.rpm | 180 kB 00:00
(5/14): krb5-libs-1.15.1-55.el7_9.x86_64.rpm | 810 kB 00:00
(6/14): libselinux-devel-2.5-15.el7.x86_64.rpm | 187 kB 00:00
(7/14): libsepol-devel-2.5-10.el7.x86_64.rpm | 77 kB 00:00
(8/14): libverto-devel-0.2.5-4.el7.x86_64.rpm | 12 kB 00:00
(9/14): openssl-1.0.2k-26.el7_9.x86_64.rpm | 494 kB 00:00
(10/14): openssl-devel-1.0.2k-26.el7_9.x86_64.rpm | 1.5 MB 00:00
(11/14): zlib-1.2.7-21.el7_9.x86_64.rpm | 90 kB 00:00
(12/14): zlib-devel-1.2.7-21.el7_9.x86_64.rpm | 50 kB 00:00
(13/14): openssl-libs-1.0.2k-26.el7_9.x86_64.rpm | 1.2 MB 00:00
(14/14): pcre-devel-8.32-17.el7.x86_64.rpm | 480 kB 00:00
-------------------------------------------------------------------------------
Total 4.4 MB/s | 5.4 MB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionUpdating : zlib-1.2.7-21.el7_9.x86_64 1/18Updating : 1:openssl-libs-1.0.2k-26.el7_9.x86_64 2/18Updating : krb5-libs-1.15.1-55.el7_9.x86_64 3/18Installing : libkadm5-1.15.1-55.el7_9.x86_64 4/18Installing : zlib-devel-1.2.7-21.el7_9.x86_64 5/18Installing : libcom_err-devel-1.42.9-19.el7.x86_64 6/18Installing : pcre-devel-8.32-17.el7.x86_64 7/18Installing : libsepol-devel-2.5-10.el7.x86_64 8/18Installing : libselinux-devel-2.5-15.el7.x86_64 9/18Installing : libverto-devel-0.2.5-4.el7.x86_64 10/18Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64 11/18Installing : krb5-devel-1.15.1-55.el7_9.x86_64 12/18Installing : 1:openssl-devel-1.0.2k-26.el7_9.x86_64 13/18Updating : 1:openssl-1.0.2k-26.el7_9.x86_64 14/18Cleanup : 1:openssl-1.0.2k-19.el7.x86_64 15/18Cleanup : 1:openssl-libs-1.0.2k-19.el7.x86_64 16/18Cleanup : krb5-libs-1.15.1-50.el7.x86_64 17/18Cleanup : zlib-1.2.7-18.el7.x86_64 18/18Verifying : 1:openssl-devel-1.0.2k-26.el7_9.x86_64 1/18Verifying : zlib-devel-1.2.7-21.el7_9.x86_64 2/18Verifying : keyutils-libs-devel-1.5.8-3.el7.x86_64 3/18Verifying : libverto-devel-0.2.5-4.el7.x86_64 4/18Verifying : libkadm5-1.15.1-55.el7_9.x86_64 5/18Verifying : krb5-libs-1.15.1-55.el7_9.x86_64 6/18Verifying : 1:openssl-libs-1.0.2k-26.el7_9.x86_64 7/18Verifying : krb5-devel-1.15.1-55.el7_9.x86_64 8/18Verifying : libsepol-devel-2.5-10.el7.x86_64 9/18Verifying : pcre-devel-8.32-17.el7.x86_64 10/18Verifying : libselinux-devel-2.5-15.el7.x86_64 11/18Verifying : libcom_err-devel-1.42.9-19.el7.x86_64 12/18Verifying : zlib-1.2.7-21.el7_9.x86_64 13/18Verifying : 1:openssl-1.0.2k-26.el7_9.x86_64 14/18Verifying : zlib-1.2.7-18.el7.x86_64 15/18Verifying : 1:openssl-1.0.2k-19.el7.x86_64 16/18Verifying : krb5-libs-1.15.1-50.el7.x86_64 17/18Verifying : 1:openssl-libs-1.0.2k-19.el7.x86_64 18/18Installed:openssl-devel.x86_64 1:1.0.2k-26.el7_9Dependency Installed:keyutils-libs-devel.x86_64 0:1.5.8-3.el7 krb5-devel.x86_64 0:1.15.1-55.el7_9libcom_err-devel.x86_64 0:1.42.9-19.el7 libkadm5.x86_64 0:1.15.1-55.el7_9libselinux-devel.x86_64 0:2.5-15.el7 libsepol-devel.x86_64 0:2.5-10.el7libverto-devel.x86_64 0:0.2.5-4.el7 pcre-devel.x86_64 0:8.32-17.el7zlib-devel.x86_64 0:1.2.7-21.el7_9Dependency Updated:krb5-libs.x86_64 0:1.15.1-55.el7_9 openssl.x86_64 1:1.0.2k-26.el7_9openssl-libs.x86_64 1:1.0.2k-26.el7_9 zlib.x86_64 0:1.2.7-21.el7_9Complete!
[root@mysql yum.repos.d]# yum install libaio
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
Nothing to do
[root@mysql yum.repos.d]# cd ~
[root@mysql ~]# ls
anaconda-ks.cfg mysql-boost-5.7.31.tar.gz
mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz
[root@mysql ~]# tar xf mysql-boost-5.7.31.tar.gz
[root@mysql ~]# ls
anaconda-ks.cfg mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz
mysql-5.7.31 mysql-boost-5.7.31.tar.gz
[root@mysql ~]# ll -d mysql-5.7.31
drwxr-xr-x 36 7161 31415 4096 Jun 2 2020 mysql-5.7.31
[root@mysql ~]# vim myconfig.sh
[root@mysql ~]# make -j2 && make install
make: *** No targets specified and no makefile found. Stop.
[root@mysql ~]# cat myconfig.sh
cmake . \
-DCMAKE_ISNTALL_PREFIX=/mysql_3307 \
-DMYSQL_DATADIR=/mysql_3307/data \
-DMYSQL_TCP_PORT=3307 \
-DMYSQL_UNIX_ADDR=/mysql_3307/mysql.sock \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci\
-DENABLED_LOCAL_INFILE=1 \
-DWITH_SSL=system \
-DWITH_BOOST=boost \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all
[root@mysql ~]# chmod +x myconfig.sh
[root@mysql ~]# ./myconfig.sh
[root@mysql ~]# ./myconfig.sh
CMake Error: The source directory "/root" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[root@mysql ~]# ls
anaconda-ks.cfg mysql-5.7.31-linux-glibc2.12-x86_64.tar.gz
myconfig.sh mysql-boost-5.7.31.tar.gz
mysql-5.7.31
[root@mysql ~]# cd mysql-5.7.31/
[root@mysql mysql-5.7.31]# mv ~/myconfig.sh ~/mysql-5.7.31
[root@mysql mysql-5.7.31]# ls
boost extra mysql-test sql-common
BUILD include mysys storage
client INSTALL mysys_ssl strings
cmake libbinlogevents packaging support-files
CMakeLists.txt libbinlogstandalone plugin testclients
cmd-line-utils libmysql rapid unittest
config.h.cmake libmysqld README VERSION
configure.cmake libservices regex vio
dbug LICENSE scripts win
Docs man source_downloads zlib
Doxyfile-perfschema myconfig.sh sql
[root@mysql mysql-5.7.31]# ll myconfig.sh
-rwxr-xr-x 1 root root 483 Jul 11 22:28 myconfig.sh
[root@mysql mysql-5.7.31]# ./m
man/ myconfig.sh mysql-test/ mysys/ mysys_ssl/
[root@mysql mysql-5.7.31]# ./myconfig.sh
-- Running cmake version 2.8.12.2
-- Found Git: /usr/bin/git (found version "1.8.3.1")
-- Configuring with MAX_INDEXES = 64U
-- The C compiler identification is GNU 4.8.5
-- Build files have been written to: /root/mysql-5.7.31
[root@mysql mysql-5.7.31]# make -j2 && make install