首页
壁纸
直播
留言板
更多
视频
统计
友情链接
实用工具
Search
1
给孙小姐的一封情书
159 阅读
2
LabVIEW | 各版本及开发工具模块下载
107 阅读
3
armUbuntu | uboot常用指令
86 阅读
4
armUbuntu系统构建
73 阅读
5
编译 openwrt 及初始配置-及部分排错
73 阅读
取次花丛懒回顾
默认分类
C#
MySQL
LabVIEW
Java
Android
PHP
Python
handsome
相册
百度地图
嵌入式
嵌入式Ubuntu
linux
Unity
Golang
Rust
OpenHD
教学计划
Search
标签搜索
C#
handsome
Git
动态壁纸
开源
Unity3d
Unity
csharp
魔傲手记
累计撰写
154
篇文章
累计收到
18
条评论
首页
栏目
取次花丛懒回顾
默认分类
C#
MySQL
LabVIEW
Java
Android
PHP
Python
handsome
相册
百度地图
嵌入式
嵌入式Ubuntu
linux
Unity
Golang
Rust
OpenHD
教学计划
页面
壁纸
直播
留言板
视频
统计
友情链接
实用工具
搜索到
154
篇与
的结果
2023-11-01
编译 openwrt 及初始配置-及部分排错
参考上篇,搭建命令行代理克隆git clone https://github.com/openwrt/openwrt.git逐条输入下列命令(及时验证是否安装成功):sudo apt-get install g++sudo apt-get install libncurses5-devsudo apt-get install zlib1g-devsudo apt-get install bisonsudo apt-get install flexsudo apt-get install unzipsudo apt-get install autoconfsudo apt-get install gawksudo apt-get install makesudo apt-get install gettextsudo apt-get install gccsudo apt-get install binutilssudo apt-get install patchsudo apt-get install bzip2sudo apt-get install libz-devsudo apt-get install asciidocsudo apt-get install subversionsudo apt-get install sphinxsearchsudo apt-get install libtoolsudo apt-get install sphinx-commonsudo apt install gitgcc 要求 4.8 以上./scripts/feeds update -a错误1:fatal: unable to access 'https://git.openwrt.org/feed/telephony.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none新的 ca curl 不认识。解决方法:export GIT_SSL_NO_VERIFY=1或者 sudo apt-get updatesudo apt-get install ca-certificates错误2Build dependency: Please install the GNU C Compiler (gcc) 8 or laterBuild dependency: Please reinstall the GNU C Compiler (8 or later) - it appears to be brokenBuild dependency: Please install the GNU C++ Compiler (g++) 8 or laterBuild dependency: Please reinstall the GNU C++ Compiler (8 or later) - it appears to be brokenBuild dependency: Please install Python >= 3.7Build dependency: Please install Python >= 3.7Build dependency: Please install the Python3 distutils moduleBuild dependency: Please install the Python3 stdlib module不能在使用 ubuntu 16.0.4 编译了,改用 ubuntu 20.0.4 可以正常编译./scripts/feeds install -a配置make menuconfig选择
2023年11月01日
73 阅读
0 评论
0 点赞
2023-11-01
ubuntu windows 设置命令行代理 设置git代理
搭建代理服务器这玩意好像不能发设置代理代理命令公式export ALL_PROXY="socks5://代理服务器IP地址:代理端口"例如:export ALL_PROXY="socks5://127.0.0.1:1080" export all_proxy="socks5://127.0.0.1:1080" export http_proxy=http://192.168.41.217:10811 export https_proxy=http://192.168.41.217:10811取消设置的代理unset ALL_PROXY unset all_proxy unset http_proxy unset https_proxygit设置代理首先确认ip和端口,例如ip为127.0.0.1, 端口为1080, 打开终端,运行以下命令:git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'查看:cat ~/.gitconfig发现是多了这两项配置[http]proxy = socks5://127.0.0.1:1080[https]proxy = socks5://127.0.0.1:1080git取消socks代理git config --global --unset http.proxy git config --global --unset https.proxywindows终端配置代理set HTTP_PROXY=http://127.0.0.1:10811 set HTTPS_PROXY=http://127.0.0.1:10811
2023年11月01日
37 阅读
0 评论
0 点赞
2023-10-31
Ubuntu | arm ubuntu armv7l 开发板 ubuntu 系统添加开机启动脚本
写一个守护进程,每10秒检测一次,如果存在就没事,如果不存在就启动添加sshd开机自启在目录/root/下创建sshd守护进程脚本sshd_daemon.sh#!/bin/bash while true;do count=`ps -ef |grep "/sbin/sshd" |grep -v "grep" |wc -l` # echo $count if [ $count -eq 0 ];then nohup /sbin/sshd >~/sshd.log 2>&1 & fi sleep 10 done在/etc/rc.local中添加守护进程执行/root/sshd_daemon.sh &重新启动一下开机服务以确保修改生效sudo systemctl restart rc-local.service添加pppd开机自启在目录/root/下创建sshd守护进程脚本ppp-on_daemon.sh#!/bin/bash while true;do count=`ps -ef |grep "/etc/gosuncn/gosuncn_ppp_dialer" |grep -v "grep" |wc -l` # echo $count if [ $count -eq 0 ];then cd /etc/gosuncn/ && nohup ./ppp-on >~/ppp-on.log 2>&1 & fi sleep 10 done在/etc/rc.local中添加守护进程执行/root/ppp-on_daemon.sh &重新启动一下开机服务以确保修改生效sudo systemctl restart rc-local.service两个添加完,/etc/rc.local完成文件如下:vim /etc/rc.localvim /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # rc.local this files is exist /etc/rc.local /root/sshd_daemon.sh & /root/ppp-on_daemon.sh & exit 0重新启动一下开机服务以确保修改生效sudo systemctl restart rc-local.service
2023年10月31日
32 阅读
0 评论
0 点赞
2023-10-30
armUbuntu | 开发板 OpenSSH 移植与使用
有时候我们需要远程登录到开发板上对系统进行一些操作,这个时候就要使用到 SSH 服务。 SSH 是较可靠、专为远程登录会话和其他网络服务提供安全性的协议,OpenSSH 是 SSH 协议的免费开源版本,本章实现如何在开发板中移植 OpenSSH,实现 SSH 服务。OpenSSH 简介SSH 全称为 Secure Shell(安全外壳协议,简称 SSH),是一种加密的网络传输协议,用于在不安全的网络中为网络服务提供安全的传输环境。SSH 功能很强大,但是最常用的还是用于远程登录。OpenSSH 是 SSH 协议的具体实现,OpenSSH 是一款开源、免费的 SSH 软件,提供了服务器端后台程序和客户端工具,OpenSSH 提供了很多程序,常用有以下几个:sshssh 软件用于替换 rlogin 与 Telnet。scp 和 sftp将文件复制到其他主机上,用于替换 rcp。sshdSSH 服务器。OpenSSH 移植OpenSSH 源码获取这里我们一共需要移植三个软件包:zlib、openssl 和 openssh。依次到这三个软件的官网下载对应的源码,官网如下:zlib 官网:http://www.zlib.net/。openssl 官网:https://www.openssl.org/source/。openssh 官网:http://www.openssh.com/。这三个软件的源码我们已经放到了开发板光盘中,路径为:1、例程源码->7、第三方库源码->zlib-1.2.11.tar.gz、 openssl-1.1.1d.tar.gz 和 penssh-8.2p1.tar.gz。接下来就依次编译、移植这三个软件。移植 zlib 库参考 armUbuntu | 开发板 移植 zlib 库 - Jocker博客移植 openssl 库参考 armUbuntu | 开发板 移植 openssl 库 - Jocker博客移植 openssh 库先解压 openssh 源码,命令如下:tar -vxzf openssh-8.2p1.tar.gz压完成以后就会生成一个名为“openssh-8.2p1”的文件夹,进入此文件夹里面,然后配置并编译 openssh,命令如下:配置环境变量:cd openssh-8.2p1/ ./configure --host=arm-linux-gnueabihf --with-libs --with-zlib=/home/alientek/tmp/PortingBasedOnSourceCode/zlib-1.2.11/debug --with-ssl-dir=/home/alientek/tmp/PortingBasedOnSourceCode/openssl-1.1.1d/debug --disable-etc-default-login CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar //配置 make //编译或cd openssh-8.2p1/ ./configure --host=arm-linux-gnueabihf --with-libs --with-zlib=../zlib-1.2.11/debug --with-ssl-dir=../openssl-1.1.1d/debug --disable-etc-default-login CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar //配置 make //编译zlib库和openssl库是已经提前编译好的参考上面两个博客*在配置 openssh 的过程中,“--with-zlib”参数用于指定 zlib 库所在的目录,“--with-ssl-dir”参数用于指定 openssl 库所在的目录,编译 openssh 的时候不用“make install”将 openssh 相关文件拷贝到开发板根文件系统中openssh 交叉编译完成以后在开发板中创建如下所示目录(如果存在的话就不需要创建):/usr/local/bin /usr/local/sbin /usr/local/libexec /usr/local/etc /var/run /var/empty创建命令如下:mkdir /usr/local/bin -p mkdir /usr/local/sbin -p mkdir /usr/local/libexec/ -p mkdir /usr/local/etc -p mkdir /var/run -p mkdir /var/empty/ -p工作中,每当要部署一台新机器的时候,就意味着有一堆目录需要创建。例如要创建目录“/usr/local/bin”,就需要此次创建“/usr”、“/usr/local”以及“/usr/local/bin”。好在,Linux下mkdir提供了强大的“-p”选项,只要一条命令“mkdir -p /usr/local/bin”就能自动创建需要的上级目录。上述目录创建好以后将如下文件拷贝到开发板的/usr/local/bin 目录下:scp sftp ssh ssh-add ssh-agent ssh-keygen ssh-keyscan将如下文件拷贝到开发板的/usr/local/sbin 目录下:sshd将如下文件拷贝到开发板的/usr/local/etc 目录下:moduli ssh_config sshd_config将如下文件拷贝到开发板的/usr/local/libexec 目录下:sftp-server ssh-keysign创建软连接,进入开发板中的/bin 目录下,输入如下命令创建软连接:cd /bin/ ln -s /usr/local/bin/scp ln -s /usr/local/bin/sftp ln -s /usr/local/bin/ssh ln -s /usr/local/bin/ssh-add ln -s /usr/local/bin/ssh-agent ln -s /usr/local/bin/ssh-keygen ln -s /usr/local/bin/ssh-keyscan再进入开发板的/sbin 目录下,输入如下命令创建软连接:cd /sbin/ ln -s /usr/local/sbin/sshd软连接创建完成以后就可以直接调用上面 ssh 相关命令了。打开/usr/local/etc/sshd_config 文件,找到“#PermitRootLogin”所在行,将其改为“PermitRootLogin yes”openssh 设置添加 sshd 用户这里需要使用adduser命令, 创建一个用户名和密码都是sshd的用户:adduser sshd在开发板上生成秘钥文件一切准备好以后我们还需要在开发板中生成秘钥文件,使用我们上面移植 openssh 所编译出来的 ssh-keygen 软件即可。进入到开发板的/usr/local/etc 目录下,输入如下所示命令生成秘钥文件,由于 6ULL 性能比较差,有些秘钥文件生成过程可以会有点耗时,打开几十秒:ssh-keygen -t rsa -f ssh_host_rsa_key -N "" ssh-keygen -t dsa -f ssh_host_dsa_key -N "" ssh-keygen -t ecdsa -f ssh_host_ecdsa_key -N "" ssh-keygen -t ed25519 -f ssh_host_ed25519_key -N ""完成以后就会在/usr/local/etc 目录下产生 8 个以“ssh_host_”开头的秘钥文件openssh 使用openssh 移植已经移植到了开发板中,我们可以通过 sshd 软件在开发板上搭建 openssh 服务器,然后在其他的主机上通过 ssh 来登录开发板。我们可以同样使用 scp 命令来向开发板传输文件。首先要在开发板上启动 ssh 服务,sshd 软件用于启动 ssh 服务,注意要输入全路径!输入如下命令:/sbin/sshd //启动 sshd 服务也可以在/etc/init.d/rcS 文件中加入如下命令,实现 ssh 服务开机自启动:/sbin/sshd &ssh 登录启动以后我们就可以使用 XobaXterm、SecureCRT 等终端软件通过 SSH 服务登录开发板,SSH 登录成功以后我们就可以直接对开发板进行各种操作了。同样的,我们也可以在 ubuntu 下通过 ssh 命令登录开发板,输入如下命令:ssh sshd@192.168.1.251其中“sshd”为登录账户名字,192.168.1.251 是开发板的 IP 地址。用户名和开发板 IP 地址之间用“@”符号链接起来。第一次与开发板建立连接的时候会让你进行确认,输入“yes”就行了输入“yes”以后就会让你输入“sshd”用户密码如果密码正确的话就会登录进开发板,可以对开发板进行各种操作输入“exit”命令即可退出 SSH 会话scp 命令拷贝文件如果我们要向开发板发送一个文件,我们可以通过 TF 卡或者 U 盘来中转,或者通过我们上一章讲的 tftp 来发送。本章我们移植 openssh 的时候也编译出来了一个名为“scp”的命令,所以我们可以在开发板中使用 scp 命令向其他主机发送文件,同样的其他主机也可以使用 scp 命令向开发板发送文件。比如我们要把 ubuntu 中的一个文件发送到开发板中,输入如下命令即可:scp seriaApp sshd@192.168.1.251将 seriaApp 文件发送到开发板中,发送完成以后就会在开发板的根目录下看到此文件
2023年10月30日
16 阅读
0 评论
0 点赞
2023-10-30
armUbuntu | 开发板 移植 openssl 库
将 openssl 源码压缩包拷贝到 Ubuntu 中前面创建的 tool 目录下,然后使用如下命令将其解压:tar -vxzf openssl-1.1.1d.tar.gz解压完成以后就会生成一个名为 openssl-1.1.1d 的目录,然后在新建一个名为“debug”的文件夹,用于存放 openssl 的编译结果。进入到解压出来的 openssl-1.1.1d 目录中,然后执行如下命令进行配置:cd openssl-1.1.1d/ mkdir debug export CROSS_COMPILE=arm-linux-gnueabihf-配置编译路径:./Configure linux-armv4 shared no-asm --prefix=/home/alientek/tmp/PortingBasedOnSourceCode/openssl-1.1.1d/debug此处需要用绝对路径,请注意编译:make安装:make install中的 lib 目录是我们需要的,将 lib 目录下的 libcrypto 和 libssl 库拷贝到开发板根文件系统中的/usr/lib 目录下,命令如下:sudo cp ./debug/lib/libcrypto.so* /home/alientek/tmp/nfs/ubuntu_rootfs/lib/ -af sudo cp ./debug/lib/libssl.so* /home/alientek/tmp/nfs/ubuntu_rootfs/lib/ -af
2023年10月30日
46 阅读
1 评论
0 点赞
1
...
19
20
21
...
31