Bugzilla Study Note

穆博简
2023-12-01

ENV

Base repository

# vim /etc/yum.repos.d/CentOS.repo

[base]
name=CentOS-7.9.2009 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.9.2009/os/$basearch/
        http://mirrors.aliyuncs.com/centos/7.9.2009/os/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-7.9.2009 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.9.2009/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/7.9.2009/updates/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-7.9.2009 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.9.2009/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/7.9.2009/extras/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7.9.2009 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.9.2009/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/7.9.2009/centosplus/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7.9.2009/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

#contrib - packages by Centos Users
[contrib]
name=CentOS-7.9.2009 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.9.2009/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/7.9.2009/contrib/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/7.9.2009/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

EPEL Repository

# rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/epel/epel-release-latest-7.noarch.rpm
# yum clean all && yum makecache

Dependence

# yum install httpd mysql-server mod_perl mod_perl-devel httpd-devel gd-devel mysql-devel graphviz patchutils gcc 'perl(Apache2::SizeLimit)' 'perl(Authen::Radius)' 'perl(Authen::SASL)' 'perl(Cache::Memcached)' 'perl(CGI)' 'perl(Chart::Lines)' 'perl(Daemon::Generic)' 'perl(Date::Format)' 'perl(DateTime)' 'perl(DateTime::TimeZone)' 'perl(DBI)' 'perl(Digest::SHA)' 'perl(Email::MIME)' 'perl(Email::Reply)' 'perl(Email::Sender)' 'perl(Encode)' 'perl(Encode::Detect)' 'perl(File::MimeInfo::Magic)' 'perl(GD)' 'perl(GD::Graph)' 'perl(GD::Text)' 'perl(HTML::FormatText::WithLinks)' 'perl(HTML::Parser)' 'perl(HTML::Scrubber)' 'perl(IO::Scalar)' 'perl(JSON::RPC)' 'perl(JSON::XS)' 'perl(List::MoreUtils)' 'perl(LWP::UserAgent)' 'perl(Math::Random::ISAAC)' 'perl(MIME::Parser)' 'perl(mod_perl2)' 'perl(Net::LDAP)' 'perl(Net::SMTP::SSL)' 'perl(PatchReader)' 'perl(SOAP::Lite)' 'perl(Template)' 'perl(Template::Plugin::GD::Image)' 'perl(Test::Taint)' 'perl(TheSchwartz)' 'perl(URI)' 'perl(XMLRPC::Lite)' 'perl(XML::Twig)' perl-ExtUtils-Embed perl-CPAN *YAML* *lsb*

Mysql

uninstall the mysql&mariadb in the system

# rpm -qa | grep mysql | xargs yum remove -y
# rpm -qa | grep mariadb | xargs yum remove -y
# find / -name mysql -exec rm -rf {} \;

install mysql

# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.30-1.el7.x86_64.rpm-bundl.tar

Attention: Install in the following order!

# rpm -ivh mysql-community-common-5.7.30-1.el7.x86_64.rpm
# rpm -ivh mysql-community-libs-5.7.30-1.el7.x86_64.rpm
# rpm -ivh mysql-community-devel-5.7.30-1.el7.x86_64.rpm
# rpm -ivh mysql-community-client-5.7.30-1.el7.x86_64.rpm
# rpm -ivh mysql-community-server-5.7.30-1.el7.x86_64.rpm

Configure mysql

Get mysql initial password in /var/log/mysqld.log
# vim /var/log/mysqld.log
...
[Note] A temporary password is generated for root@localhost: xxxxxxx
...

# mysql -uroot -p'xxxxxxx' -e "set password = password('new_root_password');create user 'bugzilla'@'localhost' identified by 'bugzilla_mysql_password';create database bugs;use bugs;grant all privileges on bugs to 'bugzilla'@'localhost';GRANT ALL PRIVILEGES ON *.* TO 'bugzilla'@'localhost';flush privileges;"

# systemctl restart mysql
# systemctl enable mysql

Install Bugzilla

# wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz
# tar -xvf bugzilla-5.0.6.tar.gz -C /var/www/html
# mv /var/www/html/bugzilla-5.0.6 /var/www/html/bugzilla && chown -R apache:apache /var/www/html/bugzilla

# cd /var/www/html/bugzilla
# /usr/bin/perl install-module.pl –all

# ./checksetup.pl
It must fail at the first time, you need to modify the file 'localconfig' which generated by checksetup.pl.
# vim localconfig
...
$db_user = 'bugzilla';
...
$db_pass = 'bugzilla_mysql_password';
# ./checksetup.pl
Finally, you shall get the message "checksetup.pl complete.". If not, please check your mysql configuration.

Configure Apache

# vim /etc/httpd/conf/httpd.conf
Add the following text:

<Directory /var/www/html/bugzilla>
  AddHandler cgi-script .cgi
  Options +ExecCGI +FollowSymLinks
  DirectoryIndex index.cgi index.html
  AllowOverride all
  Require all granted
</Directory>

# systemctl restart httpd
# systemctl enable httpd

End

 类似资料:

相关阅读

相关文章

相关问答