名称 | 域名 | IP地址 |
---|---|---|
A3 | dns.lin.2018skills.com. | 192.168.70.1 |
A4 | www.lin.2018skills.com. | 192.168.70.2 |
C1 | ftp.lin.2018skills.com. | 192.168.70.3 |
C2 | mail.lin.2018skills.com. | 192.168.70.4 |
C3 | smb.lin.2018skills.com. | 192.168.70.5 |
C4 | data.lin.2018skills.com. | 192.168.70.6 |
systemctl restart network
配置yum源:
mount /dev/cdrom /mnt
echo '[rhel]
name=rhel
baseurl=file:///mnt
gpgcheck=0
enabled=1' >> /etc/yum.repos.d/rhel.repo
yum repolist
安装dns服务
yum install -y bind* >> /dev/null && echo ok
systemctl start named
systemctl enable named
vim /etc/named.conf
vim /etc/named.rfc1912.zones
cd /var/named
cp -a named.localhost skills.local //正向解析文件
cp -a named.loopback skills.zone //反向解析文件
vim skills.local
vim skills.zone
systemctl restart named
firewall-cmd --permanent --add-service=dns
firewall-cmd --reload
iptables或者防火墙配置
iptables -A INPUT -s 192.168.70.0/24 -j DROP
service iptables save
or
firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.70.0/24" service name="dns" reject"
firewalld --reload
mdadm -C /dev/md10 -n 4 -l 10 /dev/sdb1 /dev/sdc1 /dev/sdd2 /dev/sdd5
fdisk /dev/md10
p
n
p
+1G
w
mkswap /dev/md10p1
echo "/dev/md10p1 swap swap defaults 0 0" >> /etc/fstab
swapon -a
yum install mariadb* -y
systemctl start mariadb
mysql -uroot
use mysql;
UPDATE user SET password=PASSWORD("687145") WHERE user = 'root';
flush privileges;
quit;
mysql -uroot -p687145
create database myDB;
use myDB
create table baseinfo(studentID int NOT NULL PRIMARY KEY ,name varchar(10),sex char(1),birthday date,school char(20));
#随便插入五条数据
insert into baseinfo values('1','roy','男','2000-01-01','湖北大学');
insert into baseinfo values('2','rob','女','2004-01-07','湖北大学');
insert into baseinfo values('3','roc','男','2000-03-01','湖北大学');
insert into baseinfo values('4','rod','女','2001-01-01','湖北大学');
insert into baseinfo values('5','ros','男','1999-01-01','湖北大学');
mysqldump -uroot -p687145 myDB baseinfo > /root/mysql.sql
本文到此也就结束了,如果觉得对您有所帮助的话,请不要吝啬您小小的赞,因为它将是我写作的最大动力,写作不易,还望支持。
2020-04-05
ro4lsc