如何在 CentOS 8 上安装 OrangeScrum
在此页
- 要求
- 开始
- 安装 LAMP 服务器。
- 1。安装 Apache Web 服务器
- 2。安装和配置 MariaDB
- 3。安装和配置 PHP
Orangescrum 是一个使用 CakePHP 编写的开源协作 Web 应用程序。它使用简单易用的工具来管理项目、团队、文档、任务,并就重要问题与团队进行沟通。它是中小型企业广泛使用的工具。 Orangescrum 具有许多有用的功能,如敏捷项目管理、协作、问题跟踪、通知、报告、任务管理、对话线程和许多其他功能,这些功能将加快工作流程以交付高质量的项目。
要求
- 操作系统:- Centos 8
- 具有 sudo 权限的非根用户。
- 如果 STRICT 模式已开启,请将其关闭。在数据库服务器中。
入门
首先,使用 sudo 权限登录 Centos 系统并使用以下命令更新系统:-
dnf update
安装 LAMP 服务器。
1. 安装 Apache Web 服务器
通过以下命令安装 Apache Web 服务器:
sudo dnf -y install httpd
现在使用以下命令检查 apache 服务
systemctl status httpd
如果 apache 服务不工作然后启动并使其在启动时启动,使用以下命令:-
sudo systemctl start httpd
sudo systemctl enable httpd2.安装配置MariaDB
通过执行以下命令安装 MariaDB 服务器:
sudo dnf install mariadb-server
现在启动 MariaDB 服务并使其在启动时启动,然后使用以下命令检查 MariaDB 服务状态:-
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo systemctl status mariadb接下来,您需要保护数据库服务器,为此在终端中运行以下命令:-
sudo mysql_secure_installation
在这里,设置一个强密码并对所有问题回答是
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y您的 MariaDB 安装现在是安全的。
接下来,登录到 MariaDB 控制台,如下所示:
sudo mysql -u root -p
接下来,您需要为 MariaDB 禁用严格模式。首先,验证 MariaDB 以哪种模式运行:
MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode';
它将向您显示如下输出:
+---------------+-------------------------------------------------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------------------------------------------------+
| sql_mode | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+-------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)接下来,您可以通过运行以下命令来禁用严格模式:
MariaDB [(none)]> SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
然后,您可以通过运行以下命令来验证是否禁用了严格模式:
MariaDB [(none)]> SELECT @@GLOBAL.sql_mode;
然后重启 MariaDB 服务。
sudo systemctl restart mariadb
接下来,您需要登录到 MariaDB 控制台并为 Orangescrum 创建一个数据库。运行以下命令创建数据库
sudo mysql -u root -p
出现提示时输入您的 root 密码并运行以下命令:-
MariaDB [(none)]> CREATE DATABASE orangescrum;
Now create a new user and grant the required permissions to the user for the database.
MariaDB [(none)]> CREATE USER 'orangescrum_user'@'localhost' IDENTIFIED BY 'YourStrongPassword';
Then grant privileges to the orangescrum database with the following command:-
GRANT ALL PRIVILEGES ON orangescrum.* TO 'orangescrumuser'@'localhost' IDENTIFIED BY 'YourStrongPassword' WITH GRANT OPTION;现在运行以下命令以立即应用对数据库权限的更改。
MariaDB [(none)]> FLUSH 特权;
接下来,退出 MySQL shell:
MariaDB [(无)]> 退出
3.安装配置PHP
接下来,您需要安装 PHP 包,从终端运行以下命令
sudo dnf install php php-cli php-mysqlnd php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-curl php-opcache php-bcmath php-fpm
安装完所有包后,现在您需要根据 OrangeScrum 的要求在 php.ini 文件中进行一些更改:
首先,备份php.ini
cp /etc/php.ini /etc/php.ini.bak
接下来编辑php.ini文件
sudo vim /etc/php.ini
查找并将值从 2M 更改为 200M:
post_max_size=200M
upload_max_filesize=200M保存并关闭文件。
下一步,您需要重新启动 apache 网络服务器以应用更改,运行以下命令:-sudo systemctl restart httpd
安装 Orangescrum
要下载 Orangescrum 的开源版本,请运行以下命令:
sudo wget https://github.com/Orangescrum/orangescrum/archive/master.zip
然后通过运行解压缩下载的文件
sudo unzip master.zip
这将创建 orangescrum-master 目录。
现在将 orangescrum-master 目录移动到您的 Apache Web 目录。你可以通过运行来做到这一点:sudo mv orangescrum-master /var/www/html/
Next 为 orangescrum-master 目录赋予正确的权限:
sudo chown -R apache:apache /var/www/html/orangescrum-master
sudo chmod -R 777 /var/www/html/orangescrum-master为Orangescrum配置Apache
首先,为Orangescrum创建一个虚拟主机文件,sudo vim /etc/httpd/conf.d/orangescrum.conf
然后添加以下内容:
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html/orangescrum-master
<Directory /var/www/html/orangescrum-master>
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>保存并退出:
:wq!
完成后,检查配置的语法。为此运行以下命令:-
sudo apachectl configtest
语法检查完成后,重启 Apache 服务:
sudo systemctl restart httpd
配置 Orangescrum
现在使用以下命令将 OrangeScrum 数据导入 orangescrum 数据库,如下所示:
mysql -u orangescrum_user -p orangescrum < /var/www/html/orangescrum-master/database.sql
现在您需要编辑 database.php 文件以更新数据库连接详细信息:
vim /var/www/html/orangescrum-master/app/Config/database.php
更改文件如下所示:
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'orangescrum_user',
'password' => 'Your_StrongPassword',
'database' => 'orangescrum',
'prefix' => '',
'encoding' => 'utf8',
);
}然后保存并退出文件。在这里您必须输入您在创建数据库和 MySQL 用户时选择的数据库用户名、密码和数据库名称。
接下来,您需要为 SMTP 编辑 constants.php 文件:sudo vim /var/www/html/orangescrum-master/app/Config/constants.php
Next Find and Change the following lines as per your need:
//Gmail SMTP
define("SMTP_HOST", "ssl://smtp.gmail.com");
define("SMTP_PORT", "465");
define("SMTP_UNAME", "'); //(REQUIRED) From Email现在重新启动 Apache 服务。
sudo systemctl restart httpd
接下来,修改防火墙规则以允许 Web 访问:
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload您可以使用下面给出的命令暂时禁用 SELinux。
setenforce 0
测试 Orangescrum
从您的网络浏览器访问 http://yourserverIP 并提供您的公司名称、电子邮件和密码,然后单击“注册”按钮。
现在探索 OrangeScrum 的更多内容。