更换版本需要重新创建数据库和用户。
安装mysql后配置mysql:
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04
mysql -u root -p //创建用户
create database bugs;//创建数据库
grant all on bugs.* to root@localhost identified by "123456"; //赋予root用户权限
FLUSH PRIVILEGES;
exit
systemctl status mysql.service
1、su
2、apt-get install apache2 mysql-server libmysqld-dev libmysqlclient-dev gcc -y
3、apt-get install libnet-ssleay-perl libcrypt-ssleay-perl -y
4、apt install libgd-dev libgdbm-dev libapache2-mod-perl2 libemail-sender-perl libemail-mime-perl libemail-mime-modifier-perl -y
apt install apache2 mysql-server libappconfig-perl libdate-calc-perl libtemplate-perl build-essential libdatetime-timezone-perl libdatetime-perl libemail-sender-perl libemail-mime-perl libdbi-perl libdbd-mysql-perl libcgi-pm-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libapache2-mod-perl2 libapache2-mod-perl2-dev libchart-perl libxml-perl libxml-twig-perl perlmagick libgd-graph-perl libtemplate-plugin-gd-perl libsoap-lite-perl libhtml-scrubber-perl libjson-rpc-perl libdaemon-generic-perl libtheschwartz-perl libtest-taint-perl libauthen-radius-perl libfile-slurp-perl libencode-detect-perl libmodule-build-perl libnet-ldap-perl libauthen-sasl-perl libfile-mimeinfo-perl libhtml-formattext-withlinks-perl libfile-which-perl libgd-dev libmysqlclient-dev lynx-common graphviz python-sphinx rst2pdf
5、
6、cd /var/www/html
7、wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz
8、tar -zxvf bugzilla-5.0.6.tar.gz
9、cd bugzilla/
10、perl install-module.pl --all
perl install-module.pl Class::XSAccessor
11、perl checksetup.pl
12、vi localconfig
$webservergroup设置为www-data
$db_user与$db_pass
13、vi /etc/apache2/apache2.conf
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All
Require all granted
14、ln -s /etc/apache2/mods-available/cgi.load cgi.load
15、a2enmod cgi headers expires rewrite
16、 ./testserver.pl http://localhost/bugzilla
17、apt install mailutils //使用sendmail服务器发送邮件。
17、配置邮件服务器
[root@localhost data]# vim params ##修改如下红色内容
'mail_delivery_method' => 'SMTP',
'mailfrom' => '[email protected]', ###mailfrom要和maintainer保持一致,为bugzilla发送人地址。
'maintainer' => '[email protected]',
'smtp_password' => '######', ###在163页面授权时的设置的密码
'smtp_username' => '[email protected]', ###发送人邮箱
'smtpserver' => 'smtp.163.com', ####服务代理
'urlbase' => 'http://192.168.69.20/', ###bugzilla访问地址,根据实际填写
/etc/init.d/apache2 restart