ubuntu: postfix

Installation postfix
apt-get install postfix
à sélectionner « site internet »
 Nom du courrier : izen-services.com
Vérification dans /var/log/mail.log
 
apt-get install mailx

Test :
echo « essai » | mail bdemolon@free.fr
Vérification dans /var/log/mail.log
 
Dans /etc/postfix/main.cf
 
mynetworks = 127.0.0.0/8 192.168.0.0/24 192.168.1.0/24 [::ffff:127.0.0.0]/104 [::1]/128
 
root@izenibm:/etc/postfix/ssl# telnet localhost 25
Trying ::1…
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
220 ibm.izen-services.com ESMTP Postfix (Ubuntu)
> EHLO somename.tld
250-ibm.izen-services.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
 
C’est bon!
OU (autre manière…)
root@ubuntu:/logiciels/postfix-2.6.4# groupadd –g 3001 [...] . . . → Read More: ubuntu: postfix

ubuntu: Webmin

Installation Webmin

wget http://software.virtualmin.com/gpl/scripts/install.sh
sudo chmod 755 install.sh
sudo ./install.sh
sudo wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo apt-get update
sudo apt-get install webmin
/usr/share/webmin/changepass.pl /etc/webmin root votre_mot_de_passe
 
Puis aller sur https://izen-services.com:10000/
. . . → Read More: ubuntu: Webmin

ubuntu: Serveur de Sauvegarde – BackupPc

Voir l’article détaillé:
http://doc.ubuntu-fr.org/backuppc
http://xenfr.org/tiki-index.php?page=Backuppc

Installation
 
# apt-get install backuppc
selection: apache2
 
# htpasswd /etc/backuppc/htpasswd backuppc
# htpasswd /etc/backuppc/htpasswd admin
 
# ln -s /etc/backuppc/apache.conf backuppc.conf
# /etc/init.d/apache2 restart
# chown -R backuppc:backuppc /var/lib/backuppc/
root@websebp:/var/lib/backuppc# su backuppc
$ ssh-keygen -t rsa
$ cp /var/lib/backuppc/.ssh/id_rsa.pub /home/mnttech
 
Pour reconfigurer BackupPc:
# dpkg-reconfigure backuppc
 
 
Pour ne pas archiver dans /var/lib/backuppc
# /etc/init.d/backuppc stop
# mv /var/lib/backuppc /dans/votre/dossier
# ln –s /dans/votre/dossier /var/lib/backuppc
# /etc/init.d/backuppc start
 
 
http://izen-services.com/backuppc/
login: backuppc
password: ****
 
. . . → Read More: ubuntu: Serveur de Sauvegarde – BackupPc

ubuntu: Ghost – Remastersys

Remastersys permet de créer une image de son système sur DVD
Voir Remastersys
echo « deb http://www.geekconnection.org/remastersys/repository ubuntu/ » | sudo tee -a /etc/apt/sources.list
apt-get update
apt-get install remastersys
ou
echo « deb http://www.geekconnection.org/remastersys/repository remastersys/ » | sudo tee -a /etc/apt/sources.list
apt-get update
apt-get install remastersys
 
remastersys modify
Pour modifier des paramètres:
/etc/remastersys.conf
 
Pour créer une image:
remastersys backup izen.iso
. . . → Read More: ubuntu: Ghost – Remastersys

ubuntu: synchronisation des données rsync

RSync :
Les éléments présent dans serveur  sont synchronisé sur websebp (qui centralise)
Configuration SSH
Sur les 2 noeuds (sous root) :
mkdir ~/.ssh
chmod 700 ~/.ssh
Clé RSA :
/usr/bin/ssh-keygen -t rsa
à Pas de passphrase
Clé DSA :
/usr/bin/ssh-keygen -t dsa
à Pas de passphrase
 
Création du fichier d’authorisation :
$ touch ~/.ssh/authorized_keys
 
Sur websebp (root) :
cd .ssh
ssh websebp cat /root/.ssh/id_rsa.pub >> authorized_keys
ssh websebp cat /root/.ssh/id_dsa.pub [...] . . . → Read More: ubuntu: synchronisation des données rsync

Serveur de stockage NBD (tunnel ssh)

Serveur de stockage NBD (tunnel ssh)
 
sur le serveur “serveur 1”
# dd if=/dev/zero of=/home/disque_nbd.bin bs=100M count=100
10485760000 bytes (10 GB) copied, 539,262 s, 19,4 MB/s
# losetup -f
            /dev/loop0
# losetup /dev/loop0 /home/disque_nbd.bin
# mkfs.ext3 -j /dev/loop0
# aptitude install gnbd-server
# gnbd_serv -n
gnbd_serv: startup succeeded
# netstat -tpan|grep gnbd
tcp6       0      0 :::14567                :::*            LISTEN      10660/gnbd_serv
# gnbd_export -d /dev/loop0 -e BACKUP_DISK -c
gnbd_export: [...] . . . → Read More: Serveur de stockage NBD (tunnel ssh)

