上一章节介绍了如何安装中标麒麟6.0操作系统;
本章节主要简介在安装DM7之前,如何配置操作系统环境;
1.收集操作系统信息
[root@localhost ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:graphics-4.1-amd64:graphics-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: NeoKylinAdvancedServer
Description: NeoKylin Linux Advanced Server release 6.0 (Dhaulagiri)
Release: 6.0
Codename: Dhaulagiri
2.安装必要包
2.1.本地yum源
[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]# mount -t iso9660 /dev/sr0 /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]# mv ns6-adv.repo ns6-adv.repo.bak
[root@localhost yum.repos.d]# vi localyum.repo
[zbql6.0]
name=zbql6.0
baseurl=file:///mnt/cdrom/
enabled=1
gpgcheck=0
[root@localhost ~]# yum makecache
[root@localhost ~]# yum repolist;
2.2.安装glibc
[root@localhost ~]# rpm -qa |grep glibc
glibc-common-2.12-1.25.el6.ns6.01.x86_64
glibc-2.12-1.25.el6.ns6.01.x86_64
--需安装
[root@localhost ~]# yum -y install glibc-headers
[root@localhost ~]# yum -y install glibc-2.12-1.25.el6.ns6.01.i686
[root@localhost ~]# yum -y install compat-glibc
[root@localhost ~]# yum -y install glibc-devel
[root@localhost ~]# yum -y install glibc-utils
--检查
[root@localhost ~]# rpm -qa |grep glibc
glibc-devel-2.12-1.25.el6.ns6.01.x86_64
glibc-headers-2.12-1.25.el6.ns6.01.x86_64
glibc-utils-2.12-1.25.el6.ns6.01.x86_64
glibc-common-2.12-1.25.el6.ns6.01.x86_64
compat-glibc-headers-2.5-46.2.ns6.01.x86_64
glibc-2.12-1.25.el6.ns6.01.i686
glibc-2.12-1.25.el6.ns6.01.x86_64
compat-glibc-2.5-46.2.ns6.01.x86_64
3.硬件信息
3.1.查看CPU
[root@localhost ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
stepping : 10
cpu MHz : 2208.001
cache size : 9216 KB
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc up arch_perfmon xtopology tsc_reliable nonstop_tsc unfair_spinlock pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch arat xsaveopt fsgsbase smep
bogomips : 4416.00
clflush size : 64
cache_alignment : 64
address sizes : 43 bits physical, 48 bits virtual
power management:
3.2.内存
[root@localhost ~]# free -m
total used free shared buffers cached
Mem: 3947 1405 2541 0 45 1017
-/+ buffers/cache: 343 3603
Swap: 4095 0 4095
3.3.磁盘信息
[root@localhost ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a99a5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 548 4194304 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 548 679 1048576 83 Linux
Partition 3 does not end on cylinder boundary.
/dev/sda4 679 5222 36494336 5 Extended
/dev/sda5 679 5222 36493312 83 Linux
3.4.查看空间大小
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/sda5 35G 3.2G 30G 10% /
tmpfs 2.0G 100K 2.0G 1% /dev/shm
/dev/sda1 194M 42M 143M 23% /boot
/dev/sda3 1008M 248M 709M 26% /tmp
/dev/sr0 4.3G 4.3G 0 100% /media/NeoKylin Linux Advanced Server 6
/dev/sr0 4.3G 4.3G 0 100% /mnt/cdrom
4.用户和组(dinstall、dmdba)
[root@localhost ~]# id dmdba
id: dmdba:无此用户
[root@localhost ~]# groupadd dinstall
[root@localhost ~]# useradd -g dinstall dmdba
[root@localhost ~]# passwd dmdba
[root@localhost ~]# id dmdba
uid=500(dmdba) gid=501(dinstall) 组=501(dinstall)
5.创建安装目录 /dm7
[root@localhost ~]# mkdir /dm7
[root@localhost ~]# chown -R dmdba:dinstall /dm7
6.配置环境变量
[root@localhost ~]# su - dmdba
[dmdba@localhost ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export DM_HOME=/dm7
export PATH=$DM_HOME/bin:$DM_HOME/tool:$PATH:$HOME/bin
[dmdba@localhost ~]$ source .bash_profile
[dmdba@localhost ~]$ echo $DM_HOME
/dm7
7.设置文件最大打开数目
--方式1(临时)
[root@localhost ~]# ulimit -n 65536
--方式2(永久)
[root@localhost ~]# vi /etc/security/limits.conf
dmdba soft nofile 65536
dmdba hard nofile 65536
8.关闭selinux和防火墙
[root@localhost ~]# vi /etc/selinux/config
SELINUX=disabled
[root@localhost ~]# service iptables stop
[root@localhost ~]# chkconfig iptables off
9.修改主机名
[root@localhost ~]# vi /etc/sysconfig/network
HOSTNAME=dm7
10.重启主机
[root@localhost ~]# shutdown -r now
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




