brep 发表于 2018-6-5 13:43:59

龙芯派loongnix系统的一些后续设置

本帖最后由 brep 于 2018-6-5 22:21 编辑

系统启动后,按 Ctrl-Alt-F2,在tty2上用root登录(密码为loongson),然后进行以下设置:

1. 图形用户界面现在卡得要死,建议改成控制台登录:systemctl set-default multi-user.target如果以后想恢复GUI登录:
systemctl set-default graphical.target2. 更改主机名,默认的是localhost.localdomain,改成LoongsonPi:
echo "LoongsonPi" > /etc/hostname以下几项修改最好把sd卡拿出来,在别的机器上改,我的龙芯派控制台登录后没有闪烁的光标,只能用vi摸黑猜着改
3. 设置sshd,编辑/etc/ssh/sshd_config,以便远程登录:
#Port 22 前面的#去掉
#AddressFamily any 前面#去掉,把any改成inet,现在的龙芯派内核加载不了ipv6模块,ssh登录时有问题,所以改成这样:
AddressFamily inet在龙芯派上,启动sshd服务,并把sshd服务设为开机启动:
systemctl restart sshd
systemctl enable sshd

4. 修改 /etc/hosts,把其中192.168开头的行都去掉,否则 ftp.loongnix.org 会被解析到局域网,无法运行“yum update” 和 “yum install”
5. 修改 /etc/fstab,(此项不改也行,但是就看不到sd卡的第一个分区了):
#/dev/sda1       /               ext4    defaults      1 1
/dev/mmcblk0p1 /boot                   ext3    defaults      0 0
/dev/mmcblk0p2 /                     ext3    defaults      0 0

6. 龙芯派没有rtc电池,安装并启用ntp授时:yum install ntp
systemctl restart ntpd.service
systemctl enable ntpd.service



cyberhero 发表于 2018-6-5 20:09:27

如果圖形界面卡, 就只能當服務器用了

brep 发表于 2018-6-5 20:19:44

cyberhero 发表于 2018-6-5 20:09
如果圖形界面卡, 就只能當服務器用了

现在鼠标驱动有问题,还不知道GUI使用感受呢

sps_iie 发表于 2018-7-23 17:32:08

brep 发表于 2018-6-5 20:19
现在鼠标驱动有问题,还不知道GUI使用感受呢

我这是光标一直闪烁,没法移动,不知道鼠标驱动的问题啥时候能解决

cyberhero 发表于 2018-9-6 00:47:44

$ systemctl set-default multi-user.target
Failed to set default target: Interactive authentication required.
$ systemctl restart sshd
Failed to restart sshd.service: Interactive authentication required.
$ systemctl enable sshd
Failed to execute operation: Interactive authentication required.
怎麼回事
yum需要root權限,如何獲得

cyberhero 发表于 2018-9-6 20:12:36

換成root後,設置了ssh,未見錯誤,仍然無法ssh localhost
# systemctl -a | grep ssh
sshd-keygen.service                                                                                        loaded    inactive   den
sshd.service                                                                                             loaded    activating aun
sshd.socket      

cyberhero 发表于 2018-9-6 20:27:58

應該是server已經啓動
# systemctl status sshd.service -l
��● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since �2018-09-06 20:24:57 CST; 34s ago
Process: 481 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
Main PID: 481 (code=exited, status=255)
# ssh localhost
ssh: connect to host localhost port 22: Connection refused

cyberhero 发表于 2018-9-7 20:52:49

無法ssh的原因發現是/var/empty/sshd不是root所有,運行
chown -R root:root /var/empty/sshd後就可以了
页: [1]
查看完整版本: 龙芯派loongnix系统的一些后续设置