#查看linux系统版本信息

cat /etc/redhat-release

以上是操作系统的所有信息,补充下内核信息参数介绍:

3.10.0-514.26.2.el7.x86_64

3表示主版本号,有结构性变化才更改;10表示次版本号,新增功能才变化,一般奇数表示测试版,偶数表示开发板

0表示对版本的修订次数或者补丁包数;514代表编译的次数,每次编译可对少数程序优化或修改;el7用来表示版本的特殊信息,有较大的随意性;

x86_64表示64位.

#安装apache

yum install httpd http-devel

#启动apache服务

systemctl start httpd

#设置httpd服务器开机自启

[root@VM_0_8_centos local]# systemctl enable  httpd

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

[root@VM_0_8_centos local]#

#查看服务状态

systemctl status httpd  加-l会有详细信息

[root@VM_0_8_centos local]# systemctl status httpd -l

httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

Active: active (running) since 二 2018-10-30 11:40:10 CST; 1h 23min ago

Docs: man:httpd(8)

man:apachectl(8)

Main PID: 22527 (httpd)

Status: "Total requests: 1; Current requests/sec: 0; Current traffic:   0 B/sec"

CGroup: /system.slice/httpd.service

├─22527 /usr/sbin/httpd -DFOREGROUND

├─22528 /usr/sbin/httpd -DFOREGROUND

├─22529 /usr/sbin/httpd -DFOREGROUND

├─22530 /usr/sbin/httpd -DFOREGROUND

├─22531 /usr/sbin/httpd -DFOREGROUND

├─22532 /usr/sbin/httpd -DFOREGROUND

└─25691 /usr/sbin/httpd -DFOREGROUND

10月 30 11:40:10 VM_0_8_centos systemd[1]: Starting The Apache HTTP Server...

10月 30 11:40:10 VM_0_8_centos httpd[22527]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

10月 30 11:40:10 VM_0_8_centos systemd[1]: Started The Apache HTTP Server.

[root@VM_0_8_centos local]#

#开启防火墙

systemctl restart firewalld

当然,没有的话需要安装一下

yum install firewall

[root@VM_0_8_centos local]# firewall-cmd --permanent --zone=public  --add-service=http

success

[root@VM_0_8_centos local]# firewall-cmd --permanent --zone=public  --add-service=https

success

设置开机启动

systemctl enable firewalld

关闭防火墙

systemctl stop firewalld

取消开启启动

systemctl disable firewalld

查看状态

firewall-cmd --state

还有别的请查看帮助

firewall-cmd --help

最后所有的就绪后重新加载下

[root@VM_0_8_centos local]# firewall-cmd --reload

success

#确认80端口监听中

netstat -tulp

netstat -pan|grep 8080  查看8080端口被哪个进程所占用

netstat -aux|grep 2222 看到该端口被2222这个id的进程占用后,可以继续查看到底是什么程序占用的

后面的工作你懂得

最新文章

  1. Javascript学习笔记2.1 Javascript与DOM简介
  2. dotnetGen 系列终于开源了
  3. centos安装配置nginx
  4. SQLSERVER 16进制与10进制转换
  5. GCC 编译优化指南
  6. Hbuilder 常用快捷键汇总
  7. java中将list、map对象写入文件
  8. NHibernate与IbatisNet的简单比较
  9. kmp算法:
  10. c/c++ 网络编程 UDP 主机网络信息取得
  11. 为什么用Flow
  12. 【VS2019】F12跳转到源码
  13. Linux的50个基本命令
  14. Luogu P2700 逐个击破
  15. python 字典,列表,集合,字符串,基础进阶
  16. C# httpRequest Soap请求
  17. Matlab基本用法
  18. HDU 2108 逆时针给出多边形的顶点,判断是否为凸多边形,水题
  19. mysql 慢查询,查询缓存,索引,备份,水平分割
  20. java 控制台 输入字符串

热门文章

  1. $.ajax()与vue结合获取数据并渲染
  2. 《Python网络爬虫相关基础概念》
  3. tensorflow:实战Google深度学习框架第三章
  4. Codeforces Round #497 (Div. 2) A. Romaji
  5. No bean named 'springSecurityFilterChain' is defined
  6. 修改Azure Website默认时区
  7. codeforces727C(交互)
  8. css布局两边固定中间自适应的四种方法
  9. 简洁js日历控件的使用
  10. Memcache笔记01-Memcache的安装