Changes
Page history
Create SonarInstall
authored
Dec 19, 2019
by
Ioan-Marius Bilasco
Show whitespace changes
Inline
Side-by-side
SonarInstall.md
0 → 100644
View page @
6333d4aa
### Instalation
-
Si vous souhaitez installer Sonar (avec support PHP) sur vos machines Linux, voici la marche à suivre :
```
echo "deb http://downloads.sourceforge.net/project/sonar-pkg/deb binary/" >>/etc/apt/sources.list
apt-get update
apt-get install make php5-dev maven2 sonar -y --force-yes
export http_proxy=http://cache-etu.univ-lille1.fr:3128
cd /tmp
wget wget http://pear.php.net/go-pear.phar
php /tmp/go-pear.phar
cd
# pear config-set http_proxy cache-etu.univ-lille1.fr:3128
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony.com
pear install phpunit/PHPUnit
pecl install xdebug
cp /etc/php5/cli/php.ini /etc/php5/cli/php.ini.old
echo "zend_extension=/usr/lib/php5/20100525/xdebug.so" >>/etc/php5/cli/php.ini
pear channel-discover pear.pdepend.org
pear install pdepend/PHP_Depend
pear channel-discover pear.phpmd.org
pear install --alldeps phpmd/PHP_PMD
pear install PHP_CodeSniffer
/etc/init.d/sonar start
/etc/init.d/sonar stop
#cette partie permet de configurer le proxy au M5
echo "wrapper.java.additional.3=-Dhttp.proxySet=true" >> /opt/sonar/conf/wrapper.conf
echo "wrapper.java.additional.4=-Dhttp.proxyHost=cache-etu.univ-lille1.fr" >> /opt/sonar/conf/wrapper.conf
echo "wrapper.java.additional.5=-Dhttp.proxyPort=3128" >> /opt/sonar/conf/wrapper.conf
echo "wrapper.java.additional.6=-Dhttp.proxyUser=" >> /opt/sonar/conf/wrapper.conf
echo "wrapper.java.additional.7=-Dhttp.proxyPassword=" >> /opt/sonar/conf/wrapper.conf
/etc/init.d/sonar start
```
-
si le sonar mis à disposition tournent sur des machines derrière un pare-feu sur le port 9000 (qui est bloqué par un pare-feu), pour qu'il devient accessible depuis vos machines il faut construire un tunnel ssh
```
#depuis votre poste local
bilasco@b12pXX:~$ ssh -L 5000:127.0.0.1:9000 userX@ifidecX.fil.univ-lille1.fr
#ensuite ouvrez http://127.0.0.1:5000 pour accéder à la page Sonar
```
\ No newline at end of file