安装新版的docker
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
配置代理
mkdir /etc/docker/
cd /etc/docker/
cat > /etc/docker/daemon.json <<EOF
{
"live-restore": true,
"group": "1000",
"registry-mirrors": ["http://7e61f7f9.m.daocloud.io"],
"graph": "/repo/docker"
}
EOF
systemctl daemon-reload
systemctl restart docker
systemctl enable docker
拉取bugzilla镜像
docker pull dklawren/docker-bugzilla
docker run -d -t --privileged --name Bugzilla --hostname bugzilla --publish 30700:80 -p 30701:22 -p 30702:5900 --restart always docker.io/dklawren/docker-bugzilla
这个镜像起来以后,工单系统就可以使用了,它自带了mysql,不需要再安装别的软件。网页登录http://135.251.x.x:30700/bugzilla既可
bugzilla使用
(1)error when closing pipe to /usr/lib/sendmail: Temp failure (EX_TEMPFAIL)这种错误
cd /home/bugzilla/devel/htdocs/Bugzilla
vi data/params修改smtpserver和mailfrom,maintainer,mail_delivery_method
./checksetup.pl重新编译一下,再发邮件就可以收到了。
(2)修改默认超级账户的密码,可以进入网页修改登录认证等参数,其实还是修改data/params文件,当你发现自己用户名和密码登录不了的时候,基本就是认证有问题,多次尝试,记得每次修改要生效需要跑一下脚本checksetup.pl
cd /home/bugzilla/devel/htdocs/bugzilla
./checksetup.pl --reset-password=admin@bugzilla.org
(3)进到bugzilla里面,设置自己为管理员
cd /home/bugzilla/devel/htdocs/Bugzilla
./checksetup.pl -t --make-admin=790575342@qq.com
(4)从数据库里删除某个用户
mysql -uroot -p
show databases;
use bugs;
show tables;
select * from profiles ;
delete from profiles where userid=2;
(5)备份数据和还原数据,
/usr/bin/docker exec bug mysqldump -u bugs --databases bugs > /repo/bugbackup/bug_10.14.sql
docker exec -i b8d2250c7227 /usr/bin/mysql -u bugs -pbugs < /repo/bug_20211014.sql