Linux 命令 - 收集

1.应用场景

快速查找Linux命令.

2.学习/操作

1. 文档阅读

https://tldr.ostera.io/  

GitHub - tldr-pages/tldr: 📚 Collaborative cheatsheets for console commands  

Linux命令大全(手册) – 真正好用的Linux命令在线查询网站  

 Download Ubuntu Desktop | Download | Ubuntu

Download - centOS官网

下载推荐

阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区  //阿里镜像

华为开源镜像站_软件开发服务_华为云  //华为镜像

linux系列之常用运维命令整理笔录_smileNicky的博客-CSDN博客_linux运维命令 //linux系列之常用运维命令整理笔录

Linux 命令大全 | 菜鸟教程 //Linux 命令大全

Linux命令大全(手册) – 真正好用的Linux命令在线查询网站  //Linux 命令在线查询

Linux - 操作汇总_穿素白衫的中少年的博客-CSDN博客_linux 汇总  //Linux操作汇总

Linux 服务管理两种方式service和systemctl - 迪米特 - 博客园  //Linux 服务管理两种方式service和systemctl

LAMP - 学习/实践_穿素白衫的中少年的博客-CSDN博客  //LAMP

2. 整理输出

这里按照具体的操作系统进行了分类

2.1 CentOS  CentOS 6/7均可使用命令

1. 查看web服务器版本

Apache:

httpd -v  或者 apachectl -v

安装目录:

/etc/httpd/  

寻找安装目录:

TBD

编辑apache配置文件: //目录未定,要视情况而定

vim /etc/httpd/httpd.conf

2. 启动/停止/重启apache服务, 已经开机启动

前提:apache安装成为linux的服务[什么时候不是服务 ?TBD]

方式一: 

使用 systemctl start/restart/stop httpd.service ,如下

systemctl enable httpd.service   //开机启动

systemctl status httpd.service   //查看运行状态

以上本质是在执行:

/bin/systemctl start httpd.service

/bin/systemctl restart httpd.service

/bin/systemctl stop httpd.service

/bin/systemctl status httpd.service  //查看运行状态信息

备注:

Linux 服务管理两种方式service和systemctl

systemctl不只是对apache, 如redis或者firewall等服务都是进行管理的。

如关闭/打开/查看防火墙[状态]:

备注:

如果开启了防火墙和selinux,web服务器是不能对外提供服务的,即被阻隔了服务。

现在关闭防火墙和selinux

博客:http://ningxiaofa.top/ 

正常访问

详情见: LAMP - 学习/实践_穿素白衫的中少年的博客-CSDN博客

方式二:

service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务

备注:

具体如何使用httpd -h命令, 另行查找资料

Linux httpd命令是Apache HTTP服务器程序。

httpd为Apache HTTP服务器程序。直接执行程序可启动服务器的服务。

2. Nginx: 

TBD

3. 查看php版本

php -v  或者 php --version 

4. 查看mysql版本

mysql -v  或者 mysql --version

或者进入mysql, 执行sql:  select  version();

5. [进入]apache web根目录

cd /usr/local/apache/htdocs

1). CentOS 6

TBD

2). CentOS 7

TBD

2. Ubuntu 「16.04 LTS / 8.04 LTS / 19.10 均可使用」

方式一:

启动apache服务
# /etc/init.d/apache2 start 

or
$ sudo /etc/init.d/apache2 start

//重启apache服务
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart


//停止apache服务
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

2.1 Ubuntu 16.04 LTS

TBD

2.2 Ubuntu 18.04 LTS

TBD

2.3 Ubuntu 19.10

TBD

2.4 Ubuntu 20.04

TBD

后续补充

...

3.问题/补充

TBD

4.参考

参见文档阅读列表

后续补充

...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值