编译LEDE使得其支持Docker和LXC
Warning: getimagesize(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/www/wwwroot/rinvay.cc/:/tmp/) in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt' in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(https://pic.leus.cc/images/8d878f681d424f57845edf0db212e428.png): failed to open stream: operation failed in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/www/wwwroot/rinvay.cc/:/tmp/) in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt' in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(https://pic.leus.cc/images/29f66d003b53527b7cb332370b9d431e.png): failed to open stream: operation failed in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/www/wwwroot/rinvay.cc/:/tmp/) in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt' in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(https://pic.leus.cc/images/4a87bca5e93dbec679e2cacaf11d379a.png): failed to open stream: operation failed in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/www/wwwroot/rinvay.cc/:/tmp/) in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt' in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
Warning: getimagesize(https://pic.leus.cc/images/b43d56bc1e21fcdab9c8f031452b52be.png): failed to open stream: operation failed in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 520
前言
- 本来是用koolshare的LEDE,但是用了几天发现一些问题,首先就是他本身的酷软中心比较老旧很多程序安装后已经无法使用比如前两篇文章提到的Entware,ONMP,LNMP,以及Docker也一样有着各种各样的问题,虽然能用,但是离心目中的稳定高效还有一点差距。
- 在折腾过程中,也发现了系统存储不能满足需求,尤其是使用了docker以后,更是不能满足需求,还有一些其他软件的日志记录等等都达不到理想状态,所以我就想着还不如自己编译一个LEDE选择好自己需要的程序,方便自己使用,同时设置好系统分区大小,保障安装好Docker以后依然很刚。
编译
- 首先要感谢
Lean 大雕
的源码https://github.com/coolsnowwolf/lede
- 那么现在就开始吧,一台ubuntu,Lean说最好是14.04 64位,我用的16.04 64位,没毛病。
- 配置编译环境
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx autoconf automake libtool autopoint libelf-dev
- 克隆源代码
git clone https://github.com/coolsnowwolf/lede && cd lede
更新FEEDS并进行编译菜单配置
./scripts/feeds update -a ./scripts/feeds install -a make menuconfig
- 设置Dcoker使用内核环境
- 然后选择好想要的程序,设置输出固件打开UEFI,设置存储器大小
- 好了,耐心等待编译吧,第一次编译估计需要2-3小时,后续就只需要十来分钟了,等待输出包到
./bin/targets/x86
中
测试
- 看到输出的包后我们使用Qemu进行测试
sudo apt-get install qemu
首先安装。 - 然后使用
qemu-system-x86_64 -M q35 -drive file=openwrt-x86-64-uefi-gpt-squashfs.img,id=d0,if=none,bus=0,unit=0 -device ide-hd,drive=d0,bus=ide.0 -redir tcp:10022::22 -redir tcp:10080::80
- 然后就可以使用
http://localhost:10080
进行访问了,或者使用SSH端口映射为10022 提示:如上需要能够访问,需要在qemu中设置网络为DHCP
vim /etc/config/network
config interface lan option ifname eth0 option type bridge option proto dhcp #option proto static #option ipaddr 192.168.1.1 #option netmask 255.255.255.0
安装Docker
首先配置环境
opkg install libdevmapper libltdl iptables-mod-extra opkg find iptables-mod-* | cut -d ' ' -f 1 | grep iptables | xargs opkg install
- 下载Docker并安装即可Docker官方下载地址
分享系统
- 分享自己编译的系统,其中涵盖了大部分程序和5个主题,具体情况看图和自己下载后测试
- 固件存储概况:内核100MB,ROOT1024M,所以固件较大,使用时预算自己的存储器大小
固件信息
user:root password:password ip:192.168.1.1 knowing: echo 0xDEADBEEF > /etc/config/google_fu_mode
- 固件图片