首页 > 代码库 > centos 7 相关的一些记录

centos 7 相关的一些记录

开80端口:

sudo firewall-cmd --zone=public --add-port=80/tcp --permanent

重新加载防火墙:

sudo firewall-cmd --reload

安装nginx:

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpmsudo yum install nginxsudo systemctl start nginx.servicesudo systemctl enable nginx.service

 安装nodejs:

sudo yum install gcc gcc-c++ wgetwget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gztar xzf node-v0.10.30.tar.gzcd node-v0.10.30makesudo make install