标签:手动 curl pts rip scripts autoconf netmask 上海 gcc
CentOS7 最小化安装后的基本配置操作指引目录
1.配置网卡信息
操作系统安装完毕后,检查并配通网络
[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vi ifcfg-eth0
配置为自动获取IP地址 :
BOOTPROTO=dhcp
ONBOOT=yes
或者手动指定IP地址:
BOOTPROTO=static
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes
DNS1=114.114.114.114
[root@localhost ~]# service network restart
[root@localhost ~]# ip addr
2.关闭SELINUX(生产环境下视情况确定是否关闭)
[root@localhost /]# vi /etc/sysconfig/selinux
[root@localhost /]# setenforce 0
3.升级系统补丁
[root@localhost /]# yum update
4.安装依赖关系包及工具
[root@localhost /]# yum -y install gcc gcc-c++ make autoconf? libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel? curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel libxslt-devel libevent-devel libtool libtool-ltdl bison gd gd-devel vim-enhanced pcre-devel zip unzip ntpdate sysstat patch bc expect rsync curl? vim wget lrzsz net-tools
5.设置时区
查看当前时区
[root@localhost /]# ll /etc/localtime
更改为上海时区
[root@localhost /]# mv /etc/localtime /etc/localtime.bk
[root@localhost /]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[root@localhost /]# ll /etc/localtime
lrwxrwxrwx. 1 root root 33 May 24 10:20 /etc/localtime -> /usr/share/zoneinfo/Asia/Shanghai
6.修改主机名
[root@localhost /]# hostnamectl --static set-hostname mytest
[root@localhost /]# reboot
Zabbix5.0企业级分布式监控系统:精讲与企业应用
标签:手动 curl pts rip scripts autoconf netmask 上海 gcc
原文地址:https://blog.51cto.com/2221384/2539692