下载路径,loongnix社区:Nginx Directory
建议使用大于4G的U盘,从 Loongnix镜像站点下载系统镜像,然后在Linux下使用DD命令制作安装U盘。 Loongnix系统可启动终端,使用dd命令进行镜像制作。镜像制作命令如下:
dd if=镜像文件地址 of=/dev下识别的U盘设备 bs=8M && sync
举例
镜像文件为:/home/loongson/Loongnix-20.3.livecd.mate.loongarch64.iso
系统下识别的U盘设备: /dev/sdb (可通过fdisk -l或者lsblk命令查看)
镜像制作命令:dd if=/home/loongson/Loongnix-20.3.livecd.mate.loongarch64.iso of=/dev/sdb bs=8M && sync
deb http://pkg.loongnix.cn/loongnix DaoXiangHu-stable main contrib non-free
deb-src http://pkg.loongnix.cn/loongnix DaoXiangHu-stable main contrib non-free
系统安装完成并重启后直接进入系统命令行登录界面,输入安装过程中设置的用户和密码,进入Loongnix操作系统,查看如下系统信息。
root@loongson-pc:~# cat /etc/os-release
PRETTY_NAME="Loongnix GNU/Linux 20 (DaoXiangHu)"
NAME="Loongnix GNU/Linux"
VERSION_ID="20"
VERSION="20 (DaoXiangHu)"
VERSION_CODENAME=DaoXiangHu
ID=Loongnix
HOME_URL="https://www.loongnix.cn/"
SUPPORT_URL="https://www.loongnix.cn/"
BUG_REPORT_URL="http://www.loongnix.cn/"
DHCP自动获取IP配置示例:
auto enp3s0
iface enp3s0 inet dhcp
hostname loongson
静态IP地址示例:
auto enp3s0
iface enp3s0 inet static
address 192.168.0.3/24
broadcast 192.168.0.255
network 192.168.0.0
gateway 192.168.0.1
Loongnixi桌面系统默认关闭sshd服务,开启方法:
root@loongson-pc:~$ sudo apt install openssh-server
root@loongson-pc:~$ systemctl start ssh
root@loongson-pc:~$ systemctl status ssh
root@loongson-pc:~# systemctl enable ssh //默认开启
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
igb_uio.ko模块是独立于dpdk提供的。 编译igb_uio.ko模块对应的代码获取位置是:dpdk-kmods - Kernel modules or add-ons 编译方法:
root@loongson-pc:~# git clone git://dpdk.org/dpdk-kmods
正克隆到 'dpdk-kmods'...
remote: Enumerating objects: 537, done.
remote: Counting objects: 100% (537/537), done.
remote: Compressing objects: 100% (345/345), done.
remote: Total 537 (delta 168), reused 372 (delta 85)
接收对象中: 100% (537/537), 120.94 KiB | 13.00 KiB/s, 完成.
处理 delta 中: 100% (168/168), 完成.
root@loongson-pc:~# cd dpdk-kmods/linux/igb_uio/
root@loongson-pc:~/dpdk-kmods/linux/igb_uio# ls
compat.h igb_uio.c Kbuild Makefile
root@loongson-pc:~/dpdk-kmods/linux/igb_uio# make
make -C /lib/modules/4.19.0-19-loongson-3/build/ M=/root/dpdk-kmods/linux/igb_uio
make[1]: 进入目录“/usr/src/linux-headers-4.19.0-19-loongson-3”
CC [M] /root/dpdk-kmods/linux/igb_uio/igb_uio.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/dpdk-kmods/linux/igb_uio/igb_uio.mod.o
LD [M] /root/dpdk-kmods/linux/igb_uio/igb_uio.ko
make[1]: 离开目录“/usr/src/linux-headers-4.19.0-19-loongson-3”
echo 60 > /sys/kernel/mm/hugepages/hugepages-32768kB/nr_hugepages
./l2fwd -l 2,3 --proc-type auto --socket-mem 1024 --file-prefix lwd0 -- -p 0x3 -T 5 --no-mac-updating &
root@loongson-pc:~# ./dpdk-l2fwd -l 2,3 --proc-type auto --socket-mem 1024 --file-prefix lwd0 -- -p 0x3 -T 5 --no-mac-updating
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Auto-detected process type: PRIMARY
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/lwd0/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: bus:0 pci map fail!EAL: bus:0 pci map fail!EAL: Probe PCI driver: net_ngbe (8088:103) device: 0000:01:00.0 (socket 0)
EAL: Probe PCI driver: net_ngbe (8088:103) device: 0000:01:00.1 (socket 0)
EAL: bus:1 pci map fail!EAL: bus:1 pci map fail!EAL: No legacy callbacks, legacy socket not created
MAC updating disabled
Lcore 2: RX port 0 TX port 1
Lcore 3: RX port 1 TX port 0
Initializing port 0... done:
Port 0, MAC address: 02:02:03:04:05:06
Initializing port 1... done:
Port 1, MAC address: 02:02:03:04:05:07
Checking link status..........................................................................................done
Port 0 Link down
Port 1 Link down
L2FWD: entering main loop on lcore 3
L2FWD: -- lcoreid=3 portid=1
L2FWD: entering main loop on lcore 2
L2FWD: -- lcoreid=2 portid=0
Port statistics ====================================
Statistics for port 0 ------------------------------
Packets sent: 0
Packets received: 0
Packets dropped: 0
Statistics for port 1 ------------------------------
Packets sent: 0
Packets received: 0
Packets dropped: 0
Aggregate statistics ===============================
Total packets sent: 0
Total packets received: 0
Total packets dropped: 0
====================================================
wget https://ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz
tar zxvf lrzsz-0.12.20.tar.gz
cd lrzsz-0.12.20/
./configure --prefix=/usr/local/lrzsz
make && make install
ln -s /usr/local/lrzsz/bin/lrz /usr/bin/rz
ln -s /usr/local/lrzsz/bin/lsz /usr/bin/sz