一半君的总结纸

听话只听一半君

手贱Thinkpad T410(女王大人淘汰机) 装 CentOS 7 和 Maya 2015 SP2 高逼格和谐法 / tmux tigervnc dropbox pidgin 2.10.9 安装法

再手贱就剁手!!! 唉可惜又不是optimus的动态切换显卡的机器,无法满足lz的瞎折腾强迫症

  1. 和CentOS 6.5同样方法,做USB安装盘(这次下的是CentOS-7.0-1406-x86_64-KdeLive.iso,因为只有1g多,可以放4GU盘上,默认的大的DVD ISO和Everythin ISO分别是4G多和6G多,只能放8GB优盘)还是先转成了.img,然后用了Win32 Disk Imager 写进去)这种方法就是官方wiki网页说明上的做法之一,相比其他先给优盘分区等的高级方法而言,操作比较简单,但是缺陷就是你的这个U盘就只能当安装盘用了,剩余空间你也用不了了
  2. 这机器的显卡是NVS 3100M lz不是专业人士,所以使用了脑残驱动安装法,用了ELRepo的kmod驱动
    # 添加 EPEL repo
    rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
    # 装驱动
    yum install kmod-nvidia nvidia-x11-drv
    

    nvs3100

  3. 同样方法加EPEL repo,然后装ntfs-3g

    # 加repo
    wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm
    rpm -ivh epel-release-7-1.noarch.rpm
    # 装
    yum install ntfs-3g
    
  4. 装 pidgin 及其插件

    yum groupinstall 'Development Tools'
    
    # pidgin 2.10.9 可能装多了几个 ...
    yum install glib2-devel gtk2-devel libXScrnSaver-devel libSM-devel gtkspell-devel libxml2-devel gstreamer-devel farstream-devel libidn-devel meanwhile-devel avahi-devel avahi-ui-devel dbus-devel dbus-glib-devel NetworkManager-devel perl-devel perl-Glib-devel mod_perl-devel nss-devel openssl-devel tcl-devel tk-devel
    
    # 如果是6.5可能还需要这两个
    yum install farsight2 farsight2-devel
    
    # other needed lib
    yum install perl-ExtUtils-Embed
    
    wget http://downloads.sourceforge.net/project/pidgin/Pidgin/2.10.9/pidgin-2.10.9.tar.bz2
    tar -xvf pidgin-2.10.9.tar.bz2
    cd pidgin-2.10.9
    ./configure
    make
    make install
    
    
    # 装lwqq wiki里让装的
    sudo yum install gcc gcc-c++ make cmake pkgconfig libcurl-devel sqlite-devel zlib-devel js-devel
     
    # 装pidgin-lwqq wiki里让装的
    sudo yum install gcc gcc-c++ make cmake pkgconfig glib-devel libpurple-devel
     
    # 装libev
    yum install libev libev-devel
    
    # lwqq
    git clone https://github.com/xiehuc/lwqq.git
    cd lwqq
    mkdir build;cd build
    cmake ..
    make && make install
    
    # pidgin-lwqq
    git clone https://github.com/xiehuc/pidgin-lwqq.git
    cd pidgin-lwqq
    git checkout -b dev origin/dev
    mkdir build && cd build
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    cmake ..
    make
    sudo make install
    
    # pidgin-gnome-keyring
    sudo yum install libgnome-keyring-devel
    wget https://pidgin-gnome-keyring.googlecode.com/files/pidgin-gnome-keyring-1.20_src.tar.gz
    tar xvf pidgin-gnome-keyring-1.20_src.tar.gz
    cd pidgin-gnome-keyring-1.20
    make
    make install
    
    # 如果上述某步找不到pidgin可以先这样一下
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    
  5. 装一些常用工具

    # flash 插件
    yum install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
    rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
    yum check-update
    yum  install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl
    
    # pip
    wget https://bootstrap.pypa.io/get-pip.py
    python get-pip.py
    

    如果你firefox没用系统自带的,放在了其他地方,那你可以

    ln -s /usr/lib64/mozilla/plugins/libflashplayer.so ~/.mozilla/plugins/
    
  6. 装Dropbox

    yum install  nautilus-extensions nautilus-devel docutils
    wget https://linux.dropbox.com/packages/nautilus-dropbox-1.6.2.tar.bz2
    tar -xjf nautilus-dropbox-1.6.2.tar.bz2
    cd nautilus-dropbox-1.6.2
    ./configure
    make && make install
    
    # 默认你点任务栏上的图标的时候,他开的是nautilus,如果想用dolphin(但是又不想删nautilus)可以用下述脑残法
    # 先备份下原来的nautilus可执行文件
    mv /usr/bin/nautilus /usr/bin/nautilus.bak
    
    vim /usr/bin/nautilus
    # 其内容放成
    #!/bin/bash  
    exec dolphin $2
    exit 0 
    
    # 改成能运行的
    chmod 755 /usr/bin/nautilus
    
    
  7. 装 Maya 2015 SP2 及高逼格和谐法

    wget http://download.autodesk.com/us/support/files/maya_2015_service_pack_2/Autodesk_Maya_2015_SP2_English_Linux_64bit.tgz
    mkdir Autodesk_Maya_2015_SP2_English_Linux_64bit 
    tar -xvf Autodesk_Maya_2015_SP2_English_Linux_64bit.tgz -C Autodesk_Maya_2015_SP2_English_Linux_64bit
    cd Autodesk_Maya_2015_SP2_English_Linux_64bit
    
    # 需要装以下packages先
    yum install libXp-devel libpng12 compat-libtiff3 xorg-x11-fonts-ISO8859*
    ./setup
    # 装的时候选Network license, 666-69696969 657G1
    
    # 装好以后,自己装flexnetserver,因为好像上面没帮你装
    yum install adlmflexnetserver-9.0.23-0.x86_64.rpm
    yum install redhat-lsb
    
    # 照说明覆盖/opt/flexnetserver/adskflex和/usr/autodesk/maya2015-x64/lib/libadlmint.so.9.0.23
     
    # 改lic.dat 里的 HOSTNAME 和 MAC 下面这两条命令可以查他们分别是什么
    /opt/flexnetserver/lmutil lmhostid hostname
    /opt/flexnetserver/lmutil lmhostid ether
     
    # 手动开 daemon 试下
    /opt/flexnetserver/lmgrd -z -c lic.dat
    # 然后你直接开Maya了,如果你没搞错什么,应该能开了
    

    上述操作里你可以把lmgrd放”启动”里 或者 自己拼个wrapper script来开maya,不过这样逼格甚低,为了高逼格,可以把他装成”service”(或者按Linux的话说,叫Daemon)

    高逼格神秘文件安装法

    与之前CentOS 6.5中的高逼格安装法的不同之处在于,CentOS 7转向了使用systemd来管理daemon 所以你可以在/usr/lib/systemd/system/下新建个文件,随便起个xxx.service的名字,内容如下:(lz存成了lmgrd.service) 其内容如下

    [Unit]
    Description=launch flexlm server
     
    [Service]
    ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic.dat
    Type=forking
     
    [Install]
    WantedBy=multi-user.target
    

    然后

    # 启动新加的service
    systemctl daemon-reload
    systemctl start lmgrd
     
    # 查询下看成功没有
    systemctl status lmgrd
    # 如果出现Active: active (running) since ...的字样说明可以了,可以开Maya验证下是不是可以
     
    # 最后让他自动启动
    systemctl enable lmgrd
    # 其实就是在/etc/systemd/system/下帮你建了个symbolic link ...
    

    效果图
    lmgrd

  8. 系统自带的python是2.7.5 ,repo里装的tmux是1.8,我想要的powerline和c-a z的zoom都能用,不折腾装最新版了…
    装powerline

    pip install git+git://github.com/Lokaltog/powerline
    

    /etc/tmux.conf里加

    unbind C-b
    set -g prefix C-a
    set-option -g default-terminal "screen-256color"
     
    set-window-option -g mode-keys vi
     
    source '/usr/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'
    

    之后根据powerline官方说明,装了patched font Inconsolata,然后把console的字体设成这个字体

  9. 装sublime text 3 build 3059

    curl http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x64.tar.bz2 | tar xj
    sudo mkdir -p /opt/sublime_text
    sudo cp -r sublime_text_3/* /opt/sublime_text/
    sudo mv /opt/sublime_text/sublime_text.desktop ~/Desktop
    
  10. 装 vnc

    yum install tigervnc tigervnc-server
    
    # 加帐号
    useradd fuckervnc
    passwd fuckervnc
    
    # 设vnc密码
    su fuckervnc
    vncpasswd
    
    # 加systemd 服务
    cp /lib/systemd/system/vncserver@.service to /etc/systemd/system/vncserver@:1.service
    # 把 <user>改成 fuckervnc 设分辨率可以在%i后面加比如   -geometry 1280x720
    vim /etc/systemd/system/vncserver@:1.service
    systemctl daemon-reload
    systemctl enable vncserver@:1.service
    systemctl start vncserver@:1.service
    # 看启动好没
    systemctl status vncserver@:1.service
    

    之后连 your-ip:1 或者 your-ip:5901

    如过想直接看当前登陆用户的桌面,可以用x0vncserver,比如

    x0vncserver -display :0 -passwordfile ~/.vnc/passwd
    

    如果你想从浏览器里直接访问,不用客户端,那还得有

    yum install tigervnc-server-applet
    
    # 可以看看到底5801有没有在Listening
    nmap localhost
    

    此外从浏览器里访问5801端口就可以打开webui,输入地址的时候访问:0 就是x0vncserver,如果是:1就是后台的vncserver,有个问题从浏览器访问的时候,render local cursor选项不管开关都看不到鼠标,用桌面版realvnc viewer能看到一个小黑点,另外如果java是最新版的话8.0 update 71,安全设置会禁止tigervnc的网页版界面,必须去控制面板里添加允许

其他:
如果发现亮度没法调节了,在/etc/X11/xorg.conf里加入一行,参考ThinkWiki

Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
        # 加入下面这行
        Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

有次偶然发现 ~ | 在不同tty里是乱码,x下正常,原因未知,运行下面命令后恢复正常

sudo loadkeys -d

参考:
How to install the Nvidia proprietary driver in CentOS
How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
Install Adobe Flash Player 11.2 on CentOS/RHEL 6.5

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: