加密码提示输入密串,需要输入两次
[root@kiccleaf ~]# tar -czvf - kiccleaf | openssl des3 -salt -out kiccleaf.tar.gz
test.sh
enter des-ede3-cbc encryption password:
Verifying - enter des-ede3-cbc encryption password:
直接解压不可以咯
[root@kiccleaf ~]# tar zxvf kiccleaf.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
解压提示输入密串
[root@kiccleaf ~]# openssl des3 -d -salt -in kiccleaf.tar.gz | tar zxvf -
enter des-ede3-cbc decryption password:
test.sh
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#pool 2.centos.pool.ntp.org iburst (这一行注释掉,增加以下两行)
server ntp.aliyun.com iburst
server cn.ntp.org.cn iburst
重新加载配置
[root@kiccleaf home]# systemctl restart chronyd.service
[root@kiccleaf home]# chronyc sources -v
210 Number of sources = 2
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 203.107.6.88 2 6 7 2 -188us[+6871us] +/- 24ms
^- 61.177.189.190 3 6 17 19 +663us[ +663us] +/- 97ms
[root@kiccleaf home]# date
Sat Aug 29 16:26:08 CST 2020
[root@kiccleaf ~]# yum install screen
Repository AppStream is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Last metadata expiration check: 0:01:32 ago on Tue 25 Aug 2020 02:16:39 PM CST.
No match for argument: screen
Error: Unable to find a match: screen
办法总是有的,先安装epel-release
[root@kiccleaf ~]# yum install -y epel-release
Installed:
epel-release-8-8.el8.noarch
Complete!
[root@kiccleaf ~]# yum install -y screen
Installed:
screen-4.6.2-10.el8.x86_64
Complete!
[root@kiccleaf ~]#
安装成功了!测试一下
[root@kiccleaf ~]# screen -S kiccleaf
新的窗体里面了
[root@kiccleaf ~]#
Ctrl+ad 临时退出窗体
[detached from 35676.kiccleaf]
重新进入刚才的窗体
[root@kiccleaf ~]# screen -r kiccleaf
退出窗体
[root@kiccleaf ~]# exit
exit
[screen is terminating]
到此完美使用screen工具了。
接下去安装vim和网络命令
[root@kiccleaf ~]# yum install -y net-tools.x86_64 vim
来看一下系统的版本吧
[root@kiccleaf ~]# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
[root@kiccleaf ~]#
wget https://pecl.php.net/get/redis-5.3.1.tgz
tar zxvf redis-5.3.1.tgz
cd redis-5.3.1
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
[root@localhost ~]# chkconfig --add kiccleaf
service kiccleaf does not support chkconfig
#以上是失败提醒,未增加# chkconfig: 3 88 88
#增加可执行权限
[root@localhost ~]# chmod +x /etc/init.d/kiccleaf
#添加到chkconfig,开机自启动
[root@localhost ~]# chkconfig --add kiccleaf
[root@localhost ~]# chkconfig --list kiccleaf
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd 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]'.
kiccleaf 0:off 1:off 2:off 3:on 4:off 5:off 6:off
#重启系统,查看结果
[root@localhost ~]# cat /root/times.log
12 Jun 11:38:34 ntpdate[10221]: step time server 203.107.6.88 offset -28799.359688 sec
操作成功
#关闭开机启动
[root@localhost ~]# chkconfig kiccleaf off
[root@localhost ~]# chkconfig --list kiccleaf
kiccleaf 0:off 1:off 2:off 3:off 4:off 5:off 6:off
#从chkconfig管理中删除kiccleaf
[root@localhost ~]# chkconfig --del kiccleaf
#查看列表中是否还存在kiccleaf启动项,结果已经没有
[root@localhost ~]# chkconfig --list kiccleaf
service kiccleaf supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add kiccleaf')
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
#同步系统时间
/usr/sbin/ntpdate cn.pool.ntp.org