安装gentoo的点点滴滴(三)

2023-05-16

1. 每次启动电脑都不能启动swap分区,都要用swapon /dev/sdb3来激活交换分区。再去看gentoo的安装手册,原来是/etc/fstab没有编辑好,使用其自动生成的有问题。现在将自己修改的贴上,以后用的着。

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sdb2               /boot           ext2            noauto,noatime  1 2
/dev/sdb4               /               ext4            noatime         0 1
/dev/sdb3               none            swap            sw              0 0
#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0


2. 开机启动不了 iNodeAuthService 服务,现在终于解决了!现在贴出来:

安装的时候会自动生成/etc/init.d/iNodeAuthService:

#!/sbin/runscript

#
# Startup script for iNodeAuthService
#
# chkconfig: - 80 20
# description: iNodeAuthService
# processname: iNodeAuthService
# pidfile: /var/run/AuthenMngService.pid
# config: /etc/iNode/iNode.conf

# Get fake config
INODE_CFG="/etc/iNode/inodesys.conf"

[ -r "$INODE_CFG" ] && . "${INODE_CFG}"

# if INSTALL_DIR is not set, exit
if [ -z "$INSTALL_DIR" ]; then
    echo INSTALL_DIR not set yet
    exit 1
fi

LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$INSTALL_DIR/libs";export LD_LIBRARY_PATH

RETVAL=0

# See how we were called.
start() {
    echo -n "Starting AuthenMngService: "
    $INSTALL_DIR/AuthenMngService
}

stop() {
    echo -n "Stopping AuthenMngService: "
    $INSTALL_DIR/AuthenMngService -k
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        sleep 5
        start
        ;;
  *)
        echo "Usage: iNodeAuthService {start|stop|restart}"
        exit 1
esac

exit $RETVAL
根据 https://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&part=2&chap=4这里写service的规则重写下上面的的,如下:

#!/sbin/runscript
#
# Startup script for iNodeAuthService
#
# chkconfig: - 80 20
# description: iNodeAuthService
# processname: iNodeAuthService
# pidfile: /var/run/AuthenMngService.pid
# config: /etc/iNode/iNode.conf

# Get fake config
INODE_CFG="/etc/iNode/inodesys.conf"

[ -r "$INODE_CFG" ] && . "${INODE_CFG}"

# if INSTALL_DIR is not set, exit
if [ -z "$INSTALL_DIR" ]; then
    echo INSTALL_DIR not set yet
    exit 1
fi

LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$INSTALL_DIR/libs";export LD_LIBRARY_PATH

RETVAL=0

# See how we were called.
start() {
	ebegin Starting AuthenMngService
	$INSTALL_DIR/AuthenMngService
	eend $?
}
stop() {
	ebegin Stopping AuthenMngService
	$INSTALL_DIR/AuthenMngService -k
	eend $?
}
主要就是格式问题,有些不是通过emerge安装的服务,写的格式就不对,启动时加载成功不了。安装vmware与virtualbox时我直接用安装文件安装的,服务也是格式不对,每次启动都不能启动服务,主要就是要加ebegin开始,与eend $?结尾就可以了!!!!


3. 安装wine的时候打开时中文乱码,解决方法如下:

新建zh.reg,内容如下:


REGEDIT4
 
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"  
再用wine regedit,打开后直接导入上面的文件,重启wine就可以了。上面的字体还可以修改。


4. 用kchmviewer的时候打开文件乱码,网上百度都是说:

在kchmviewer中的“settiings”选单中的“Appication Settings...” 再选择“版本指定设置页面” 再选“基于KHTMLPart的组件”后按确定后,再重开就好了

于是就照着上面做了,如下图:


Automatically detect encoding for KHTMLPart and Webkit browsers (not recommended) 这个不能选

点上那个后,后面就全乱码了。然后用sudo kchmviewer qwe.chm,可又没出错。又以为是权限问题。后来才知道sudo 的时候那个没有选择这个选项,两个用户的配置不同才会有不同,不是权限问题。最后一定不要点击那个。

5. gentoo 安装metasploit的时候连不上postresql.不知道为什么,后来卸装再重装的时候看到重装的时候给出下面的信息:

 * Messages for package net-analyzer/metasploit-9999:

 * You need to prepare the database by running:
 * emerge --config postgresql-server
 * /etc/init.d/postgresql-<version> start
 * emerge --config =metasploit-9999
 * Adjust /usr/lib/metasploit9999/config/database.yml if necessary
原来还要用metasploit-9999的config来建立相应的数据库与角色。 以后安装软件的时候一定要看输出的信息,很重要的。

6. 安装java后,要打开jar后缀的文件,应用程序里面没有这个命令。每次都要自己输入java -jar xxx.jar。这样打开图形界面的程序就有点麻烦了,于是写了个桌面快捷程序,会自动添加到鼠标右键,然后选择默认程序就可以了。在.local/share/applications中新建java-jar.desktop,内容如下:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true   #不显示在应用程序菜单中
Exec=java -jar %f
Name=java-jar
Comment=java 打开jar文件
Icon=/opt/oracle-jdk-bin-1.7.0.45/jre/lib/desktop/icons/hicolor/48x48/apps/sun-java.png

7. 用goagent的时候遇到这样的问题:

WARNING - [Jan 24 17:44:24] Load Crypto.Cipher.ARC4 Failed, Use Pure Python Instead.
WARNING - [Jan 24 17:44:24] please install *libnss3-tools* package to import GoAgent root ca

(1) goagent会尝试调用python内置的Crypto.Cipher.ARC4进行RC4加密/解密,它属于pycrypto软件包。如果缺少这个软件包,则会产生一个调用失败的错误,这时goagent会使用自带的RC4加解密模块代替。后者在功能上与前者完全一致,在性能上略有损失,但在网速不是很快的时候几乎不会感觉到有差别。如果你的网速超过10Mbps或1MB/s,那么可能会体现为CPU占用率有所上升。直接安装 sudo emerge  dev-python/pycrypto

(2) 这个包主要是用来自动导入证书的,使用:USE=utils emerge -av dev-libs/nss就可以解决libnss3-tools问题。


8. 下载了新的版本的goagent的时候出现了下面的错误:

beyond@beyond ~/桌面/goagent-3.1.4/local $ python proxy.py
Traceback (most recent call last):
  File "proxy.py", line 2915, in <module>
    main()
  File "proxy.py", line 2891, in main
    CertUtil.check_ca()
  File "proxy.py", line 391, in check_ca
    if CertUtil.import_ca(capath) != 0:
  File "proxy.py", line 362, in import_ca
    return os.system('certutil -L -d sql:$HOME/.pki/nssdb | grep "%s" || certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n "%s" -i "%s"' % (commonname, commonname, certfile))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)

上面的错误主要是路径中含有中文,直接放到全英文的目录下就可以了。

9. 安装layman,提示如下:

 * Running layman-updater...
 *   Creating layman's make.conf file
 *   You are now ready to add overlays into your system.
 *   
 *     layman -L  #这一步相当慢,耐心等待下
 *   
 *   will display a list of available overlays.
 *   
 *   Select an overlay and add it using
 *   
 *     layman -a overlay-name
 *   
 *   If this is the very first overlay you add with layman,
 *   you need to append the following statement to your
 *   /etc/portage/make.conf file:
 *   
 *     source /var/lib/layman/make.conf
 *   
 *   If you modify the 'storage' parameter in the layman
 *   configuration file (/etc/layman/layman.cfg) you will
 *   need to adapt the path given above to the new storage
 *   directory.
 *   
 * 

还有一个gentoo-zh的说明:

由 Gentoo-China 和 Gentoo-Taiwan 合并而来。

用户手册:

使用方法 gentoo-zh 已经加入 layman 列表,只需要

layman -L
layman -a gentoo-zh
如果你是第一次使用 layman , 需要按照如下的办法配置

USE=git emerge layman

layman -f
layman -a gentoo-zh

echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf
其实就是最后一步 echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf 将 layman 的配置包含进来, 这样 layman 管理的 overlay 就暴露给 portage 了.

用户通知页面:

http://microcai.github.com/gentoo-zh

开发者手册: Developer's Guide 项目仓库: http://github.com/microcai/gentoo-zh

加入我们

这个 git repo 保留了2个项目的全部历史。

http://repo.or.cz/w/gentoo-zh.git 这里还有一个 mirror. 供 github 抽风的时候使用。


本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

安装gentoo的点点滴滴(三) 的相关文章

随机推荐

  • spring-boot的三种启动方式

    有段时间没有写博客了 xff0c 也在努力的从传统单机开发向分布式系统过度 xff0c 所以再次做一些笔记 xff0c 以方便日后查看 直接进入正题吧 xff0c 今天记录spring boot项目的三种启动方式 spring boot的启
  • 程序员做一辈子?

    首先 xff0c 程序员真有必要干一辈子吗 xff1f 如果你是个搬砖的 xff0c 你会考虑一辈子搬砖吗 xff1f 你肯定会想着过几年挣钱了 xff0c 买个车跑运输 xff0c 或者自己做工头 对程序员来说 xff0c 真心没有必要干
  • linux 远程桌面

    文章目录 linux 远程桌面服务端tigervnc设置VNC设置开机自启VNC设置开机自启修改防火墙配置 客户端使用MobaXterm连接 linux 远程桌面 使用tigervnc实现远程桌面 服务端 tigervnc设置 1 安装ti
  • vxWorks学习笔记

    vxWorks学习笔记 1 xff0e VxWorks开发方式 xff1a 交叉开发 xff0c 即将开发分为主机 xff08 host xff09 和目标机 xff08 target xff09 两部分 类似于dos下C语言程序的开发 合
  • android:stateNotNeeded="true"的作用

    这个属性默认情况为false xff0c 若设为true xff0c 则当Activity重新启动时不会调用onSaveInstanceState xff08 xff09 方法 xff0c 同样 xff0c onCreate xff08 x
  • 三种文件分配方式的区别

    文件分配方式分为三种 xff1a 连续分配 链接分配 索引分配 其中链接分配又分为隐式链接分配和显式链接分配 xff1b 索引分配又分为单级索引分配 两级 xff08 多级 xff09 索引分配 xff0c 混合索引分配 这里要说的是显式链
  • java 读取文件的几种方式和通过url获取文件

    public class ReadFromFile 以字节为单位读取文件 xff0c 常用于读二进制文件 xff0c 如图片 声音 影像等文件 public static void readFileByBytes String fileNa
  • C语言常见英文词汇表

    前言 今天整理资料的时候发现了大一的好玩的资料 xff0c 就放出来吧 xff01 词汇表 int integer 整性 xff08 数 xff09 auto automatic 自动的 float float 浮点 xff08 数 xff
  • WIFI安全测试之WPS(PIN)加密暴力破解

    前言 无线AP的接入验证有很多种方式 xff0c 家用无线路由器的验证方式包括OPEN WEP WPA WPA2 xff0c WPS的出现降低了接入验证的复杂度 xff0c 但是这种方式却隐含带来许多问题 同时由于很早就入手了第一批WIFI
  • Arduino+蜂鸣器制作有趣的小音乐

    Arduino相关姿势 Arduino是一个开源的硬件平台 xff0c 包括开发套组 xff08 开发板和相关的模块以及连线 xff09 和IDE 开发语言基于C 核心是一块8位ATmega328的处理器 xff0c 这块处理器是AVR单片
  • 计算机图形学笔记

    前言 图形学还是相对比较重要的课程 xff0c 趁着刚刚学完简要记录一下 基本内容 基本几何元素及其表示 xff0c 点 线 面 环以及三维形体 一般的 xff0c 我们使用参数方程来表示一个几何元素 参数方程中未知数的个数为元素的维数 三
  • 深入理解Java中的String

    深入理解Java中的String 本篇转载自博客园 xff0c 原作者平凡希 xff0c 特此说明
  • 反爬虫

    反爬虫
  • 设计模式——生产消费者模式

    设计模式 生产消费者模式 生产者消费者问题是线程模型中的经典问题 xff1a 生产者和消费者在同一时间段内共用同一存储空间 xff0c 生产者向空间里生产数据 xff0c 而消费者取走数据 像图片下载加载的模型就可以参考这个模型 UML图
  • win10如何修改mac地址(亲测通过)

    1 查看现有的mac地址 步骤 xff1a 打开cmd界面 xff0c 输入ipconfig all按回车 如下图 xff0c 箭头所指即为当前mac地址 2 屏幕右下角右键点击网络图标 xff0c 见下图 打开网络和共享中心 xff0c
  • eclipse怎么恢复默认界面

    Eclipse里面将界面恢复到默认状态 xff1a 1 选择Eclipse的工具栏里面的 窗口 xff08 Window xff09 xff0c xff08 Window Perspective Reset Perspective xff0
  • fatal: Authentication failed could not read from remote repository

    Git 无法clone pull fetch 异常 xff1a fatal could span class hljs operator not span span class hljs built in read span span cl
  • Mybatis Plus 自定义方法实现分页

    一般物理分页 xff0c 即通过sql语句分页 xff0c 都是在sql语句后面添加limit分页语句 xff0c 在xml文件里传入分页的参数 xff0c 再多配置一条sql xff0c 用于查询总数 xff1a lt select id
  • mac远程桌面Microsoft Remote Desktop for Mac - Mac-连接Windows远程桌面

    好记星不如烂笔头 xff0c 这里记录平时工作中用到的东西 xff0c 不喜可以留言 1 xff1a 在mac电脑远程桌面可以使用 xff0c Microsoft 远程桌面 使用 Microsoft Remote Desktop 这个还是很
  • 安装gentoo的点点滴滴(三)

    1 每次启动电脑都不能启动swap分区 xff0c 都要用swapon dev sdb3来激活交换分区 再去看gentoo的安装手册 xff0c 原来是 etc fstab没有编辑好 xff0c 使用其自动生成的有问题 现在将自己修改的贴上