linuxpeter.de
  Batch, Scripts, Tools & Tips > Linux scripts and tools  
 
Linux scripts and tools
<< Neue lokale Festplatte am Xenserver bekannt machen Index Mit PHP eine Mysql - Datenbank auslesen >>
Installation Upgrade Restore Bugzilla Installation Upgrade Umzug Restore Bugzilla auf Ubuntu LTS

BUGZILLA INSTALLATION
#####################
# Schritt für Schritt zur Installation/Upgrade/Restore von Bugzilla
# In diesem Beispiel auf Grundlage von Ubuntu LTS
# Wenn man Putty verwendet, kann man per Copy&Paste die Befehle einfügen
#
# Voraussetzung: Ubuntu LTS 10.04.3-server mit LAMP

#prüfen ob Perl da ist
perl -v

#Bugzilla download und Installation

cd /var/www
ls
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.0.2.tar.gz
tar -xvf bugzilla-4.0.2.tar.gz
mv bugzilla bugzilla-old
mv bugzilla-4.0.2 bugzilla
cd bugzilla
./checksetup.pl --check-modules


#Jetzt müssen die fehlenden Perl-Module installiert werden.
# z.B. DateTime
# Dazu lässt man das passende Paket suchen:
apt-cache search perl DateTime
# und installiert es dann
apt-get install libdatetime-perl

# und noch viele mehr:
apt-get install libtemplate-perl libtemplate-perl-doc libemail-send-perl libgd-gd2-perl libchart-perl libgd-graph-perl libgd-text-perl libgd-graph3d-perl php5-gd libapache2-mod-perl2 libapache2-mod-perl2-dev libapache2-mod-perl2-doc gcc libjson-xs-perl libtest-taint-perl

# einige Module müssen direkt überPerl installiert werden:
/usr/bin/perl install-module.pl Math::Random::Secure
/usr/bin/perl install-module.pl Apache2::SizeLimit
/usr/bin/perl install-module.pl Template


#alternativ dazu kann man auch das hier probieren:
perl -MCPAN -e 'install Bundle::Bugzilla'

# Bei Update oder Restore
# Kopieren der Konfigurationen und des Ordners "data"
cp ../bugzilla-old/localconfig* .
cp -r ../bugzilla-old/data .


# bei Neuinstallation muss halt die localconfig angepasst werden
vi /var/www/bugzilla/localconfig

#Hier mal die relevanten Zeilen:
$create_htaccess = 1;
$webservergroup = 'www-data'; <--- Die Gruppe bei Ubuntu
$use_suexec = 0;
$db_driver = 'mysql';  <--- Verwendete Datenbank
$db_host = 'localhost';
$db_name = 'bugs3'; #bei mir, da ich von Bugzilla 3 update
$db_user = 'bugs';
$db_pass = 'ein-passwort';
$db_port = 0;
$db_sock = '';
$db_check = 1;
$index_html = 0;
$cvsbin = '/usr/bin/cvs';
$interdiffbin = '';
$diffpath = '/usr/bin';
$site_wide_secret = 'A random string is generated by default'; <--- wird vom System während der Installation generiert


#Noch ein wenig Datenbankanpassung
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#MySQL
=====
#Welche Datenbanken gibt es?
mysql- -u root -p
password:
show databases;
Ergebnis:
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+

#Datenbank anlegen:
create database bugs3;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| bugs3              |
| mysql              |
+--------------------+

#User mit den richtigen Berechtigungen anlegen:
GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, LOCK TABLES, CREATE TEMPORARY TABLES, DROP, REFERENCES ON bugs3.* TO bugs@localhost IDENTIFIED BY 'ein-passwort';

#und raus:
quit;

#Jetzt das Backup wieder herstellen (bei Restore oder Update/Umzug auf neuen Server):
mysql -u root -p bugs3 < /restore/bugs3

#APACHE#

cd /etc/apache2/sites-available
#Virtuellen Host für Bugzilla anlegen
vi bugzilla

############################Dateianfang############################################
#<VirtualHost *:80>
    Alias /bugzilla /var/www/bugzilla/

    <Directory "/var/www/bugzilla/">
        AddHandler cgi-script cgi
        DirectoryIndex index.cgi
        Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch +FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/var/www/bugzilla/data">
        Options +FollowSymLinks -Indexes
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/var/www/bugzilla/js">
        Options +FollowSymLinks -Indexes
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    <Directory "/var/www/bugzilla/skins">
        Options +FollowSymLinks -Indexes
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
#</VirtualHost>

############################Dateiende############################################

#Jetzt noch die Bugzillaseite aktivieren:
a2ensite bugzilla

ls /etc/apache2/sites-enabled

sollte jetzt den Eintrag "bugzilla" zeigen.

# Jetzt
/etc/init.d/apache2 reload
oder
/etc/init.d/apache2 restart

#Noch einmal den Bugzilla prüfen:
./checksetup.pl
# bei einem Upgrade von einer älteren version kann ein Hinweis kommen, dass auf UTF-8 (Unicode) umgestellt werden muss.
# Determines whether to use UTF-8 (Unicode) encoding for all text in Bugzilla.
#New installations should set this to true to avoid character encoding problems.
#Existing databases should set this to true only after the data has been converted from existing legacy character encoding to UTF-8,
#using the contrib/recode.pl script.

#Erst einmal einen Trockendurchlauf im Bugzilla-Verzeichnis:
./contrib/recode.pl --dry-run --guess

#bei mir fehlte noch etwas um die Option "guess" verwenden zu können
apt-get install libencode-detect-perl

# und nochmal in echt
./contrib/recode.pl --guess

./checksetup.pl

/etc/init.d/apache2 restart

#Jetzt sollte der Bugzilla (wieder) verfügbar sein

 



Last updated by Bikerpete (bikerpete)  on Oct 07 2011  at 11:01 AM
<< Neue lokale Festplatte am Xenserver bekannt machen Index Mit PHP eine Mysql - Datenbank auslesen >>


Info

Buy me a coffee ...


 
Top! Top!