海运的博客

VMware复制centos7 MAC改变

发布时间:August 11, 2015 // 分类:CentOS,VMware // No Comments

开机后无网络错误提示:

RTNETLINK answers: File exists
network.service: control process exited, code=exited status=1
Failed to start LSB: Bring up/down networking.
Unit network.service entered failed state

修改/etc/sysconfig/network-scripts/ifcfg-eno*配置文件MAC地址为当前MAC即可

CentOS7进程管理

发布时间:March 29, 2015 // 分类:CentOS // No Comments

启动或停止:

systemctl stop firewalld
systemctl startfirewalld

开机启动:

systemctl enable firewalld
systemctl disable firewalld

Centos/ubuntu下Xvfb配合x11vnc搭建VNC Server

发布时间:June 26, 2014 // 分类:CentOS // No Comments

远程运行Linux窗口程序使用X Windows太重量级了,可以使用Xvfb新建虚拟X窗口,通过x11vnc启动VNC Server并转发Xvfb启动的虚拟窗口。

apt install x11vnc xvfb
yum install xorg-x11-server-Xvfb
yum install x11vnc
#新建X虚拟窗口
Xvfb :1 -screen 0 1024x768x24 -nolisten tcp &
#设置默认窗口为新建的虚拟窗口,打开窗口程序时调用
export DISPLAY=:1
#或
DISPLAY=:1 firefox

INIT:

#!/bin/bash
#chkconfig: 345 95 50
#description: Starts xvfb on display 1
if [ -z "$1" ]; then
    echo "`basename $0` {start|stop}"
    exit
fi   
case "$1" in
    start)
    Xvfb :1 -screen 0 1024x768x24 -nolisten tcp &
    export DISPLAY=:1
    echo 'export DISPLAY=:1' >> ~/.bashrc 
    ;; 
    stop)
    killall Xvfb
    ;;
esac

新建VNC服务器并转发指定X窗口

x11vnc -listen 0.0.0.0 -rfbport 5900 -noipv6 -passwd password -display :1 -forever

然后通过VNC客户端连接,默认端口5900,Windows下可使用TightVNC或UltraVNC。
启动的软件窗口太小,设置:

xdotool search --name ".*Mozilla Firefox" windowsize 1440 900

ubuntu下firefox中文显示乱码需安装中文字体:

apt install fonts-wqy-microhei

rpmbuild遇到的问题

发布时间:January 28, 2014 // 分类:CentOS // No Comments

当打包文件包含软链接时遇到以下错误:error: Symlink points to BuildRoot,解决:

#源文件使用绝对路径,软链接使用%{buildroot}路径,打包时会自动处理
ln -sf /usr/local/lib/libfdfsclient.so.1 %{buildroot}/usr/local/lib/libfdfsclient.so

安装打包好的rpm时提示,而依赖的动态库本身位于要安装的软件包中。

error: Failed dependencies:libfastcommon.so()(64bit) is needed by fastdfs-4.0.6-1.el6.x86_64

原因是rpm build时会检查依赖,安装时如果不满足依赖不能安装,禁用之:

AutoReqProv: no

自建yum源

发布时间:January 27, 2014 // 分类:CentOS // No Comments

安装制作软件包:

yum -y install createrepo

创建仓库目录:

mkdir -p /yum/centos/6/{i386,x86_64}
生成repodata索引
createrepo -d /yum/centos/6/x86_64/
#更新索引
createrepo --update /yum/centos/6/x86_64/

配置Nginx:

location / {
    root /yum;
    autoindex_exact_size off;
    autoindex_localtime on;
    autoindex  on;
}

配置yum使用源:

[testrepo]
name=test repo
baseurl=http://192.168.1.1/centos/6/$basearch/
gpgcheck=0
enabled=1
分类
最新文章
最近回复
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...
  • jiangker: good, very helpful to me
  • fengfeng: N1 armbian 能有编译下内核吗。。我要开启can 不懂怎么操作