增加几个文章
This commit is contained in:
parent
ced57cc3a1
commit
edff933177
108
freeswitch/ubuntu16.04安装FreeSWITCH1.6.md
Normal file
108
freeswitch/ubuntu16.04安装FreeSWITCH1.6.md
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
# ubuntu16.04安装FreeSWITCH1.6
|
||||||
|
|
||||||
|
## 基本安装
|
||||||
|
|
||||||
|
### (可省)更换阿里源
|
||||||
|
|
||||||
|
```shell
|
||||||
|
vim /etc/apt/source.list
|
||||||
|
```
|
||||||
|
|
||||||
|
```plaint
|
||||||
|
deb https://mirrors.aliyun.com/ubuntu/ xenial main
|
||||||
|
deb-src https://mirrors.aliyun.com/ubuntu/ xenial main
|
||||||
|
deb https://mirrors.aliyun.com/ubuntu/ xenial-updates main
|
||||||
|
deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates main
|
||||||
|
deb https://mirrors.aliyun.com/ubuntu/ xenial universe
|
||||||
|
deb-src https://mirrors.aliyun.com/ubuntu/ xenial universe
|
||||||
|
deb https://mirrors.aliyun.com/ubuntu/ xenial-updates universe
|
||||||
|
deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates universe
|
||||||
|
deb https://mirrors.aliyun.com/ubuntu/ xenial-security main
|
||||||
|
deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security main
|
||||||
|
deb https://mirrors.aliyun.com/ubuntu/ xenial-security universe
|
||||||
|
deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security universe
|
||||||
|
```
|
||||||
|
|
||||||
|
### 系统更新
|
||||||
|
|
||||||
|
```shell
|
||||||
|
apt update && apt upgrade -y
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装依赖
|
||||||
|
|
||||||
|
```shell
|
||||||
|
apt-get install -y git build-essential automake autoconf libtool g++ zlib1g-dev libjpeg-dev libncurses5-dev libsqlite3-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libspeex-dev libldns-dev libedit-dev libssl-dev pkg-config yasm lua5.2 liblua5.2-dev liblua5.2 libopus-dev libsndfile-dev libtool libpq-dev pkg-config libtiff5-dev libtiff5 libvpx-dev libvpx3 libvpx3 libopus-dev uuid-dev libsndfile-dev ffmpeg python python-dev libmpg123-dev libshout3-dev libmp3lame-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装cmake
|
||||||
|
|
||||||
|
> 这个过程比较消耗时间
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd /opt
|
||||||
|
wget https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz
|
||||||
|
tar zxvf cmake-3.25.1.tar.gz
|
||||||
|
cd cmake-3.25.1
|
||||||
|
./bootstrap
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装FreeSWITCH
|
||||||
|
|
||||||
|
> github可能经常连不上,所以git clone这一步可以在安装依赖或者安装cmake时开新终端同步来搞,多试几次
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd /opt
|
||||||
|
git clone -b v1.6 https://github.com/signalwire/freeswitch.git
|
||||||
|
git clone https://github.com/signalwire/libks.git
|
||||||
|
git clone https://github.com/signalwire/signalwire-c.git
|
||||||
|
# 编译freeswitch
|
||||||
|
cd freeswitch
|
||||||
|
./bootstrap.sh -j
|
||||||
|
./configure
|
||||||
|
cd ..
|
||||||
|
# 编译安装libks
|
||||||
|
cd libks/
|
||||||
|
cmake .
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
# 编译安装signalwire-c
|
||||||
|
cd signalwire-c
|
||||||
|
cmake .
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cp /usr/local/lib/pkgconfig/.pc /usr/lib/pkgconfig/
|
||||||
|
cp -f /usr/local/lib/ /lib64/
|
||||||
|
cd ..
|
||||||
|
# 安装freeswitch
|
||||||
|
cd freeswitch
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
ln -s /usr/local/freeswitch/bin/* /usr/bin/
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装声音
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make sounds-install && \
|
||||||
|
make moh-install && \
|
||||||
|
make cd-sounds-install && \
|
||||||
|
make cd-moh-install && \
|
||||||
|
make uhd-sounds-install && \
|
||||||
|
make uhd-moh-install
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装模块
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /opt/freeswitch
|
||||||
|
vim modules.conf
|
||||||
|
# 为下面这几行解除注释
|
||||||
|
# mod_unimrcp
|
||||||
|
# mod_shout
|
||||||
|
# mod_python
|
||||||
|
# mod_xml_curl
|
||||||
|
```
|
80
rabbitmq/docker部署rabbitmq启用stomp和延时队列.md
Normal file
80
rabbitmq/docker部署rabbitmq启用stomp和延时队列.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
# docker部署rabbitmq,启用stomp,并安装rabbitmq_delayed_message_exchange插件
|
||||||
|
|
||||||
|
## 操作
|
||||||
|
|
||||||
|
### 下载延时队列插件
|
||||||
|
|
||||||
|
针对rabbitmq3.11.x
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.11.1/rabbitmq_delayed_message_exchange-3.11.1.ez
|
||||||
|
```
|
||||||
|
|
||||||
|
针对rabbitmq3.10.x
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.10.2/rabbitmq_delayed_message_exchange-3.10.2.ez
|
||||||
|
```
|
||||||
|
|
||||||
|
针对rabbitmq3.9.x
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wget https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/3.9.0/rabbitmq_delayed_message_exchange-3.9.0.ez
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装rabbitmq
|
||||||
|
|
||||||
|
> 以3.11为例
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 拉取镜像并启动容器
|
||||||
|
docker run -d -p 15672:15672 -v /data/rabbitmq/mnesia:/var/lib/rabbitmq/mnesia --hostname rabbitmq --name rabbitmq rabbitmq:3.11
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装并启用插件
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 将延时队列插件拷贝至容器(以3.11为例)
|
||||||
|
docker cp rabbitmq_delayed_message_exchange-3.11.1.ez rabbitmq:/plugins
|
||||||
|
# 进入容器
|
||||||
|
docker exec -it rabbitmq /bin/bash
|
||||||
|
# 查看插件
|
||||||
|
rabbitmq-plugins list
|
||||||
|
# 列表里会出现rabbitmq_delayed_message_exchange和rabbitmq_web_stomp和rabbitmq_web_stomp_examples
|
||||||
|
# 启用延时队列插件
|
||||||
|
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
|
||||||
|
# 开启stomp插件
|
||||||
|
rabbitmq-plugins enable rabbitmq_stomp rabbitmq_web_stomp rabbitmq_web_stomp_examples
|
||||||
|
# 启用management插件
|
||||||
|
rabbitmq-plugins enable rabbitmq_management
|
||||||
|
# 要以再查看插件,确认启用的插件都生效了
|
||||||
|
rabbitmq-plugins list
|
||||||
|
# 退出容器
|
||||||
|
exit
|
||||||
|
# 将启用了插件的容器提交为新镜像
|
||||||
|
docker commit rabbitmq rabbitmq:stomp-delay
|
||||||
|
# 停止并删除原容器
|
||||||
|
docker stop rabbitmq
|
||||||
|
docker rm -f rabbitmq
|
||||||
|
```
|
||||||
|
|
||||||
|
### 用新的命令重新启用新的容器
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d -p 5672:5672 -p 15672:15672 -p 15674:15674 -p 61613:61613 -v /data/rabbitmq/mnesia:/var/lib/rabbitmq/mnesia --hostname rabbitmq --name rabbitmq rabbitmq:stomp-delay
|
||||||
|
```
|
||||||
|
|
||||||
|
### 检验
|
||||||
|
|
||||||
|
用浏览器打开`http://host:15672`:
|
||||||
|
|
||||||
|
- 能打开管理界面,说明management插件已经生效。
|
||||||
|
- 默认账号密码都是guest。
|
||||||
|
- 在Overview界面的Ports and contexts列表中可以看到stomp端口和web-stomp端口,说明stomp插件和web-stomp插件已经生效。
|
||||||
|
- 在Exchanges界面的Add a new exchange列表中,看到Type中出现x-delayed-message,说明delayed_message_exchange插件已经生效。
|
||||||
|
|
||||||
|
### 容器开机自启
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker update --restart=always rabbitmq
|
||||||
|
```
|
89
storage/docker部署minio.md
Normal file
89
storage/docker部署minio.md
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# docker部署minio服务
|
||||||
|
|
||||||
|
## 单节点-单存储
|
||||||
|
|
||||||
|
> 基于linux系统
|
||||||
|
|
||||||
|
### 拉取image
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 推荐quay.io
|
||||||
|
docker pull quay.io/minio/minio
|
||||||
|
# 备用dockerhub
|
||||||
|
docker pull bitnami/minio
|
||||||
|
```
|
||||||
|
|
||||||
|
### 创建环境变量文件
|
||||||
|
|
||||||
|
```shell
|
||||||
|
touch /etc/default/minio
|
||||||
|
vim /etc/default/minio
|
||||||
|
```
|
||||||
|
|
||||||
|
在环境变量文件中编辑如下内容
|
||||||
|
|
||||||
|
```conf
|
||||||
|
# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
|
||||||
|
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
|
||||||
|
# Omit to use the default values 'minioadmin:minioadmin'.
|
||||||
|
# MinIO recommends setting non-default values as a best practice, regardless of environment
|
||||||
|
|
||||||
|
MINIO_ROOT_USER=myminioadmin
|
||||||
|
MINIO_ROOT_PASSWORD=minio-secret-key-change-me
|
||||||
|
|
||||||
|
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
|
||||||
|
|
||||||
|
MINIO_VOLUMES="/mnt/data"
|
||||||
|
|
||||||
|
# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server
|
||||||
|
# MinIO assumes your network control plane can correctly resolve this hostname to the local machine
|
||||||
|
|
||||||
|
# Uncomment the following line and replace the value with the correct hostname for the local machine.
|
||||||
|
|
||||||
|
#MINIO_SERVER_URL="http://minio.example.net"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 启动container
|
||||||
|
|
||||||
|
> 下面的命令不能直接复制
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 下面命令中的PATH要换成本地路径,如/data/minio
|
||||||
|
docker run -dt \
|
||||||
|
-p 9000:9000 -p 9090:9090 \
|
||||||
|
-v PATH:/mnt/data \
|
||||||
|
-v /etc/default/minio:/etc/config.env \
|
||||||
|
-e "MINIO_CONFIG_ENV_FILE=/etc/config.env" \
|
||||||
|
--name "minio_local" \
|
||||||
|
quay.io/minio/minio server \
|
||||||
|
--console-address ":9090"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 查看容器状态
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker logs minio
|
||||||
|
```
|
||||||
|
|
||||||
|
正常的话应该能看到类似如下信息
|
||||||
|
|
||||||
|
```console
|
||||||
|
Status: 1 Online, 0 Offline.
|
||||||
|
API: http://10.0.2.100:9000 http://127.0.0.1:9000
|
||||||
|
RootUser: myminioadmin
|
||||||
|
RootPass: minio-secret-key-change-me
|
||||||
|
Console: http://10.0.2.100:9090 http://127.0.0.1:9090
|
||||||
|
RootUser: myminioadmin
|
||||||
|
RootPass: minio-secret-key-change-me
|
||||||
|
|
||||||
|
Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html
|
||||||
|
$ mc alias set myminio http://10.0.2.100:9000 myminioadmin minio-secret-key-change-me
|
||||||
|
|
||||||
|
Documentation: https://min.io/docs/minio/container/index.html
|
||||||
|
```
|
||||||
|
|
||||||
|
### 通过web访问minio面板
|
||||||
|
|
||||||
|
容器启动成功后,minio服务的web面板在本机可以通过`http://localhost:9090`访问,如果端口开放正确,通过`http://IP:9090`可以打开minio的web面板,如果有前置nginx的话,只要做指向http://IP:9090的反向代理就可以了。
|
||||||
|
|
||||||
|
web面板的账号密码就是在`/etc/default/minio`这个环境变量文件中配置的`MINIO_ROOT_USER`和`MINIO_ROOT_PASSWORD`。
|
Loading…
Reference in New Issue
Block a user