时间:2023-08-22 10:30:02 | 来源:网站运营
时间:2023-08-22 10:30:02 来源:网站运营
搭建网课平台,步骤详细到每一步命令:$ sudo yum update -y$ sudo yum install -y git telnet$ sudo rm -f /etc/localtime && / sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime# verify locale$ date
2 在moodle上安装并配置Apache$ sudo yum install -y httpd$ sudo usermod -a -G apache ec2-user$ sudo chown -R ec2-user:apache /var/www$ sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} /;$ find /var/www -type f -exec sudo chmod 0664 {} /;# modify Apache config file$ sudo vim /etc/httpd/conf/httpd.conf<IfModule dir_module> DirectoryIndex index.html index.php</IfModule>$ sudo systemctl start httpd$ sudo systemctl enable httpd$ exit# login again for group verification$ groups
3配置php$ sudo amazon-linux-extras enable php7.2$ sudo yum install -y / php / php-fpm / php-gd / php-json / php-mbstring / php-mysqlnd / php-xml / php-xmlrpc / php-opcache / php-pecl-zip / php-intl / php-soap / php-pecl-redis / php-cli# modify php settings$ sudo vim /etc/php.ini post_max_size = 128M upload_max_size = 64M memory_limit = 256M# create test PHP file$ echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php$ sudo systemctl start php-fpm$ sudo systemctl enable php-fpm$ sudo systemctl restart httpd
4在 Moodle 服务器上安装 EFS 工具:$ git clone https://github.com/aws/efs-utils$ sudo yum -y install rpm-build$ cd efs-utils && make rpm$ sudo yum -y install build/amazon-efs-utils*rpm$ mount.efs --version# version of mount.efs show as below/usr/sbin/mount.efs Version: 1.21# lower than version 1.19 will unable to mount the China region EFS$ sudo mkdir -p /mnt/efs$ sudo mount -t efs fs-<efs_id>:/ /mnt/efs# add efs path to fstab$ sudo vim /etc/fstabfs-<fs_id>:/ /mnt/efs efs defaults,_netdev 0 0
5.在 Moodle 服务器上安装并配置 Moodle:# create data path for Moodle$ sudo mkdir -p /mnt/efs/moodledata$ sudo chown -R ec2-user:apache /mnt/efs/moodledata$ sudo chmod 2777 /mnt/efs/moodledata && find /mnt/efs/moodledata -type d -exec sudo chmod 2777 {} /;# clone from git or download from moodle.org for moodle setup### wget https://download.moodle.org/download.php/direct/stable38/moodle-latest-38.zip$ git clone -b MOODLE_38_STABLE git://git.moodle.org/moodle.git$ cp -r moodle /var/www/html/$ cd /var/www/html/moodle && cp config-dist.php config.php# access to rds mysql for database setup### example using mysql$ CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;$ GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO 'moodleuser' IDENTIFIED BY 'yourpassword';# modify Moodle config file$ vim config.php$CFG->dbtype = 'mysqli'; // 'pgsql', 'mariadb', 'mysqli', 'sqlsrv' or 'oci'$CFG->dblibrary = 'native'; // 'native' only at the moment$CFG->dbhost = '<RDS_ENDPOINT>'; // eg 'localhost' or 'db.isp.com' or IP$CFG->dbname = 'moodle'; // database name, eg moodle$CFG->dbuser = '<DB_USER>'; // your database username$CFG->dbpass = '<DB_PASSWORD>'; // your database password$CFG->wwwroot = 'http://<DNS_ENDPOINT>/moodle';$CFG->dataroot = '/mnt/efs/moodledata';# setup DB connection$ php /var/www/html/moodle/admin/cli/install_database.php --lang=en --adminpass=password --agree-license# add to crontab$ sudo vim /etc/crontab * * * * * /usr/bin/php /var/www/html/moodle/admin/cli/cron.php >/dev/null
访问配置的 Moodle 连接 http:///moodle 进行验证,效果如下:mysql -h bbbsql.cu4sfsxxxxx.rds.cn-northwest-1.amazonaws.com.cn -P 3303 -u admin -p
sudo vim /etc/httpd/conf/httpd.conf ## Listen 30080## ServerName http://ec2-161-189-113-205.cn-northwest-1.compute.amazonaws.com.cn:30080vim /var/www/html/moodle/config.php ## CFG->wwwroot = 'http://ec2-161-189-113-205.cn-northwest-1.compute.amazonaws.com.cn:30080/moodle';
$ sudo -i$ apt-get update$ apt-get install git
$ sudo -i$ git clone https://github.com/bigbluebutton/bbb-install.git$ cd bbb-install# run below command for setup turn server### <turn server endpoint> for turn server url### <secret id> for secret access from bbb server### <email address> for which Let's Encrypt generates ssl certificate$ ./bbb-install.sh / -c <turn server endpoint>:<secret id> / -e <email address># for example:### $ ./bbb-install.sh -c turn.ryanlao.net:12345678 -e ryanlao@example.com
$ sudo -i$ git clone https://github.com/bigbluebutton/bbb-install.git$ cd bbb-install# this step will take about 25 mins# setup with turn server### <bbb server endpoint> for bbb server url### <turn server endpoint> for turn server url### <secret id> for secret access from bbb server### <email address> for which Let's Encrypt generates ssl certificate$ ./bbb-install.sh / -s <bbb server endpoint> / -v xenial-220 / -e <email address> / -c <turn server endpoint>:<secret id> / -a# for example:### $ ./bbb-install.sh -s bbb.ryanlao.net -v xenial-220 -c turn.ryanlao.net:12345678 -e ryanlao@example.com -a
$ sudo -i# purge demo site first$ apt-get purge bbb-demo# rerun bbb-install command with greenlight parameter$ ./bbb-install.sh / -s <bbb server endpoint> / -v xenial-220 / -e <email address> / -c <turn server endpoint>:<secret id> / -g# create an admin account$ docker exec greenlight-v2 bundle exec rake user:create["<admin name>","<admin email>","<admin password>","admin"]# access greenlight site for managing meeting room### e.g. https://bbb.ryanlao.net/b
$ bbb-conf --check #查看bbb的配置信息$ bbb-conf --status #查看bbb的各个服务状态$ bbb-conf --start/stop/restart #启动/停止/重启bbb相关服务$ bbb-conf --secret #查看bbb服务器的secret密钥
$ scp -i <keypair> mod_bigbluebuttonbn.zip / ec2-user@<ip address>:/home/ec2-user/$ unzip mod_bigbluebuttonbn.zip
将插件目录拷贝至 mod 文件夹:$ cp -r bigbluebuttonbn/ /var/www/html/moodle/mod/
使用管理员登录并访问 Moodle 网站#shared key needs to be set as fixed lengthsudo bbb-conf --setsalt <aaaaaaaabbbbbbbbccccccccdddddddd>
关键词:命令,详细,步骤,平台