Академический Документы
Профессиональный Документы
Культура Документы
********************************************************************************************
TP Gnral - Les services d'administration sous Linux
"DHCP, BIND, FTP, SAMBA, NFS, TELNET, SSH, HTTP"
Pr-requis:
- Vous devez crer 3 machines:
Fedora Server
Fedora Client
Client Windows (XP, 7 ou 10).
- Domaine : tri.lan
- L'adresse rseau : 192.168.1.0/24 (l'adresse IP du serveur est : 192.168.1.254/24)
3 - Configuration de TCP/IP :
a - Afficher la configuration TCP/IP :
[root@khalid khalid]# ifconfig
eth2 Link encap:Ethernet HWaddr 08:00:27:FE:15:6E
inet adr:10.0.2.15 Bcast:10.0.2.255 Masque:255.255.255.0
adr inet6: fe80::a00:27ff:fefe:156e/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:20180 (19.7 KiB) TX bytes:7952 (7.7 KiB)
c - Graphiquement (Permanente) :
[root@khalid khalid]# system-config-network
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
f - Dsactiver le pare feu :
[root@Serv1 khalid]# service iptables stop
iptables : Suppression des rgles du pare-feu : [ OK ]
iptables : Configuration des chanes sur la politique ACCEP[ OK ]er
iptables : Dchargement des modules : [ OK ]
host XP {
hardware ethernet 08:00:27:5d:6f:02;
fixed-address 192.168.1.25;
}
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
d - Redmarrer le service DHCP :
[root@khalid khalid]# service dhcpd restart
Arrt de dhcpd : [ OK ]
Dmarrage de dhcpd : [ OK ]
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
zone "tri.lan" IN {
type master;
file "tri.lan.zone";
allow-transfer { 192.168.1.253; };
allow-update { 192.168.1.253; };
notify yes;
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "tri.lan.rev";
allow-transfer { 192.168.1.253; };
allow-update { 192.168.1.253; };
notify yes;
};
include "/etc/named.rfc1912.zones";
> 192.168.1.254
Server: 192.168.1.254
Address: 192.168.1.254#53
254.1.168.192.in-addr.arpa name = Serv1.tri.lan.
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
1:system-config-samba ########################################### [100%]
[root@Serv1 khalid]# rpm -ivh Bureau/Packages/samba/system-config-samba-docs-1.0.8-1.fc13.noarch.rpm
attention: Bureau/Packages/samba/system-config-samba-docs-1.0.8-1.fc13.noarch.rpm: Entte V3 RSA/SHA256
Signature, key ID e8e40fde: NOKEY
Prparation... ########################################### [100%]
1:system-config-samba-doc ########################################### [100%]
c - Configuration de SAMBA :
[root@Serv1 khalid]# vim /etc/samba/smb.conf
[global]
workgroup = tri
server string = Samba Server
netbios name = tri
interfaces = lo eth2 192.168.1.254/24
hosts allow = 127. 192.168.1.
[homes]
comment = Home Directories
browseable = yes
writable = yes
valid users = samba-1
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = no
writable = yes
printable = yes
[partage]
comment = Shared Folder
path = /home/partage
public = no
writable = yes
valid users = samba-1
browseable = yes
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
7 - Configuration de service FTP :
a - Vrifier les packages :
[root@Serv1 khalid]# rpm -q vsftp
le paquetage vsftp n'est pas install
[root@Serv1 khalid]# rpm -q ftp
ftp-0.17-51.fc12.i686
c - Configuration de fichier :
anonymous_enable=NO
chroot_local_user=YES
f - Modifier SELinux :
[root@Serv1 khalid]# getenforce
Enforcing
[root@Serv1 khalid]# setsebool ftp_home_dir on
c - Configuration de fichier :
[root@Serv1 khalid]# vim /etc/xinetd.d/telnet
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
port = 23
}
b - Installation de packages :
root@Serv1 khalid]# rpm -ivh Bureau/Packages/openssh/openssh-5.5p1-24.fc14.2.src.rpm
attention: Bureau/Packages/openssh/openssh-5.5p1-24.fc14.2.src.rpm: Entte V3 RSA/SHA256 Signature, key ID
97a1071f: NOKEY ########################################### [100%]
c - Configuration de fichier :
[root@Serv1 khalid]# vim /etc/ssh/sshd_config
Port 22
ListenAddress 192.168.1.254
Protocol 2
PermitRootLogin yes
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
b - Installer les packages :
[root@Serv1 khalid]# rpm -ivh Bureau/Packages/nfs/portmap-4.0-65.i386.rpm
attention: Bureau/Packages/nfs/portmap-4.0-65.i386.rpm: Entte V3 DSA/SHA1 Signature, key ID 4f2a6fd2: NOKEY
Prparation... ########################################### [100%]
1:portmap ########################################### [100%]
d - Configuration du fichier :
[root@Serv1 khalid]# vim /etc/exports
/home/partage *(rw)
ii - Monter le partage :
[root@Serv1 khalid]# mount -t nfs 192.168.1.254:/home/partage Bureau/montage
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017
******************************L'administration sous Linux (Fedora 13) ******************************
********************************************************************************************
d - Crer un exemple d'un fochier HTML :
[root@Serv1 khalid]# vim /var/www/html/index.html
<html>
<center><font size='+2' color='blue'>HTTP sous Fedora</font></center>
<hr>Welcome to HTTP Server. Opening doore to new opprtunites. Mind Wide Open.
<p>Quik links:
<br><a href='helloworld.html'>A small page</a>
<br><a href='copyrights.html'>Copyroghts</a>
<br><a href='image.html'>Image page</a>
<br><a href='cscoptlogo177x111.html'>Image</a>
</html>
*******************************************************************************************
KHALID KATKOUT https://www.facebook.com/groups/2ATRI/ 2016/2017