# shell-scripts **Repository Path**: duolili/shell-scripts ## Basic Information - **Project Name**: shell-scripts - **Description**: shell脚本 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-02-09 - **Last Updated**: 2024-10-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # shell-scripts ## 1. 介绍 脚本(shell)化安装工具 ## 2. 环境准备 ```shell yum install git -y git clone https://gitee.com/duolili/shell-scripts.git ``` ## 3. 使用 ### 3.1 mysql单机 ```shell sh ./shell-scripts/mysql/mysql.sh # 后面根据提示进行操作 ``` ### 3.2 nodejs > 安装时需要指定版本,例如:v10.15.0 ```shell sh ./shell-scripts/nodejs/node-install.sh # 后面根据提示进行操作 ``` ### 3.3 docker ```shell chmod +x ./shell-scripts/docker/docker1 cd ./shell-scripts/docker/ ./docker1 ``` ### 3.4 go #### 3.4.1 安装 ```shell chmod +x ./shell-scripts/go/install-go.sh cd ./shell-scripts/go/ ./install-go.sh #可编辑该文件指定版本号、代理、工作区 ``` #### 3.4.2 卸载 ***注意:只能卸载由上述脚本安装的go环境,以及保证版本号一致*** ```shell chmod +x ./shell-scripts/go/uninstall-go.sh cd ./shell-scripts/go/ ./uninstall-go.sh ``` #### 3.5 download ##### 3.5.1 m3u8 本脚本适用:通过 `.m3u8` 文件的 `URL` 下载该文件,自动解析后下载对应的所有 `.ts` 文件,最后合并为一个 `.mp4` 文件 前提条件:需安装 `ffmpeg` 命令行工具。 ```shell chmod +x ./shell-scripts/download/m3u8/install-m3u8-merged.sh && cd ./shell-scripts/download/m3u8/ ./install-m3u8-merged.sh https://xxx #xxx为下载.m3u8文件的URL,但不包含.m3u8(即.m3u8前面的全部字符串) ``` - 参考:安装 `ffmpeg` 命令行工具 [下载地址](https://johnvansickle.com/ffmpeg/) ```shell # 下载工具包 wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz # 解压缩 tar -xvf ffmpeg-git-amd64-static.tar.xz # 配置环境变量 vim /etc/profile export PATH=$PATH:/root/ffmpeg-git-20240629-amd64-static source /etc/profile # 验证 ffmpeg -version ```