您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > linux_课程设计_基本服务器_架设
Linux课程设计学号:姓名:专业:计算机科学与技术班级:教师:21.实验环境说明································································································11.1搭建此实验环境的原因···········································································11.2宿主机的环境·······················································································11.3客户机环境一·······················································································21.4客户机环境二·······················································································21.5试验环境截图·······················································································32.linux(redhat9)下批量添加用户······································································32.1批量添加用户说明·················································································32.2批量添加用户过程··················································································42.3批量添加用户遇到的问题·········································································53.linux(redhat9)下下架设FTP服务器································································63.1ftp服务器的安装····················································································63.2ftp服务器的配置····················································································73.3ftp服务器的测试····················································································84.linux(redhat9)下架设DNS服务····································································124.1DNS服务器的安装················································································124.2dns服务器的配置:···············································································154.2.1安装redhat-config-bind图形化配置工具··············································154.2.2配置DNS服务器正向区块文件·······················································174.2.3配置dns反向区块文件···································································194.3dns服务器的测试:···············································································214.3.1win7下DNS测试·········································································214.3.2fedora下DNS测试·······································································225.linux(redhat9)下架设SENDMAIL服务器························································235.1Sendmail服务器的安装。········································································235.2redhat9下sendmail服务器的配置····························································245.3sendmail服务器的测试···········································································266.linux(redhat9)下架设Mysql数据库服务器······················································296.1MYSQL的安装·····················································································296.2MYSQL的用户配置···············································································316.3Mysql的备份与恢复···············································································327.linux(redhat9)下架设APACHE服务器····························································357.1APACHE服务器的安装···········································································357.2APACHE服务器的配置与测试·······························································367.2.1APACHE服务器运行测试·····························································367.2.2APACHE服务器php脚本解析测试·················································3711.实验环境说明1.1搭建此实验环境的原因……1.2宿主机的环境宿主机是联想3000G430硬件环境,WIN7操作系统。Windows7版本号如下:Windows7的网络配置如下:在WIN7操作系统中安装的Vmareworkstation版本号如下:21.3客户机环境一在Vmareworkstation中安装linuxREDHAT9操作系统,REDHAT9的版本号如下:linuxREDHAT9操作系统的网络配置如下:1.4客户机环境二在Vmareworkstation中安装linuxFedoracore14操作系统,Fedoracore版本号如下:Fedoracore14的网络配置如下:31.5试验环境截图总结:在win7环境(192.168.0.2)下,安装vmare(版本号如下),在vmare中安装两个虚拟机进行测试:分别是redhat9(192.168.0.33)和fedora14(192.168.0.55)。主要的实验对象是redhat9,然后利用win7和fedora14进行辅助和测试。2.linux(redhat9)下批量添加用户2.1批量添加用户说明批量添中用户,是通过newusers导入一个严格按照/etc/passwd文件的书写格式来书写内容的文件来完成添加用户,然后通过chpasswd导入一个严格按照/etc/shadow文件的书写4格式用户密码文件来完成批量更新用户密码。2.2批量添加用户过程一、首先我们创建用户文件和密码文件:我们要创建包含新用户的用户名文件userfile_wuchao.txt;另一个是为新添加用户更新密码的密码文件userpwdfile_wuchao.txt。因为我不习惯在linux下进行文本编辑,所以,我是先在win7下建立并编辑这两个文件,然后通过u盘,挂载到redhat9文件系统中的,再在文件系统进行拷贝修改。挂载U盘的命令如下:首先,在win7文本编辑器打开文件userfile_wuchao.txt,添加如下内容:wuchao00:x:520:520::/home/wuchao00:/bin/bashwuchao01:x:520:520::/home/wuchao01:/bin/bash……wuchao09:x:520:520::/home/wuchao09:/bin/bash我们再来书写新增用户的密码文件userpwdfile_wuchao.txt内容;这个文件的内容中的用户名要与userfile_wuchao.txt用户名相同;也就是说我们先是添加了wuchao00到wuchao10的用户,现在要为这些用户更新密码:wuchao00:123456wuchao01:123456……wuchao09:123456二、通过newusers和chpasswd完成批量添加用户[root@localhost~]#newusersuserfile_wuchao.txt[root@localhost~]#chpasswduserpwdfile_wuchao.txt这样就算添加完成了,如果发现/etc/passwd中能发现用户的明口令,可以通过下面的命令来映射到/etc/shadow文件名:[root@localhost~]#pwconv三、对新添加的用户进行测试5说明:利用newusers创建的用户使用newusers命令建立的用户,不会把/etc/skel/中设定环境变量的文件复制过来,也就是说使用这种方法建立的用户家目录是空的。2.3批量添加用户遇到的问题在输入pwconv命令,进行用户名和密码同步之后。我用了其中的wuchao05用户来进行测试。结果如下:然后,我就用finger命令查看wuchao05用户的详细信息,发现wuchao05用户确实存在,但是shell类型不对“”,bash后面多了一个“^M”我就打开:/etc/passwd文件,查看新增加的用户后面,是不是都有“^M”。结果如下图所示:最后,在网上查了一下,才知道:Windows下换行是\t
本文标题:linux_课程设计_基本服务器_架设
链接地址:https://www.777doc.com/doc-4486144 .html