个人操作使用记录

新手涉及到的教学或入门贴,推荐新手必看,版主维护
回复
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#121

帖子 TeliuTe » 2017-01-07 23:05

qy117121 写了:我只会Ubuntu和Win :em03 还不如你的学生
学生用得到下学期了,这学期机房改建完就期末
现在都是在测试哪个linux系统能够在这个ovd平台上顺利运行
--
Ubuntu系统没法解决显卡驱动问题,屏幕分辨率刷新率卡的没法用
想着主机装的是CentOS,红帽系的可能会好点,试了下fedroa分辨率好了,刷新还是慢
以前翻译gnome3文档时,用过fedroa系统,印象还好
--
还有redhat和SUSE没试,有空了也试试,不知道有没有更好的显卡驱动
2块200G的SSD,一个给了win7,另一块用来存放Linux系统,生成的虚拟机放在2T的数据盘里
操作习惯里,没有最小化,右键菜单里,键盘辅助也多,学生大都习惯于鼠标点来点去,g3就是这么任性

清理系统命令(多复制几份好找)

代码: 全选

sudo aptitude purge ~ilinux-.*\(\!`uname -r|cut -d- -f1-2`\)~i[0-9]
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#122

帖子 TeliuTe » 2017-01-08 20:31

晕,libreoffice 居然是英文版的,还要安装中文补丁包 # dnf install libreoffice-langpack-zh-Hans
38个虚拟机已经生成好,网络设为静态地址,显卡改为Thinputer,没想到这儿出问题,大意了应该每个要用的都进去看看
--
得一个一个机子上安装了,里面有个课程表功能,可以把桌面添加进去,然后学生机的启动列表里就没有这个系统,也就是说,如果把win7添加到课表里,学生将看不到这个系统,当然也就不能进到这个系统里了
想用这个系统,只要访问 https://$ovdip/teacher.html 里面有上课和下课按钮,选择一个桌面点“上课”就可以开启所有学生机进入这个桌面
--
试了下更换模板依然没有中文,再换回原先模板的时候,设置好的网络都没了,早知道应该重新建个桌面池来测试新模板
这下好了,得重新生成桌面池,重新设置静态网址,找个脚本试试这次
--
重新生成虚拟机,之前忘记把显卡改了,又删除虚拟机,先在桌面池的授权里,右侧双击,在虚拟机的箭头上点一下取消授权,在桌面信息里也可以点取消授权,然后在ovd里删除虚拟机
重新生成的模板、桌面池名称改成不同的,创建好虚拟机,在课程表里添加不用的桌面,留下fedroa的,开机自动进入这个fedroa桌面
--
然后就是静态ip地址的设置了,里面自动设置的是192.168.3.xx,网关是192.168.3.1,不知道是在哪儿设置的dhcp
看看用什么办法来设置ip地址
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#123

帖子 TeliuTe » 2017-01-10 21:03

机房设静态IP是个大麻烦,搜了一圈fedroa里也没有简单命令行可以完成,无奈还是一台一台右上角有线连接里改,不知道普通用户怎么限制不让动网络
还缺少一个网络教室软件,软件库里没有italc,Ubuntu里的ica运行不起来,哪天建个强大点的fedroa虚拟机,在里面编译下
还要在教师机上装个64位的Win7,装个fedroa虚拟机,用里面的广播软件来演示
f里面终端居然不能用快捷键打开,还得自定义快捷键真麻烦,g3里面左侧栏里的程序,不知道有没有快捷键,Unity里似乎是可以
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 个人操作使用记录

#124

帖子 poloshiao » 2017-01-11 6:50

机房设静态IP是个大麻烦
不知道普通用户怎么限制不让动网络
1. 請參閱
https://docs.fedoraproject.org/en-US/Fe ... e_Settings
2.1.1. When to Use Static Network Interface Settings
For hosts which are not considered vital, but for which static IP addressing is still considered desirable, use an automated provisioning method when possible. For example, DHCP servers can be configured to provide the same IP address to the same host every time. This method could be used for communal printers for example.
All the configuration tools listed in Section 2.1.3, “Selecting Network Configuration Methods” allow assigning static IP addresses manually. The nmcli tool is also suitable for use with scripted assignment of network configuration.
1-1. 如果還有問題
請提供你的 dhcp server 或 router 品牌/型號

2. 下述 Fedora 25 完整安裝使用說明書 不知有沒有幫助 (也許 你已經看過了)
2-0. https://docs.fedoraproject.org/en-US/Fe ... index.html
Release Notes
2-1. https://docs.fedoraproject.org/en-US/Fe ... ion_Guide/
Installation Guide
Installing Fedora 25 on 32 and 64-bit AMD and Intel
2-2. https://docs.fedoraproject.org/en-US/Fe ... index.html
Networking Guide
2-3. https://docs.fedoraproject.org/en-US/Fe ... index.html
SELinux User's and Administrator's Guide
2-4. https://docs.fedoraproject.org/en-US/Fe ... index.html
System Administrator's Guide
2-5. https://docs.fedoraproject.org/en-US/Fe ... index.html
Virtualization Getting Started Guide
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#125

帖子 TeliuTe » 2017-01-11 10:09

多谢,我也觉得建个DHCP比较方便,找个机子临时创建一个服务器,然后再设固定也可以复制粘贴不用那么多键盘
fedroa里面默认也没有开启数字灯,主机名还没检查修改,在主文件夹里放个脚本,下载服务器上的另一个脚本并运行
不知道有没有列出所有自启动程序和服务的方法,以便查看系统中是否存在不安全
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 个人操作使用记录

#126

帖子 poloshiao » 2017-01-11 11:21

列出所有自启动程序和服务的方法
試試
sudo systemctl list-units --type service --no-pager | grep active
(grep active 是多餘的 預設 就是只列印出 active)

參閱
https://access.redhat.com/documentation ... vices.html
9.2. Managing System Services
9.2.1. Listing Services
說明
Active
Information whether the service unit is running followed by a time stamp.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 个人操作使用记录

#127

帖子 poloshiao » 2017-01-11 11:31

我也觉得建个 DHCP 比较方便
如何分配給網卡 DD:GH:DF:E5:F7:D7; 固定的 192.168.1.2 ?

參閱
https://help.ubuntu.com/community/dhcp3 ... es_example
host bla1 {
hardware ethernet DD:GH:DF:E5:F7:D7;
fixed-address 192.168.1.2;
}
host bla2 {
hardware ethernet 00:JJ:YU:38:AC:45;
fixed-address 192.168.1.20;
...
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#128

帖子 TeliuTe » 2017-01-11 14:51

多谢,等有空了试一试dhcp3的安装和设置,新版的改成了isc-dhcp-server https://help.ubuntu.com/community/isc-dhcp-server
Ubuntu16.04安装dhcp服务器 http://www.linuxdiyf.com/linux/23299.html

代码: 全选

 1.安装DHCP服务
安装isc-dhcp-server:
$ sudo apt install isc-dhcp-server
DHCP的主要配置文件有两个,分别位于 /etc/default/isc-dhcp-server 和 /etc/dhcp/dhcpd.conf。
 
2.配置DHCP服务
首先配置 /etc/default/isc-dhcp-server 文件:
$ sudo vim /etc/default/isc-dhcp-server
配置DHCP服务使用哪个网卡接口:
INTERFACES="eth0"
配置 /etc/dhcp/dhcpd.conf 文件:
# 1. 整體的環境設定
ddns-update-style            none;            <==不要更新 DDNS 的設定
ignore client-updates;                        <==忽略用戶端的 DNS 更新功能
default-lease-time           259200;          <==預設租約為 3 天
max-lease-time               518400;          <==最大租約為 6 天
option routers               192.168.100.254; <==這就是預設路由
option domain-name           "centos.vbird";  <==給予一個領域名稱
option domain-name-servers   168.95.1.1, 139.175.10.20;
# 上面是 DNS 的 IP 設定,這個設定值會修改用戶端的 /etc/resolv.conf 檔案內容

# 2. 關於動態分配的 IP
subnet 192.168.100.0 netmask 255.255.255.0 {
    range 192.168.100.101 192.168.100.200;  <==分配的 IP 範圍

    # 3. 關於固定的 IP 啊!
    host win7 {
        hardware ethernet    08:00:27:11:EB:C2; <==用戶端網卡 MAC
        fixed-address        192.168.100.30;    <==給予固定的 IP
    }
}

$ sudo vim /etc/dhcp/dhcpd.conf
文件内容如下:
#
#Sample configuration file for ISC dhcpd for Debian
#
#Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages (‘none’, since DHCP v2 didn’t
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks…
option domain-name-servers ns1.example.org, ns2.example.org;
option domain-name "yourdomainname.com";
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
# authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
# subnet10.152.187.0 netmask 255.255.255.0 {
# }
# This is a very basic subnet declaration.
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.150 10.0.0.253;
option routers 10.0.0.2;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.254;
option domain-name-servers 10.0.0.1, 10.0.0.2;
option ntp-servers 10.0.0.1;
option netbios-name-servers 10.0.0.1;
option netbios-node-type 8;
}
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
# }
# This declaration allows BOOTP clients to get dynamic addresses,
# which we don’t really recommend.
# subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
# }
# A slightly different configuration for an internal subnet.
# subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name “internal.example.org”;
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
# }
# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.
# host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename “vmunix.passacaglia”;
# server-name “toccata.fugue.com”;
# }
# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
# hostfantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
# }
# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.
# class“foo” {
# match if substring (option vendor-class-identifier, 0, 4) = “SUNW”;
# }
# shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of “foo”;
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of “foo”;
# range 10.0.29.10 10.0.29.230;
# }
# }
注意:替换域名和DNS域名服务器地址
 
3.配置完成之后重启DHCP服务:
$ sudo service isc-dhcp-server restart
 
4.查看dhcp是否正常运行:
$ sudo netstat -uap
扫描局域网所有mac的命令,假如依次开启学生机,dhcp应该也是依次分配ip:

代码: 全选

 root@TeliuTe:/home/teliute#  nmap -sP 10.0.5.0/24 
root@TeliuTe:/home/teliute#  cat /proc/net/arp

代码: 全选

root@TeliuTe:/home/teliute# sudo apt-get install isc-dhcp-server
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
建议安装的软件包:
  isc-dhcp-server-ldap
下列【新】软件包将被安装:
  isc-dhcp-server
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 82 个软件包未被升级。
需要下载 744 kB 的软件包。
解压缩后会消耗掉 2,276 kB 的额外空间。
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#129

帖子 TeliuTe » 2017-01-11 16:45

dd 的速度有点慢 sudo dd if=/dev/sda4 of=/dev/sda2 ,每秒22M,40G分区用了半个小时,再开个新终端,输入 sudo watch -n 5 killall -USR1 dd 可以看到进度

复制完,检查并修复分区大小

代码: 全选

 sudo e2fsck -f /dev/sda2
sudo resize2fs /dev/sda2
如果大小没变,进入到系统后,再重新运行命令
[root@1-Teacher ~]# sudo resize2fs /dev/sda2
resize2fs 1.43.3 (04-Sep-2016)
/dev/sda2 上的文件系统已被挂载于 /;需要进行在线调整大小

old_desc_blocks = 5, new_desc_blocks = 13
/dev/sda2 上的文件系统现在为 26214400 个块(每块 4k)。
重设uuid,原来分区的uuid改掉

代码: 全选

uuidgen #得到新uuid d1925318-25b7-4cee-a956-f89980f664de 
 sudo tune2fs -U d1925318-25b7-4cee-a956-f89980f664de /dev/sda4
查看uuid

代码: 全选

sudo blkid
 ls -l /dev/disk/by-uuid
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 个人操作使用记录

#130

帖子 poloshiao » 2017-01-11 18:34

sudo apt-get install isc-dhcp-server
http://packages.ubuntu.com/search?suite ... chon=names
每個版本 都有
套件 isc-dhcp-server

換個下載伺服器 看看
https://launchpad.net/ubuntu/+archivemirrors
Official Archive Mirrors for Ubuntu
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#131

帖子 TeliuTe » 2017-01-12 20:45

教师机上技术人员给装的32位win7,机子有8G内存,为了安装极域的网络教室,用32位的,想着再装个64位的,安装虚拟机装fedroa用来演示上课,下载了一个ghost版的64位win7准备安装
分区一检查已经分出了4个主分区,第3个是扩展分区,这样没法再给win7分区,用dd把最后的sda4里的fedroa挪到sda2,删除了sda4还剩余600G空间,想再分个扩展分区,发现已经有一个

用gparted把后面所有的剩余空间,合并到sda3的扩展分区里,sda3里有Ubuntu系统,发现sda2的空间大小没有恢复
用resize2fs将sda2空间恢复后,出现grub rescue> 提示符,之前后装的fedroa 覆盖了Ubuntu的grub

用 insmod normal 和 normal 顺利进入Ubuntu,想着重装下grub,就挂载fedroa的 sda2 到 /mnt ,用 sudo grub-install --root-directory=/mnt /dev/sda重启,又进到 grub> 提示符,用cat命令把Ubuntu的grub.cfg 找出启动项,里面的root=UUID=XXX这一长串不好输入,好像UUID可以用设备名,不知道是怎么写的,

进Ubuntu里 sudo grub-install --root-directory=/ /dev/sda 用U的启动菜单,字体有点小了,fedroa的菜单不好看,但是字体大
在sda3的扩展分区里,分出40G的sda8格成ntfs,不知怎么后面600G的剩余空间也格成了ntfs,当时没注意

进到win7里用win32的ghost手动恢复分区才发现是恢复到600G分区,在win里也没管又重新ghost到40G的分区,用NTBootAutofix添加win7的引导进去安装,结果安装的时候却安装到600G里
又回到U里,删除600G分区,重新分出一个100G的ntfs给Win7当数据D盘,重新设置盘符,再重新运行40G的安装程序,在32位win7里删除64位win7的盘符,用easybcd删除第二个win7的启动菜单,

进U里用sudo update-grub 更新启动菜单,在grub启动菜单里选择进入各个系统,不知道怎么删除不用的菜单项,留下四个系统Ubuntu/fedroa/win7 32/win7 64就行了
看第一个win7是用 chainloader +1 进系统,但是第二个win7在ghost恢复后,用这个没能进去,光标一直在左上角闪烁,用NTBootAutofix添加的可以正确引导ghost恢复但还没安装的win7
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#132

帖子 TeliuTe » 2017-01-13 17:20

win7 64位安装好,广播程序装好不起作用,咨询了下是要改start.vbs stop.vbs里面的有个频道号,改成学生机上的10即可
瘦终端管理系统的唤醒,需要在学生端BIOS里第二项的PowerManage里启用 wake on lan,貌似没看到配置文件,学生端开机后就会自动显示在列表里,不能整体导出配置
--
Vbox5 USB里添加了鼠标,然后鼠标就出不去了,删除USB里的条目,直接启动出错内存只读,然后不删除只是去掉前面的勾好了
安装增强功能,挂载失败,手动在主机的vbox安装文件夹里挂载guest.iso,运行autorun.sh,但是分辨率还是1024*768,还没重启

[root@1-vmTeacher ~]# dnf update
[root@1-vmTeacher ~]# sudo dnf config-manager --add-repo=http://repo.fdzh.org/FZUG/FZUG.repo
[root@1-vmTeacher ~]# sudo dnf install fzug-release -y
[root@1-vmTeacher ~]# sudo dnf install sogoupinyin sogoupinyin-selinux -y
[root@1-vmTeacher ~]# gsettings set org.gnome.settings-daemon.plugins.keyboard active false
[root@1-vmTeacher ~]# imsettings-switch FCITX
[root@1-vmTeacher ~]# dnf remove ibus
[root@1-vmTeacher ~]# dnf install libreoffice-langpack-zh-Hans -y

代码: 全选

[root@1-vmTeacher ~]# su -c 'dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
[root@1-vmTeacher ~]# sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1

kompozer 第一学期学网页需要
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#133

帖子 TeliuTe » 2017-01-14 17:57

dnf install 要加个 -y 参数,要不隔很久来一看,命令行停在了 y/N 上
数据库在处理变动频繁的情况,应该比Excel类电子表格要好,有机会可以学学MySQL的函数和命令
--
audacity 导出MP3时,可以保存一个标签的模板,设为默认值,或者点加载,不用再一个一个输入标题、年份、艺术家这些
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 个人操作使用记录

#134

帖子 poloshiao » 2017-01-14 18:17

[root@1-vmTeacher ~]# sudo dnf install
不太明白
root 登入
又使用 sudo
头像
TeliuTe
论坛版主
帖子: 7668
注册时间: 2007-11-25 13:29
系统: 16/18/20/w7
来自: 新疆博乐
联系:

Re: 个人操作使用记录

#135

帖子 TeliuTe » 2017-01-14 20:34

poloshiao 写了:
[root@1-vmTeacher ~]# sudo dnf install
不太明白
root 登入
又使用 sudo
这些是网上复制的命令,用Ubuntu习惯了加sudo,看着命令行也挺熟悉
fedroa里可以用root登录,不用每次输入管理员密码,确实是挺爽快的感觉
--
Vbox里的fedroa22虚拟机分了4个cpu、4G内存,但是感觉差别不明显
分辨率还是只有1024*768,guest.iso里的sh运行了似乎没什么作用
--
问了下技术支持,答复没有Linux版本的Broadcast广播程序,说是给研发提一下,可能性也不大
暂时计划用win+虚拟机+fedroa来上课演示,有空看看fedroa下能否使用italc,不过因为是网络云桌面,italc速度会很慢

=================================我是学期末分割线===========================================
回复