Centos7.3 minimal配置网络
1、首先使用root登录服务器,输入
nmcli d
我们发现网卡是处于禁用状态。
2、打开网络管理器界面,再终端输入
nmtui
打开界面如上,使用tab键进行选择,使用enter进入,这里我们选择第一个编辑网卡。
3、然后进入网卡选择
4、进行选择编辑
5、选择IPV4为自动,并勾选开机自动连接选项。
6、按确认退出。
7、重启网络服务
service network restart
8、结果如下
9、关闭防火墙
sudo yum install iptables-services
sudo systemctl enable iptables && sudo systemctl enable ip6tables
sudo systemctl start iptables && sudo systemctl start ip6tables
systemctl stop iptables.service
安装LNMP+mongodb
1、更新软件并安装编译工具
yum update
yum install gcc automark autoconf libtool gcc-c++
2、安装nginx
yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
service nginx start
3、安装mysql
yum update
yum install gcc automark autoconf libtool gcc-c++
yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum install mysql-community-server
yum install mysql-community-devel
service mysqld start
grep 'temporary password' /var/log/mysqld.log
yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
service nginx start
3、安装mysql
yum update
yum install gcc automark autoconf libtool gcc-c++
yum localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum install mysql-community-server
yum install mysql-community-devel
service mysqld start
grep 'temporary password' /var/log/mysqld.log