官方指导:https://www.opensips.org/Documentation/Migration-2-4-0-to-3-0-0
升级步骤:
git clone https://github.com/OpenSIPS/opensips.git opensips_devel
make menuconfig
按照2.4一样来就行,不详细介绍了
升级数据库:
opensips-cli -x database migrate opensips opensips_3
输入url,创建数据库需要root权限 :mysql://root:root@172.xxx.xxx.xxx
要求输入脚本(opensips源码的这个相对位置,搞不懂这步的意义是啥):/usr/local/src/opensips-3.1/scripts
或者创建新的库也行:opensips-cli -x database create
主要更改:
# required OS packages
sudo apt-get install python3 python3-pip python3-dev gcc default-libmysqlclient-dev # Debian & Ubuntu
sudo yum install python36 python36-pip python36-devel gcc mysql-devel # Red Hat & CentOS
# required Python3 packages
sudo pip3 install mysqlclient sqlalchemy sqlalchemy-utils pyOpenSSL
# download & install the CLI
git clone https://github.com/opensips/opensips-cli ~/src/opensips-cli
cd ~/src/opensips-cli
sudo python3 setup.py install clean
# enjoy!
opensips-cli
(opensips-cli): quit