ubuntu: serveur dhcp

apt-get install dhcp3-server

 
Nous allons mettre en place le serveur DHCP pour l’interface réseau eth1

cat /etc/default/dhcp3-server

INTERFACES= »eth1″
 

cat /etc/network/interfaces

auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
gateway 192.168.0.254
 
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
 
Nous installerons le serveur DHCP sur le réseau 192.168.1.* (eth1)
Sur une plage défini, les adresses seront fixe et sur une autre place, [...] . . . → Read More: ubuntu: serveur dhcp

ubuntu: serveur samba

La mise en place du serveur a été défini à l’installation
Il suffit donc de renseigner le fichier de configuration :
 
/etc/samba/smb.conf
Ex :
[Archives]
path = /home/bdemolon
writeable = yes
valid users = bdemolon
comment = Archives et backups personnels
browseable = yes
 
[Web]
path = /var/www
writeable = yes
valid users = bdemolon
comment = Web
browseable = yes
 
Puis de relancer le serveur :

/etc/init.d/samba restart

 
Pour créer un mot de passe :

smbpasswd -a [...] . . . → Read More: ubuntu: serveur samba

ubuntu: serveur Lamp

apt-get install apache2

apt-get install apache2-doc
apt-get install mysql-server  (confirmer passwd)
apt-get install php5
apt-get install php5-mysql
apt-get install phpmyadmin

1-  cocher “apache2”
 
Pour installer des modules PHP

apt-get install php-pear
apt-get install php5-dev
apt-get install php5-gd
apt-get install php5-xsl
apt-get install php5-curl
apt-get install php5-imap
apt-get install php5-ldap

 
Pour tester “php5”
Créer le fichier suivant:
 <?php
    phpinfo();
?>

Puis : http://192.168.0.5/phpinfo.php

 
 Tester phpmyadmin

http://izen-services.com/phpmyadmin/

 
Dans /etc/apache2/apache2.conf
 Ajouter:
ServerName dns.izen-services.com
 
 
Insérer le mode rewite  (module de réécriture des URL) :

 a2enmod rewrite
/etc/init.d/apache2 [...] . . . → Read More: ubuntu: serveur Lamp

ubuntu: serveur ftp

 apt-get install traceroute
aptitude install vsftpd

 

vi /etc/vsftpd.conf

Changez la ligne:
anonymous_enable=YES
en:
anonymous_enable=NO
Ajoutez:
local_enable=YES
Ajoutez:
write_enable=YES

 /etc/init.d/vsftpd restart

Puis

passwd www-data (ou autres comptes…) pour initialiser le passwd ftp

. . . → Read More: ubuntu: serveur ftp

Installer Postfix sur ubuntu

Server Postfix (pour envoyer des mails)
root@izenibm:/var/www# apt-get install postfix
Type de serveur de messagerie : Site Internet
Nom de courrier : bdemolon@izen-services.com
Courrier à destination : bdemolon
Oui
Oui
Ok
0
+
Ipv4
Pour reconfigurer :
root@izenibm:/var/www# dpkg-reconfigure postfix
root@izenibm:~# apt-get install procmail
root@izenibm:~# apt-get install sasl2-bin
root@izenibm:~# apt-get install courier-authdaemon
root@izenibm:~# apt-get install courier-imap
répondre: Non
root@izenibm:~# apt-get install courier-imap-ssl
root@izenibm:~# apt-get install courier-pop
root@izenibm:~# apt-get install courier-pop-ssl
root@izenibm:~# adduser postfix sasl
Ajout de l’utilisateur [...] . . . → Read More: Installer Postfix sur ubuntu

Comment mettre en place un DNS sur Ubuntu

Server Bind9
root@izenibm:~# apt-get -s install bind9 (option –s = simulation)
root@izenibm:~# apt-get install bind9
root@izenibm:~# apt-get install bind9-doc
dans /etc/bind/named.conf.local
insérer :
zone « izen-services.com » {
type master;
file « /etc/bind/db.izen-services.com »;
};
zone « 0.168.192.in-addr.arpa » {
type master;
file « /etc/bind/db.192.168.0″;
};
Créer les fichier db.192.168.0 et db.izen-services.com
db.192.168.0
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA izenibm.izen-services.com. bdemolon.free.fr. (
2009081003
604800
86400
2419200
604800 )
@ IN NS izenibm.izen-services.com.
@ IN MX 10 mail2.izen-services.com.
1 IN [...] . . . → Read More: Comment mettre en place un DNS sur Ubuntu