Linux常见问题解决方案汇总

  • 来源:网络
  • 更新日期:2020-08-31

摘要:服务器 1、VMware下的Centos7联网并设置固定ip 1)、首先右击虚拟镜像名,点击“设置” 2)、打开终端,查看网络 3)、使用root用户编辑此文件

服务器

1、VMware下的Centos7联网并设置固定ip

1)、首先右击虚拟镜像名,点击“设置”

2)、打开终端,查看网络

3)、使用root用户编辑此文件

4)、重启网卡,查看网络

5)、再编辑一下之前编辑的文件

[root@nginx ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33 
#IPADDRO和PREFIXO如上图,GATWAYO和dns1只需要把IPADDRO最后改为1
IPADDRO=192.168.126.136
PREFIXO=24
GATWAYO=192.168.126.1
DNS1=192.168.126.1

6)、重启网卡,设置完成

[root@nginx ~]# systemctl restart network

2、Linux安装wget

[root@nginx ~]# yum -y install wget

3、Linux安装tree

[root@nginx ~]# yum install tree -y

4、Linux安装vim

[root@nginx conf]# yum -y install vim*

5、Linux安装zip

[root@Nginx images]# yum install zip

6、CentOS7使用firewalld打开关闭防火墙

启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 : systemctl enable firewalld

7、Linux安装netstat

[root@Nginx sbin]# yum install net-tools

8、Linux使用netstat查看端口是否被占用

[root@Nginx sbin]# netstat -anp|grep 8080
tcp    0   0 127.0.0.1:8080     0.0.0.0:*        LISTEN   1245/nginx: master 

9、Linux安装bc计算器

[root@localhost ~]# yum install bc

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对亿速云的支持。如果你想了解更多相关内容请查看下面相关链接

新网虚拟主机