# mkfs.ext4 /dev/sda1
# mkdir -p /media/AiDisk_a1/opt # mount -o bind /media/AiDisk_a1/opt/ /opt/ # mkdir -p /opt/tmp/ipkg # ipkg.sh update
# ipkg.sh install ipkg-opt
ipkg install python27
Useful links:
ASUS RT-N56U or hardware NAT acceleration
Error Message:
Unpacking ipkg-opt...tar: can't create symlink from ./opt/bin/ipkg-opt to ipkg: Operation not permitted tar: can't create symlink from ./opt/lib/libipkg.so to libipkg.so.0.0.0: Operation not permitted tar: can't create symlink from ./opt/lib/libipkg.so.0 to libipkg.so.0.0.0: Operation not permitted Done. Configuring ipkg-opt...Done.
Make sure that your usb drive is not ‘vfat’
the default firmware doesn’t provide the SSH feature, however, with the help of padavan‘s rt-n56u project, you may enable it:
This project aims to improve the rt-n56u and other supported devices on the software part, allowing power user to take full control over their hardware. This project was created in hope to be useful, but comes without warranty or support. Installing it will probably void your warranty. Contributors of this project are not responsible for what happens next.
How do I get set up?
- Get the tools to build the system or Download pre-built system image
- Feed the device with the system image file (Follow instructions of updating your current system)
- Perform factory reset
- Open web browser on http://my.router to configure the services
What I did:
create a Dockerfile
this image will install python and start a SimpleHTTPServer:
FROM ubuntu ENV DEBIAN_FRONTEND noninteractive CMD ["bash"] RUN apt-get update RUN apt-get install -y python EXPOSE 8000 CMD python -m SimpleHTTPServer 8000
Build project
docker build -t myapp:latest .
run docker image
docker run -P myapp
-P for port forwarding: Publish all exposed ports to random ports
check the web page
find port by:
docker ps -l
This project can be found here:
https://github.com/guoliang-dev/docker-hello-world-python
Install / Start SSH in your guest Linux
sudo service ssh status
install open-ssh in case it’s not ready in your guest:
sudo apt-get install openssh-server
start the service if the service is stopped.
sudo service ssh start
Setup VirtualBox – port forwarding
virtualbox > edit settings for the guest vm:
network > port forwarding (e.g host 3022 -> guest 22)
SSH to the guest linux
ssh user@loalhost -p 3022
guoliang@GDEV /tmp $ grep ‘hi’ test1.txt
hi
hihihihi
# Display line number
guoliang@GDEV /tmp $ grep -n ‘hi’ test1.txt
3: hi
4:hihihihi
# Count
guoliang@GDEV /tmp $ grep -c ‘hi’ test1.txt
2
# Case insensitive
guoliang@GDEV /tmp $ grep -n -i ‘hi’ test1.txt
1: HI
2: Hi
3: hi
4:hihihihi
# Search the whole word
guoliang@GDEV /tmp $ grep -n -w ‘hi’ test1.txt
3: hi
# Search recursively
guoliang@GDEV /tmp $ grep -n -w ‘hi’ -r test*
test1.txt:3: hi
test3:2:hi
# Use grep in Pipes
GDEV tmp # find . -name ‘test*’ |xargs grep ‘hi’
./test1.txt: hi
./test1.txt:hihihihi
./test2:Hi, this is test2;
./test3:this is test 3
./test3:hi
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.