如何在Ubuntu 18.04上安装Booked Scheduler
Tianye
・7 分钟阅读
介绍
Booked Scheduler是一个开源应用程序,它旨在帮助用户调度进程和管理已分配的资源,它是一个基于web的应用程序,使用MariaDB运行,用PHP编写。
前提条件
要安装已Booked Scheduler,你需要执行以下操作:
- Ubuntu 18.04/18.10 (需要一个64-bit系统)
root
访问unzip
安装
安装之前,请运行以下命令来更新现有软件包:
apt-get update -y
这可能需要几分钟,具体取决于你所拥有的包。
完成更新过程后,我们将需要安装LEMP堆栈:
apt-get install nginx php-fpm -y
service nginx start
通过访问http://YOUR_SERVER_IP
验证是否安装了Nginx 。 它将显示一个标题为"Welcome to Nginx."的页面。
通过运行以下命令安装MariaDB :
apt-get install mariadb-server mariadb-client -y
通过执行以下命令配置MariaDB ,如果系统提示你输入密码,只需按回车键:
mysql_secure_installation
Set root password? [Y/n] Y
New password: (enter a password)
Re-enter new password: (repeat the password)
MariaDB更新密码后,你将看到以下内容:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone to log into
MariaDB without having to have a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother. You should remove them before
moving into a production environment.
对于其余提示,输入Y
,并且输入。
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
成功完成后,你将看到以下输出:
Thanks for using MariaDB!
现在,我们需要创建一个Booked Scheduler的数据库和用户:
mysql -u root -p
提示时输入密码。
创建数据库和用户:
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]>create database bookedscheduler;
MariaDB [(none)]>exit;
下载安装预订的计划程序:
wget https://gigenet.dl.sourceforge.net/project/phpscheduleit/Booked/2.7/booked-2.7.2.zip
unzip booked-2.7.2.zip
mv booked /var/www/html/
配置nginx
& php-fpm
:
nano /etc/php/7.2/fpm/php.ini
找到以下行,移除分号并用1
替换0
:
cgi.fix_pathinfo=1
现在,重新启动php-fpm
:
service php7.2-fpm restart
现在,我们将编辑nginx
配置,以便将PHP请求传递给php-fpm
:
nano /etc/nginx/sites-available/default
在第一个server
块的末尾粘贴以下内容:
location ~ .php$ {
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /.ht {
deny all;
}
修改index
参数:
index index.html index.htm index.php;
最后,修改root
参数:
root /var/www/html/booked;
配置Booked Scheduler:
cd /var/www/html/booked
nano config/config.dist.php
更改以下参数:
$conf['settings']['default.timezone'] = 'America/Toronto'; // your timezone
$conf['settings']['admin.email'] = 'your_admin@email.com'; // email address of admin user
$conf['settings']['admin.email.name'] = 'John Doe';
$conf['settings']['script.url'] = 'http://YOUR_DOMAIN.com/Web'; // your domain
$conf['settings']['database']['type'] = 'mysql';
$conf['settings']['database']['user'] = 'root';
$conf['settings']['database']['password'] = '(CHANGE_ME)'; // your database password
$conf['settings']['database']['hostspec'] = '127.0.0.1'; // your IP
$conf['settings']['database']['name'] = 'bookedscheduler';
注:请确保将(CHANGE_ME)
替换为数据库密码。
使用CTRL +O保存并退出,然后输入。
将config.dist.php
重命名为config.php
:
mv config.dist.php config.php
现在,我们将填充数据库:
mysql -u root -p bookedscheduler < database_schema/create-schema.sql
mysql -u root -p bookedscheduler < database_schema/create-data.sql
最后,导航到服务器的IP,并且注册管理员帐户。
祝贺您
你已成功安装Booked Scheduler。