From fdba03040e26d824ea823bf3b89401d40aef7a99 Mon Sep 17 00:00:00 2001 From: "lion.chan" Date: Wed, 17 Nov 2021 04:22:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=B5=84=E6=96=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lion.chan --- .../Ubuntu_18.04_安装和配置_BugZilla.md | 90 ++++++++++++++++++ .../Applications/Docker/Docker_安装和使用.md | 4 +- .../Ubuntu_18.04_安装和配置_Redmine.md | 95 +++++++++++++++++++ .../VSCode/VSCode_常用插件列表.md | 5 +- 4 files changed, 190 insertions(+), 4 deletions(-) create mode 100644 Software/Applications/BugZilla/Ubuntu_18.04_安装和配置_BugZilla.md create mode 100644 Software/Applications/Redmine/Ubuntu_18.04_安装和配置_Redmine.md diff --git a/Software/Applications/BugZilla/Ubuntu_18.04_安装和配置_BugZilla.md b/Software/Applications/BugZilla/Ubuntu_18.04_安装和配置_BugZilla.md new file mode 100644 index 0000000..baa81e2 --- /dev/null +++ b/Software/Applications/BugZilla/Ubuntu_18.04_安装和配置_BugZilla.md @@ -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 + + AddHandler cgi-script .cgi + Options +ExecCGI + DirectoryIndex index.cgi index.html + AllowOverride All + +``` + +然后,需要开启 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 +``` diff --git a/Software/Applications/Docker/Docker_安装和使用.md b/Software/Applications/Docker/Docker_安装和使用.md index 1716ec4..f2ebd78 100644 --- a/Software/Applications/Docker/Docker_安装和使用.md +++ b/Software/Applications/Docker/Docker_安装和使用.md @@ -99,12 +99,12 @@ docker run -it --net= -v --privileged -v /dev/bus/usb:/dev/bus/usb /bin/bash # 映射 Nvidia GPU docker run -it -P --name= --privileged --device /dev/nvidia0:/dev/nvidia0 /bin/bash +# 退出并关闭容器:在容器的 shell 中直接 +exit # 查看正在运行的容器 docker ps # 提交针对某容器的修改,将其保存为镜像 docker commit : -# 退出并关闭容器:在容器的 shell 中直接 -exit # 运行某已存在的容器 docker start # 连接到已运行的容器上 diff --git a/Software/Applications/Redmine/Ubuntu_18.04_安装和配置_Redmine.md b/Software/Applications/Redmine/Ubuntu_18.04_安装和配置_Redmine.md new file mode 100644 index 0000000..99e9028 --- /dev/null +++ b/Software/Applications/Redmine/Ubuntu_18.04_安装和配置_Redmine.md @@ -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= -e MYSQL_DATABASE=redmine -e MYSQL_ROOT_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= 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 + + PassengerDefaultUser www-data + PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini + PassengerDefaultRuby /usr/bin/ruby + +``` + +为 Redmine 配置 Apache2 站点配置文件。该文件将控制用户访问 Redmine 内容的方式。运行以下命令以创建一个名为 redmine.conf 的新配置文件: + +```bash +vim /etc/apache2/sites-available/redmine.conf + + + ServerAdmin redmime@xiem.com + DocumentRoot /var/www/html/redmine + ServerName xiem.com + ServerAlias redmine.xiem.com + + + RailsBaseURI /redmine + PassengerResolveSymlinksInDocumentRoot on + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + +a2ensite redmine.conf +``` diff --git a/Software/Applications/VSCode/VSCode_常用插件列表.md b/Software/Applications/VSCode/VSCode_常用插件列表.md index 724d772..f469315 100644 --- a/Software/Applications/VSCode/VSCode_常用插件列表.md +++ b/Software/Applications/VSCode/VSCode_常用插件列表.md @@ -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