随州北京网站建设,济宁网站制作,竞价推广方案,用rp怎么做网站原型Linux系统之部署Linux命令大全搜索工具 一、linux-command介绍二、本次实践介绍2.1 本地环境规划2.2 本次实践介绍 三、安装httpd软件3.1 检查yum仓库3.2 安装httpd软件3.3 启动httpd服务3.4 查看httpd服务状态3.5 防火墙和selinux设置3.6 浏览器测试web服务 四、安装linux-com… Linux系统之部署Linux命令大全搜索工具 一、linux-command介绍二、本次实践介绍2.1 本地环境规划2.2 本次实践介绍 三、安装httpd软件3.1 检查yum仓库3.2 安装httpd软件3.3 启动httpd服务3.4 查看httpd服务状态3.5 防火墙和selinux设置3.6 浏览器测试web服务 四、安装linux-command4.1 进入到网站根目录4.2 下载linux-command4.3 查看linux-command内容4.4 重启httpd服务 五、访问linux-command5.1 访问linux-command首页5.2 查询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仓库状态确保各镜像源正常。 [rootjeven ~]# 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,8803.2 安装httpd软件 直接使用yum安装httpd软件。 yum -y install httpd3.3 启动httpd服务 启动httpd服务并使开机自启。 systemctl start httpd
systemctl enable httpd3.4 查看httpd服务状态 查看httpd服务确保httpd服务正常运行。 [rootjeven ~]# systemctl status httpd
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)Active: active (running) since Mon 2023-10-02 00:50:04 CST; 33s agoDocs: man:httpd(8)man:apachectl(8)Main PID: 38291 (httpd)Status: Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/secCGroup: /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 -DFOREGROUNDOct 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/SELINUXenforcing/SELINUXdisabled/ /etc/selinux/config
setenforce 0关闭防火墙如果想要开启防火墙需放行80端口。
systemctl stop firewalld systemctl disable firewalld3.6 浏览器测试web服务 浏览器打开http://192.168.3.166将IP替换为自己服务器IP地址。 四、安装linux-command
4.1 进入到网站根目录 进入到网站根目录 [rootjeven ~]# cd /var/www/html/
[rootjeven html]#4.2 下载linux-command 使用以下命令下载linux-command的github上gh-pages 分支代码。 git clone https://github.com/jaywcjlove/linux-command.git4.3 查看linux-command内容 查看linux-command内容 [rootjeven 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.html4.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命令的详细用法。