Linux系统之部署Linux命令大全搜索工具

一、linux-command介绍

Linux命令大全搜索工具(linux-command),内容包含Linux命令手册、详解、学习、搜集。linux-command是一个非常实用的Linux命令查询工具,适用于各类Linux用户,特别是对Linux命令掌握程度不高的用户。

二、本次实践介绍

2.1 本地环境规划

本次实践为个人测试环境,操作系统版本为centos7.6。

hostnameIP地址操作系统版本内核版本
jeven192.168.3.166centos 7.63.10.0-957.el7.x86_64

2.2 本次实践介绍

1.本次实践部署环境为个人测试环境,生产环境请谨慎;
2.在centos7.6环境下部署Linux命令大全搜索工具(linux-command)。

三、安装httpd软件

3.1 检查yum仓库

如果没有镜像源,可以使用阿里云的镜像源。

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

检查yum仓库状态,确保各镜像源正常。

[root@jeven ~]# yum repolist enabled
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
 * epel: mirrors.bestthaihost.com
repo id                                                                       repo name                                                                                  status
!base/7/x86_64                                                                CentOS-7 - Base - mirrors.aliyun.com                                                       10,072
!epel/x86_64                                                                  Extra Packages for Enterprise Linux 7 - x86_64                                             13,767
!extras/7/x86_64                                                              CentOS-7 - Extras - mirrors.aliyun.com                                                        518
!mongodb-org                                                                  MongoDB Repository                                                                            342
!mysql-connectors-community/x86_64                                            MySQL Connectors Community                                                                    227
!mysql-tools-community/x86_64                                                 MySQL Tools Community                                                                         100
!mysql57-community/x86_64                                                     MySQL 5.7 Community Server                                                                    678
!updates/7/x86_64                                                             CentOS-7 - Updates - mirrors.aliyun.com                                                     5,176
repolist: 30,880

3.2 安装httpd软件

直接使用yum安装httpd软件。

yum -y install  httpd

在这里插入图片描述

3.3 启动httpd服务

启动httpd服务,并使开机自启。

systemctl start httpd
systemctl enable  httpd

在这里插入图片描述

3.4 查看httpd服务状态

查看httpd服务,确保httpd服务正常运行。

[root@jeven ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-10-02 00:50:04 CST; 33s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 38291 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─38291 /usr/sbin/httpd -DFOREGROUND
           ├─38293 /usr/sbin/httpd -DFOREGROUND
           ├─38294 /usr/sbin/httpd -DFOREGROUND
           ├─38295 /usr/sbin/httpd -DFOREGROUND
           ├─38296 /usr/sbin/httpd -DFOREGROUND
           └─38297 /usr/sbin/httpd -DFOREGROUND

Oct 02 00:50:03 jeven systemd[1]: Starting The Apache HTTP Server...
Oct 02 00:50:04 jeven systemd[1]: Started The Apache HTTP Server.

3.5 防火墙和selinux设置

  • 设置selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
  • 关闭防火墙,如果想要开启防火墙,需放行80端口。
systemctl stop firewalld && systemctl disable firewalld

3.6 浏览器测试web服务

浏览器打开:http://192.168.3.166,将IP替换为自己服务器IP地址。

在这里插入图片描述

四、安装linux-command

4.1 进入到网站根目录

进入到网站根目录

[root@jeven ~]# cd /var/www/html/
[root@jeven html]#

4.2 下载linux-command

使用以下命令,下载linux-command的github上gh-pages 分支代码。

git clone https://github.com/jaywcjlove/linux-command.git

4.3 查看linux-command内容

查看linux-command内容

[root@jeven html]# ls ./linux-command
c  contributors.html  CONTRIBUTORS.svg  css  hot.html  img  index.html  js  linux-command.docset.tgz  linux-command-docset.xml  list.html

4.4 重启httpd服务

重启httpd服务

 systemctl restart httpd

五、访问linux-command

5.1 访问linux-command首页

访问地址:http://192.168.3.166/linux-command/,将IP地址替换为自己服务器IP地址。

在这里插入图片描述

5.2 查询Linux命令

查询Linux命令,例如查询ping命令的用法,搜索框输入“ping”,就会得到ping命令的详细用法。

在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

江湖有缘

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值