Résumé : Présentation de la solution de commerce électronique et installation préalable à la mise en place d'un site de ce type : OpenSSL, MySQL, APACHE, MOD_SSL, PHP -
Lire l'article
Le but de ce document est de vous aider à installer une solution de commerce électronique à base de logiciels libres en se basant notammant sur une architecture LAMP (Linux, Apache, MySQL, PHP) ainsi que sur la solution OsCommerce couplée au module de paiement SIPS/ATOS avec le service MERCANET de la BNP pour assurer le paiement en ligne des produits achetés.
Installer et configurer MySQL :
root@pimp_osc:~ # groupadd mysql
root@pimp_osc:~ # adduser -g mysql -d /usr/local/mysql mysql
root@pimp_osc:~ # rm -fr /usr/local/mysql/
root@pimp_osc:~ # cd /usr/local/
root@pimp_osc:/usr/local/ # wget mir2.ovh.net/ftp.mysql.com/Downloads/MySQL-4.1/mysql-standard-4.1.22-
pc-linux-gnu-i686.tar.gz
root@pimp_osc:/usr/local # tar -zxvf mysql-standard-4.1.22-pc-linux-gnu-i686.tar.gz
root@pimp_osc:/usr/local # ln -s mysql-standard-4.1.22-pc-linux-gnu-i686 mysql
root@pimp_osc:/usr/local # cd mysql-standard-4.1.22-pc-linux-gnu-i686
root@pimp_osc:/usr/local # cd mysql
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # scripts/mysql_install_db --user=mysql
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # chown -R root .
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # chown -R mysql data
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # chgrp -R mysql .
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # ./bin/mysqld_safe &
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # ./bin/mysqladmin -h localhost -u root password ''mymost_wanted_passwordlsq''
root@pimp_osc:/usr/local/mysql-standard-4.1.22-pc-linux-gnu-i686 # ./bin/mysqladmin -h localhost -u root -p''mymost_wanted_passwordlsq'' password ''mymost_wanted_passwordlsqosc''
root@pimp_osc:/usr/local/ # cd ..
root@pimp_osc:/usr/local # rm -fr mysql-standard-4.1.22-pc-linux-gnu-i686.tar.gz
Installer et configurer OpenSSL :
root@pimp_osc:/usr/local # rm -fr /usr/local/ssl/
root@pimp_osc:/usr/local # wget www.openssl.org/source/openssl-0.9.8e.tar.gz
root@pimp_osc:/usr/local # tar -zxvf openssl-0.9.8e.tar.gz
root@pimp_osc:/usr/local # chown -R root.root openssl-0.9.8e
root@pimp_osc:/usr/local # cd openssl-0.9.8e
root@pimp_osc:/usr/local/openssl-0.9.8e # ./config shared
root@pimp_osc:/usr/local/openssl-0.9.8e # make
root@pimp_osc:/usr/local/openssl-0.9.8e # make install
root@pimp_osc:/usr/local/openssl-0.9.8e # echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
root@pimp_osc:/usr/local/openssl-0.9.8e # ldconfig
root@pimp_osc:/usr/local/openssl-0.9.8e # vi /etc/profile
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ssl/bin"
root@pimp_osc:/usr/local/openssl-0.9.8e # source /etc/profile
root@pimp_osc:/usr/local/openssl-0.9.8e # cd ..
root@pimp_osc:/usr/local # openssl version
OpenSSL 0.9.8e 14 Mar 2007
root@pimp_osc:/usr/local # rm -fr openssl-0.9.8e.tar.gz
root@pimp_osc:/usr/local # rm -fr openssl-0.9.8e
Configurer l'installation d'Apache :
root@pimp_osc:/usr/local # rm -fr /usr/local/apache
root@pimp_osc:/usr/local # wget apache.crihan.fr/dist/httpd/apache_1.3.37.tar.gz
root@pimp_osc:/usr/local # tar -zxvf apache_1.3.37.tar.gz
Installer le patch HARD_SERVER_LIMIT :
root@pimp_osc:/usr/local # rm -fr /usr/local/apache-patch_HARD_SERVER_LIMIT.txt
root@pimp_osc:/usr/local # wget www.delouw.ch/linux/apache-patch_HARD_SERVER_LIMIT.txt
root@pimp_osc:/usr/local # cp apache-patch_HARD_SERVER_LIMIT.txt ./apache_1.3.37/src/include
root@pimp_osc:/usr/local # cd ./apache_1.3.37/src/include/
root@pimp_osc:/usr/local/apache_1.3.37/src/include # patch -p0 < ./apache-patch_HARD_SERVER_LIMIT.txt
root@pimp_osc:/usr/local/apache_1.3.37/src/include # cd ../../../
Installer Mod_SSL :
root@pimp_osc:/usr/local # wget www.modssl.org/source/mod_ssl-2.8.28-1.3.37.tar.gz
root@pimp_osc:/usr/local # tar -zxvf mod_ssl-2.8.28-1.3.37.tar.gz
root@pimp_osc:/usr/local # cd ./mod_ssl-2.8.28-1.3.37
root@pimp_osc:/usr/local/mod_ssl-2.8.28-1.3.37 # ./configure --with-apache=/usr/local/apache_1.3.37
root@pimp_osc:/usr/local/mod_ssl-2.8.28-1.3.37 # cd ..
root@pimp_osc:/usr/local # rm -fr mod_ssl-2.8.28-1.3.37.tar.gz
root@pimp_osc:/usr/local # rm -fr mod_ssl-2.8.28-1.3.37
Installer Apache :
root@pimp_osc:/usr/local # groupadd www-data
root@pimp_osc:/usr/local # useradd www-data -d /dev/null -g www-data -s /sbin/nologin
root@pimp_osc:/usr/local # cd ./apache_1.3.37
root@pimp_osc:/usr/local/apache_1.3.37 # ./configure --prefix=/usr/local/apache --enable-module=ssl --enable-module=so --server-uid=www-data --server-gid=www-data --enable-module=status --enable-module=cgi --enable-module=include --enable-module=auth --enable-module=dir --enable-module=env --enable-module=setenvif --enable-module=userdir --enable-module=imap --enable-module=negotiation --enable-module=log_config --enable-module=asis --enable-module=autoindex --enable-module=mime --enable-module=access --enable-module=rewrite –enable-shared=max
root@pimp_osc:/usr/local/apache_1.3.37 # make
root@pimp_osc:/usr/local/apache_1.3.37 # make certificate
The generated X.509 CA certificate can contain either
RSA or DSA based ingredients. Select the one you want to use.
Signature Algorithm ((R)SA or (D)SA) [R]: R
---------------------------------------------------------------------
1. Country Name (2 letter code) [XY]:FR
2. State or Province Name (full name) [Snake Desert]:France
3. Locality Name (eg, city) [Snake Town]:Paris
4. Organization Name (eg, company) [Snake Oil, Ltd]: Infratech
5. Organizational Unit Name (eg, section) [Webserver Team]:TechTeam
6. Common Name (eg, FQDN) [www.snakeoil.dom]: bank.secuobs.com
7. Email Address (eg, name@FQDN) [www@snakeoil.dom]:xavier.poli@infratech.fr
8. Certificate Validity (days) [365]:
---------------------------------------------------------------------
: STEP 3: Generating X.509 certificate signed by Snake Oil CA [server.crt]
Certificate Version (1 or 3) [3]: 3
---------------------------------------------------------------------
STEP 4: Enrypting RSA private key with a pass phrase for security [server.key]
The contents of the server.key file (the generated private key) has to be
kept secret. So we strongly recommend you to encrypt the server.key file
with a Triple-DES cipher and a Pass Phrase.
Encrypt the private key now? [Y/n]: Y
writing RSA key
Enter PEM pass phrase: most_wanted_password
Verifying - Enter PEM pass phrase: most_wanted_password
root@pimp_osc:/usr/local/apache_1.3.37 # make install
root@pimp_osc:/usr/local/apache_1.3.37 # cd ../
root@pimp_osc:/usr/local # rm -fr apache_1.3.37.tar.gz
root@pimp_osc:/usr/local # rm -fr apache_1.3.37
Installer PHP :
root@pimp_osc:/usr/local # wget fr.php.net/get/php-4.4.7.tar.gz/from/this/mirror
root@pimp_osc:/usr/local # tar -zxvf php-4.4.7.tar.gz
root@pimp_osc:/usr/local # cd ./php-4.4.7
root@pimp_osc:/usr/local/php-4.4.7 #./configure --with-mysql=/usr/local/mysql –with-apxs=/usr/local/apache/bin/apxs
root@pimp_osc:/usr/local/php-4.4.7 # make
root@pimp_osc:/usr/local/php-4.4.7 # make install
root@pimp_osc:/usr/local/php-4.4.7 # cp php.ini-dist /usr/local/lib/php.ini
root@pimp_osc:/usr/local/php-4.4.7 # cd ..
root@pimp_osc:/usr/local/ # rm -fr php-4.4.7.tar.gz
root@pimp_osc:/usr/local/ # rm -fr php-4.4.7
Autres ressources dans ce dossier :
[osCommerce - Partie 2] Configuration préalable -
lien
[osCommerce - Partie 3] Configuration d'osCommerce et installation d'ATOS/SIPS -
lien
[osCommerce - Partie 4] MERCANET et configuration ATOS/SIPS -
lien
[osCommerce - Partie 5] Sécurisation et finalisation -
lien
- Article suivant : [osCommerce - Partie 2] Configuration préalable
- Article précédent : Atlas, un portail de monitoring des risques internet au niveau global
- Article suivant dans la catégorie Tutoriels : [osCommerce - Partie 2] Configuration préalable
- Article précédent dans la catégorie Tutoriels : Test du routeur Linksys ADSL2MUE
| Mini-Tagwall des articles publiés sur SecuObs : | |
| |
sécurité, windows, exploit, microsoft, réseau, attaque, vulnérabilité, système, audit, outil, virus, internet, données, linux, présentation, bluetooth, vista, metasploit, protocol, shell, scanner, réseaux, trames, téléphone, paquet, wishmaster, rootkit, engineering, sysun, https, black, mobile, noyau, téléphones, conférence, mémoire, source, scapy, google, reverse, détection, malveillant, snort, sécurise, patch |
| Mini-Tagwall de l'annuaire video : | |
| |
virus, spyware, vmware, firmware, security, malware, lockpicking, biometric, kernel, iphone, windows, adware, password, wimax, botnet, tutorial, phish, linux, symantec, rootkit, knoppix, metasploit, network, attack, server, virtual, internet, jailbreak, notacon, conference, exploit, google, wireshark, defcon, hacker, backtrack, openbsd, intel, ettercap, firewall, source, samsung, reprap, wireless, norton |
| Mini-Tagwall des articles de la revue de presse : | |
| |
security, microsoft, vulnérabilité, windows, vulnerability, network, attack, google, hacker, exploit, inject, internet, remote, server, mobile, malware, apple, iphone, black, patch, sécurité, virus, linux, ebook, conficker, crypt, source, intel, virtual, facebook, access, trojan, twitter, research, firefox, overflow, pirate, phish, vista, cisco, obama, office, local, opera, adobe |
| Mini-Tagwall des Tweets de la revue Twitter : | |
| |
security, cisco, linux, defcon, firewall, vmware, metasploit, attack, server, phish, network, twitter, windows, exploit, nessus, botnet, backtrack, inject, crypt, wireshark, vulnerabi, python, acking, iphone, black, source, engineering, google, conficker, social, clouds, vulnerability, patch, pentest, podcast, virus, juniper, hacker, apple, client, proxy, apache, virtual, complianc, compliance |
Poster un commentaire sur cet article: