补充资料.

Signed-off-by: lion.chan <cy187lion@sina.com>
This commit is contained in:
lion.chan 2021-11-17 04:22:17 +08:00
parent f926b0ddba
commit fdba03040e
4 changed files with 190 additions and 4 deletions

View File

@ -0,0 +1,90 @@
# Ubuntu 18.04 安装和配置 BugZilla
## 安装基本环境
```bash
apt install wget vim build-essential apache2 mysql-server libmysqld-dev libmysqlclient-dev libnet-ssleay-perl libcrypt-ssleay-perl libapache-asp-perl mysql-server mysql-client pkg-config libgd-dev
# 开启相关服务
service apache2 start
service mysql start
```
## 配置 MySQL
```bash
# 配置 MySQL
$ mysql_secure_installation
Enter current password for root (enter for none):[password]
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] n
Reload privilege tables now? [Y/n] Y
# 创建 BugZilla 用户和表
$ mysql -u root -p
mysql> CREATE DATABASE bugs;
mysql> CREATE USER 'bugs'@'%' IDENTIFIED BY 'password';
mysql> GRANT ALL ON bugs.* TO 'bugs'@'%' IDENTIFIED BY 'password';
mysql> FLUSH privileges;
mysql> quit;
# 重启 MySQL 服务
$ service mysql restart
```
## 下载和安装 BugZilla
```bash
# 下载和解压
wget https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-5.0.6.tar.gz
tar -xvf bugzilla-5.0.6.tar.gz -C ./
mv bugzilla-5.0.6 /var/www/html/bugzilla
chown www-data:www-data -R /var/www/html/bugzilla
cd /var/www/html/bugzilla
# 安装所有缺失的依赖
perl install-module.pl --all
```
修改服务器目录下的 localconfig 文件,以对 BugZilla 服务器进行配置,主要修改的位置有:
```bash
$webservergroup = 'www-data';
$db_driver = 'mysql';
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'password';
$db_port = 3306;
```
配置完成后,运行 checksetup.pl 完成服务器的配置安装:
```bash
# 安装 BugZilla
perl checksetup.pl
```
## 配置 Apache2
修改 /etc/apache2/apache2.conf 文件,在 Directory 段加入:
```bash
<Directory /var/www/html/>
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride All
</Directory>
```
然后,需要开启 Apache2 的以下模块:
```bash
ln -s /etc/apache2/mods-available/cgi.load cgi.load
a2enmod cgi headers expires
```
最后通过以下命令开启 MySQL 和 Apache2 服务:
```bash
service mysql start
service apache2 start
```

View File

@ -99,12 +99,12 @@ docker run -it --net=<bridge/host/container:container name or id/none> -v <host
docker run -it -P --name=<a container name> --privileged -v /dev/bus/usb:/dev/bus/usb <image name/id> /bin/bash
# 映射 Nvidia GPU
docker run -it -P --name=<a container name> --privileged --device /dev/nvidia0:/dev/nvidia0 <image name/id> /bin/bash
# 退出并关闭容器:在容器的 shell 中直接
exit
# 查看正在运行的容器
docker ps
# 提交针对某容器的修改,将其保存为镜像
docker commit <container id> <repository>:<tag>
# 退出并关闭容器:在容器的 shell 中直接
exit
# 运行某已存在的容器
docker start <container id>
# 连接到已运行的容器上

View File

@ -0,0 +1,95 @@
# Ubuntu 18.04 安装和配置 Redmine
## Docker 方式安装
```bash
# Run Redmine with SQLite3
docker run -d -p 9001:3000 --name some-redmine redmine
# Run Redmine with a Database Container
docker run -d --name redminedb -e MYSQL_USER=redmine -e MYSQL_PASSWORD=<password> -e MYSQL_DATABASE=redmine -e MYSQL_ROOT_PASSWORD=<password> mariadb:latest
docker run -d --name redmine --link redminedb:mysql -p 9001:3000 -e REDMINE_DB_MYSQL=redminedb -e REDMINE_DB_USERNAME=redmine -e REDMINE_DB_PASSWORD=<password> redmine
```
## 安装基本环境
```bash
apt install vim apache2 libapache2-mod-passenger mysql-server mysql-client ruby ruby-dev
# 开启相关服务
service apache2 start
service mysql start
```
## 配置 MySQL
```bash
# 配置 MySQL
$ mysql_secure_installation
Enter current password for root (enter for none):[password]
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] n
Reload privilege tables now? [Y/n] Y
# 创建 Redmine 用户和表
# mysql -u root -p
# mysql> create database redmine;
# mysql> create user 'redmine'@'%' identified by 'password';
# mysql> grant all on redmine.* to 'redmine'@'%' identified by 'password' with grant option;
# mysql> flush privileges;
# mysql> quit;
# 重启 MySQL 服务
$ service mysql restart
```
## 安装和配置 Redmine
```bash
apt install redmine redmine-mysql
```
在安装过程中,系统将要求配置 Redmine选择 YES然后继续。数据库选择 MYSQL接下来为 Redmine 实例添加数据库访问密码,为上面创建的数据库 redmine 用户密码。
## 更新和配置 Ruby
```bash
gem update
gem install bundler
```
## 配置 Apache2
```bash
ln -s /usr/share/redmine/public /var/www/html/redmine
```
修改 /etc/apache2/mods-available/passenger.conf 文件如下:
```bash
<IfModule mod_passenger.c>
PassengerDefaultUser www-data
PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/bin/ruby
</IfModule>
```
为 Redmine 配置 Apache2 站点配置文件。该文件将控制用户访问 Redmine 内容的方式。运行以下命令以创建一个名为 redmine.conf 的新配置文件:
```bash
vim /etc/apache2/sites-available/redmine.conf
<VirtualHost *:80>
ServerAdmin redmime@xiem.com
DocumentRoot /var/www/html/redmine
ServerName xiem.com
ServerAlias redmine.xiem.com
<Directory /var/www/html/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
a2ensite redmine.conf
```

View File

@ -53,8 +53,9 @@
49. Graphviz Markdown Preview (Geek Learning)
50. Docker (Microsoft)
51. Remote - Containers (Microsoft)
52. Todo+ (Fabio Spampinato)
53. Draw.io Integration (Henning Dieterichs)
52. Remote - SSH (Microsoft)
53. Todo+ (Fabio Spampinato)
54. Draw.io Integration (Henning Dieterichs)
## Theme