We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# 查看内核 unname -a # 查看服务器环境 cat /etc/os-release
lscpu
默认在Linux服务器中,cpu信息都保存在/proc/cpuinfo文件中,通过cat命令结合grep命令我们可以很容易查询出来
cpu
/proc/cpuinfo
cat
grep
# 查看CPU型号信息 cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c # 查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l # 每个物理CPU中的核数 cat /proc/cpuinfo| grep "cpu cores"| uniq # 查看逻辑CPU的个数 cat /proc/cpuinfo| grep "processor"| wc -l
free -h
env
# Install GPG keys gpg --keyserver keyserver.ubuntu.com --recv-key 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB # 安装 rvm ruby rails curl -sSL https://get.rvm.io | bash -s stable --rails
# 安装 nginx yum install nginx # 查看nginx的位置 which nginx # 进入到安装目录 cd ${nginx dir} # 执行 ./nginx
centos7 内置的防火墙已经从iptables变成了 firewalld
centos7
iptables
firewalld
# 查看防火墙配置 firewall-cmd --list-all # 添加开放的端口 firewall-cmd --add-service=http --permanent firewall-cmd --add-port=80/tcp --permanent # 重启防火墙 firewall-cmd --reload
先写这么多,用到其他的命令,再添加上来。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
服务器配置查看
基本信息
查看CPU
默认在Linux服务器中,
cpu
信息都保存在/proc/cpuinfo
文件中,通过cat
命令结合grep
命令我们可以很容易查询出来内存
环境变量
安装 rvm auby rails
安装nginx
查看防火墙配置
centos7
内置的防火墙已经从iptables
变成了firewalld
先写这么多,用到其他的命令,再添加上来。
The text was updated successfully, but these errors were encountered: