[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