随笔分类 -  Linux

1 2 下一页

linux 资料
mpg123 库播放mp3
摘要:#include <alloca.h> #include <alsa/asoundlib.h> #include <mpg123.h> int main() { //char* path = "/mnt/usb/music/01 You Only Live Once.mp3"; char* path 阅读全文

posted @ 2025-12-18 23:18 少杨 阅读(20) 评论(0) 推荐(0)

ubuntu libasound2 播放wav
摘要:#include <iostream> #include <alsa/asoundlib.h> void play_wav(const char* filename) { int err; snd_pcm_t *handle; snd_pcm_hw_params_t *params; // 打开 P 阅读全文

posted @ 2025-12-16 22:13 少杨 阅读(32) 评论(0) 推荐(0)

部署ftp服务器 并上传文件
摘要:部署 docker run -d -v /data/vsftp:/home/vsftpd -p 20:20 -p 21:21 -p 47400-47470:47400-47470 -e FTP_USER=user -e FTP_PASS=1234 -e PASV_ADDRESS=0.0.0.0 -e 阅读全文

posted @ 2025-02-25 14:00 少杨 阅读(30) 评论(0) 推荐(0)

linux 开发ffmpeg 程序
摘要:linux 开发ffmpeg 程序 Makefile CC=gcc target: $(CC) -o main main.c -lavcodec -lavformat -lswresample -lavutil -lavfilter -lavdevice -lswscale -lm # $(CC) 阅读全文

posted @ 2025-01-03 16:58 少杨 阅读(59) 评论(0) 推荐(0)

redis 以普通用户启动服务
摘要:redis 以普通用户启动服务 sudo -u redis redis-server redis.conf 阅读全文

posted @ 2023-03-11 18:45 少杨 阅读(274) 评论(0) 推荐(0)

TPM 2.0 - could not load "libtss2-tcti-tabrmd.so.0"
摘要:报错: TPM 2.0 - could not load "libtss2-tcti-tabrmd.so.0" 解决:sudo apt install libtss2-tcti-tabrmd0 阅读全文

posted @ 2022-07-14 13:31 少杨 阅读(1104) 评论(0) 推荐(0)

linux 网络操作 route iptables ufw
摘要:linux 网络操作 route iptables ufw sudo ufw status sudo ufw allow ssh sudo ufw allow http sudo ufw deny http sudo ufw disable/enable 网关操作 route add default 阅读全文

posted @ 2022-07-07 22:25 少杨 阅读(115) 评论(0) 推荐(0)

docker容器总是连接不到主机上的myql,是因为iptables 阻止了
摘要:docker容器总是连接不到主机上的myql,是因为iptables 允许容器访问 主机的端口 iptables -I INPUT -s 172.17.0.0/16 -p tcp --dport 6379 -j ACCEPTiptables -I INPUT -s 172.17.0.0/16 -p 阅读全文

posted @ 2021-07-27 13:35 少杨 阅读(288) 评论(0) 推荐(0)

git忽略已经加入版本控制的文件
摘要:git update-index --assume-unchanged logs/*.log 来源:https://www.jianshu.com/p/2345b2aede59 阅读全文

posted @ 2021-03-18 11:44 少杨 阅读(58) 评论(0) 推荐(0)

mac filezilla You do not have permission to list this directory
摘要:设置可以上传的目录 Edit | Directory access permissions 来源:https://stackoverflow.com/questions/61641830/filezilla-you-do-not-have-permission-to-list-this-direct 阅读全文

posted @ 2020-12-09 12:57 少杨 阅读(169) 评论(0) 推荐(0)

qt ubuntu EditText 不能输入中文
摘要:使用的输入法是搜狗,ubuntu16为中文。已经安装过fcitx cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ./Qt5.9.8/5.9.8/ 阅读全文

posted @ 2020-11-15 13:13 少杨 阅读(260) 评论(0) 推荐(0)

mac 10.15.7 修改PATH
摘要:在.zprofile 文件中修改 export PATH="/Users/用户/bin:$PATH" .zprofile 相当于 .bash_profile.zshrc 相当于 .bashrc 阅读全文

posted @ 2020-11-08 14:32 少杨 阅读(194) 评论(0) 推荐(0)

ubuntu解压zip文件名乱码
摘要:安装:sudo apt install zip unzi 命令:unzip -O cp936 xxx.zip 来源:https://jingyan.baidu.com/article/375c8e1963bdfa65f3a2296f.html 阅读全文

posted @ 2020-10-26 10:22 少杨 阅读(152) 评论(0) 推荐(0)

telnet 退出
摘要:安装:brew install telnet 链接: telnet 127.0.0.1 9501 telnet 退出 ctrl+] 然后是 ctrl+c 或者是 ctrl+d 阅读全文

posted @ 2020-10-10 14:04 少杨 阅读(285) 评论(0) 推荐(0)

ubuntu 18.04 搜狗突然就提示乱码
摘要:突然就出现了乱码: 这次是:killall fcitx 解决的 来源:https://blog.csdn.net/Suyebiubiu/article/details/100702967 阅读全文

posted @ 2020-08-07 13:31 少杨 阅读(110) 评论(0) 推荐(0)

搭建自用git服务器
摘要:在服务器 建目录mkdir -p /opt/resp在仓库中建目录 ; cd /opt/resp -> mkdir demo -> cd demo -> git init --base # 初始化仓库在本地:建目录 -> 在目录中 git init -> 添加文件,修改文件 提交-> git rem 阅读全文

posted @ 2020-05-07 12:00 少杨 阅读(375) 评论(0) 推荐(0)

git 查看所以的提交记录 和 git 命令
摘要:查看所以的提交记录 git log --reflog git将单个文件回退到某一版本 1.进入到a.jsp所在目录,通过 git log a.jsp查看a.jsp的更改记录 2.找到想要回退的版本号:例如 fcd2093 通过 git reset fcd2093 a.jsp先将本版库和暂存区中的该文 阅读全文

posted @ 2019-11-13 09:13 少杨 阅读(3068) 评论(0) 推荐(0)

ffmpeg对mp4文件进行ts切片并生成m3u8文件
摘要:一条命令就可以实现: ffmpeg -i 31.mp4 -c copy -map 0 -f segment -segment_list 60.m3u8 -segment_time 60 60%03d.ts 其他博客的两条命令: 先用ffmpeg把abc.mp4文件转换为abc.ts文件: ffmpe 阅读全文

posted @ 2019-11-08 14:25 少杨 阅读(1613) 评论(0) 推荐(0)

CentOS-7 最小安装VMware-tools
摘要:# mkdir /mnt/cdrom ///创建挂载目录 # mount /dev/cdrom /mnt/cdrom ///将光驱挂载到/mnt/cdrom目录 # cd /mut/cdrom cp VMwareTools-XXXX.tar.gz /usr/local # cd /usr/local 阅读全文

posted @ 2019-03-09 22:50 少杨 阅读(1962) 评论(0) 推荐(0)

linux php 编译安装
摘要:./configure --prefix=/usr/local/php5.2 --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql 阅读全文

posted @ 2018-06-05 11:55 少杨 阅读(240) 评论(0) 推荐(0)

1 2 下一页