先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip1024b (备注运维)
正文
将三个源码包解压到/app/package/source/目录进行编译,如下:
-
安装路径
-
FreeSWITCH
主程序目录:/app/rainbow/freeswitch/
录音文件:/app/rainbow/data/recordings/
应用程序目录:/app/rainbow/webapps/
四、安装流程简述
- 安装gcc编译器
源码安装需要使用c、c++编译器,执行:yum install gcc gcc-c++,当前服务器已自带gcc8.2,执行:yum install gcc-c++
- 安装sofia-sip和spandsp
由于FreeSwitch-1.10.x某个版本将sofia-sip和spandsp模块分离了,所以在安装freeswitch前需要单独编译安装这两个模块,否则会提示:
checking for spandsp >= 3.0… configure: error: no usable spandsp; please install spandsp3 devel package or equivalent
checking for sofia-sip-ua >= 1.xx.xx… configure: error: no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
- 安装FreeSWITCH
五、编译安装步骤
- 安装包上传
(1)将freeswitch、sofia-sip、spandsp三个模块的源码包解压到/app/package/source/目录下,如下所示:
- 安装sofia-sip模块
(1)进入目录:cd sofia-sip-1.13.8
(2)编译:./bootstrap.sh
如执行后提示**autoreconf:command not found,**见问题附录一处理后再继续。
(3)编译:./configure
(4)安装:make
如执行后提示**openssl/ssl.h:No such or directory,**见问题附录二处理后再继续。
(5)安装:make install
- 安装spandsp模块
(1)进入目录:cd spandsp-master/
(2)编译:./bootstrap.sh
(3)编译:./configure
如执行后提示configure: error: “Cannot build without libtiff (does your system require a libtiff-devel package?)”,见问题附录三处理后再继续。
如执行后提示configure: error: “Cannot build without libtiff (does your system require a libjpeg-devel or libjpeg-turbo-devel package?)”,见问题附录四处理后再继续。
(4)安装:make
(5)安装:make install
- 安装freeswitch模块
(1)在完成上述前置模块的安装后,执行如下命令重载库缓存配置和环境变量:
ldconfig
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
(1)进入目录:cd freeswitch-1.10.7/
(2)编译:./bootstrap.sh
(3)编译:./configure
如需指定安装目录和文件结构编译:
./configure --prefix=/app/rainbow/freeswitch --disable-fhs
如执行后提示configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,见问题附录五处理后再继续。
如执行后提示configure: error: Library requirements (libcurl >= 7.19) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,见问题附录六处理后再继续。
如执行后提示configure: error: Library requirements (libpcre >= 7.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,见问题附录七处理后再继续。
如执行后提示configure: error: Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,见问题附录八处理后再继续。
如执行后提示configure: error: You need to either install libldns-dev or disable mod_enum in modules.conf,见问题附录九处理后再继续。
如执行后提示configure: error: You need to either install libedit-dev (>= 2.11) or configure with --disable-core-libedit-support,见问题附录十处理后再继续。
编译成功后如下所示:
Freeswitch的标准安装目录为/usr/local/freeswitch,为了将文件统一安装某一个目录下,可设置编译参数,重新编译:
./configure --prefix=/ownswitch/fshome
如下所示:
由于FreeSwitch安装目录结构遵循了FHS(Filesystem Hierarchy Standard,即文件系统层次结构标准)指定安装目录后,可以看到在prefix目录内部又自动划分了多层级目录,vi configure文件,看到如下内容:
由上可知,可以修改configure文件判断条件来达成保持缺省目录结构的目的,同时可以增加编译参数禁用FHS来达成,如下:
./configure --prefix=/app/rainbow/freeswitch --disable-fhs
执行后看到如下内容:
(4)安装:make
如执行后提示Neither yasm nor nasm have been found. See the prerequisites section in the README for more info.,见问题附录十一处理后再继续。
如执行后提示Makefile:1476: *** You must install libavformat-dev and libswscale-dev to build mod_av. Stop.,见问题附录十二处理后再继续。
如执行后提示mod_lua.cpp:37:10: fatal error: lua.h: No such file or directory、[Makefile:1040: libluamod_la-mod_lua.lo] Error 1,见问题附录十三处理后再继续。
如执行后提示Makefile:967: *** You must install libopus-dev to build mod_opus. Stop.,见问题附录十四处理后再继续。
如执行后提示Makefile:965: *** You must install libpq-dev to build mod_pgsql. Stop.,见问题附录十五处理后再继续。
如执行后提示Makefile:976: *** You must install libks to build mod_signalwire. Stop.,见问题附录十六处理后再继续。
如执行后提示Makefile:971: *** You must install signalwire-client-c to build mod_signalwire. Stop.,见问题附录十七处理后再继续。
如执行后提示Makefile:1451: *** You must install libsndfile-dev to build mod_sndfile. Stop.,见问题附录十八处理后再继续。
Make成功后如下所示:
(5)安装:make install,安装成功如下所示:
进入/app/rainbow/freeswitch/目录查看,结构如下所示:
创建软连接:
ln -sf /app/rainbow/freeswitch/bin/freeswitch /usr/bin/
ln -sf /app/rainbow/freeswitch/bin/fs_cli /usr/bin/
启动服务到后台:
freeswitch -nc
查看启动日志,显示IPv6的支持问题,如下所示:
如不需要ipv6,进入sip_profiles目录下去掉ipv6配置文件即可,执行:
mv external-ipv6.xml external-ipv6.xml_bak
mv internal-ipv6.xml internal-ipv6.xml_bak
然后重新启动
- 启用freeswitch-portal(可选)
freeswitch portal为内置模块,开箱即用,安装完成之后只需要启用就可以,如下:
fs_cli
load mod_xml_rpc
启用后可访问:http://服务IP:8080/portal,默认账户为:freeswitch/works,可以在 conf/autoload_configs/xml_rpc.conf.xml中修改,修改后可直接在控制台reload mod_xml_rpc生效。
如果想跟随freeswitch启动则直接操作配置文件具体如下
#conf/autoload_configs/modules.xml 中去掉如下注释:
启用后,访问结果如下:
如果在浏览器右上角出现:Socket Disconnected,表示数据的自动更新使用Ajax轮询的方式获得;如果想使用Websocket自动更新数据,只需要在xml_rpc.conf.xml中添加
- 对接postgresQL
基于公司1.10.7版本
在auto_modules/switch.conf.xml修改连接信息如下:
放开pgql注释编辑连接信息,放开auto-create-schemas自动创建表空间,最后注释掉原来放开的core-db-name
Freeswitch各个模块的数据库是可以单独设置的,不同的模块接入时,会创建不同的表结构,涉及修改的文件内容如下:
- auto_modules/switch.conf.xml
- auto_modules/db.conf.xml
- sip_profiles/internal.xml
fifo.conf.xml
voicemail.conf.xml
external.xml
也可以统一放在vars.xml中设置。
六、卸载
在源码目录下执行:
make uninstall
七、问题附录
- (一)安装sofia-sip提示autoreconf:command not found
安装sofia-sip模块,如执行./bootstrap后提示**autoreconf:command not found,**如下:
根据提示需要安装libtool,执行安装:
yum -y install autoconf automake libtool
- (二)安装sofia-sip提示:openssl/ssl.sh 不存在
安装sofia-sip模块,如执行make后提示**fatal error: openssl/ssl.h: No such file or directory #include <openssl/ssl.h>,**如下:
根据提示需要安装openssl-devel,执行安装:
yum install openssl-devel
安装完成后需要对sofia-sip模块重新./configure。
- (三)安装spandsp提示Cannot build without libtiff
安装spandsp模块,如执行./configure后提示configure: error: “Cannot build without libtiff (does your system require a libtiff-devel package?)”,如下:
根据提示需要安装libtiff-devel,执行安装:
yum install libtiff-devel
- (四)安装spandsp提示Cannot build without libtiff
安装spandsp模块,如执行./configure后提示configure: error: “Cannot build without libtiff (does your system require a libjpeg-devel or libjpeg-turbo-devel package?)”,如下:
根据提示需要安装libjpeg-devel,执行安装:
yum install libjpeg-devel
- (五)安装freeswitch提示sqlite错误
安装freeswitch模块,如执行./configure后提示configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them. ,如下:
根据提示需要安装sqlite-devel,执行安装:
yum install sqlite-devel
- (六)安装freeswitch提示libcurl错误
安装freeswitch模块,如执行./configure后提示configure: error: Library requirements (libcurl >= 7.19) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,如下:
根据提示需要安装curl-devel,执行安装:
yum install curl-devel
- (七)安装freeswitch提示libpcre错误
安装freeswitch模块,如执行./configure后提示configure: error: Library requirements (libpcre >= 7.8) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,如下:
根据提示需要安装pcre-devel,执行安装:
yum install pcre-devel
- (八)安装freeswitch提示speex、speexdsp错误
安装freeswitch模块,如执行./configure后提示configure: error: Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.,如下:
根据提示需要安装speex-devel、speexdsp-devel,执行安装:
yum install speex-devel
yum install speexdsp-devel
安装过程中腾讯云的仓库找不到speex-devel、speexdsp-devel,丢了个阿里云的repo到/etc/yum.repo/下面启用后继续安装。
- (九)安装freeswitch提示libldns错误
安装freeswitch模块,如执行./configure后提示configure: error: You need to either install libldns-dev or disable mod_enum in modules.conf,如下:
根据提示可选择安装库文件或修改modules.conf禁用该功能,这里选择安装:
yum install ldns-devel
- (十)安装freeswitch提示libedit错误
安装freeswitch模块,如执行./configure后提示configure: error: You need to either install libedit-dev (>= 2.11) or configure with --disable-core-libedit-support,如下:
根据提示可以选择安装库文件或增加编译参数(–disable-core-libedit-support),在此选择执行安装:
yum install libedit-devel
- (十一)安装freeswitch提示yasm错误
安装freeswitch模块,如执行make后提示Neither yasm nor nasm have been found. See the prerequisites section in the README for more info.,如下:
为了做好运维面试路上的助攻手,特整理了上百道 【运维技术栈面试题集锦】 ,让你面试不慌心不跳,高薪offer怀里抱!
这次整理的面试题,小到shell、MySQL,大到K8s等云原生技术栈,不仅适合运维新人入行面试需要,还适用于想提升进阶跳槽加薪的运维朋友。
本份面试集锦涵盖了
- 174 道运维工程师面试题
- 128道k8s面试题
- 108道shell脚本面试题
- 200道Linux面试题
- 51道docker面试题
- 35道Jenkis面试题
- 78道MongoDB面试题
- 17道ansible面试题
- 60道dubbo面试题
- 53道kafka面试
- 18道mysql面试题
- 40道nginx面试题
- 77道redis面试题
- 28道zookeeper
总计 1000+ 道面试题, 内容 又全含金量又高
- 174道运维工程师面试题
1、什么是运维?
2、在工作中,运维人员经常需要跟运营人员打交道,请问运营人员是做什么工作的?
3、现在给你三百台服务器,你怎么对他们进行管理?
4、简述raid0 raid1raid5二种工作模式的工作原理及特点
5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?
6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?
7、Tomcat和Resin有什么区别,工作中你怎么选择?
8、什么是中间件?什么是jdk?
9、讲述一下Tomcat8005、8009、8080三个端口的含义?
10、什么叫CDN?
11、什么叫网站灰度发布?
12、简述DNS进行域名解析的过程?
13、RabbitMQ是什么东西?
14、讲一下Keepalived的工作原理?
15、讲述一下LVS三种模式的工作过程?
16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?
17、如何重置mysql root密码?
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
工作原理及特点
5、LVS、Nginx、HAproxy有什么区别?工作中你怎么选择?
6、Squid、Varinsh和Nginx有什么区别,工作中你怎么选择?
7、Tomcat和Resin有什么区别,工作中你怎么选择?
8、什么是中间件?什么是jdk?
9、讲述一下Tomcat8005、8009、8080三个端口的含义?
10、什么叫CDN?
11、什么叫网站灰度发布?
12、简述DNS进行域名解析的过程?
13、RabbitMQ是什么东西?
14、讲一下Keepalived的工作原理?
15、讲述一下LVS三种模式的工作过程?
16、mysql的innodb如何定位锁问题,mysql如何减少主从复制延迟?
17、如何重置mysql root密码?
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
[外链图片转存中…(img-mgB05ZQi-1713325037240)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!