centos7.3安装配置powerline

author author     2022-09-07     742

关键词:

一、Powerline简介及演示环境:

Powerline是一个极棒的Vim编辑器的状态栏插件,主要用于显示状态行和提示信息。

特点:

  • 使用Python编写,使其更具扩展性且功能丰富

  • 稳定易测的代码库,兼容Python 2.6+Python 3

  • 支持多种Linux功能及工具的提示和状态栏

  • 通过JSON保存配置和颜色方案

  • 快速、轻量级,具有后台守护进程支持,提供更佳的性能

GitHubhttps://github.com/powerline/powerline

Docshttps://powerline.readthedocs.io/en/latest/

演示环境:

系统:CentOS Linux release 7.3.1611 (Core)

Python版本:系统自带的2.7.5

Bash版本:系统自带的4.2.46(1)-release(x86_64-redhat-linux-gnu)

备注:在CentOS 6.9环境中,自带Bash版本为4.1.2Python版本无论为2.6.62.7.x还是3.6.x都会出现如下错误提示

技术分享

 

二、安装依赖软件包:

# yum -y install epel-release git python-pip wget

# pip -V  -->  pip 8.1.2 from/usr/lib/python2.7/site-packages (python 2.7)

 

三、安装Powerline

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

技术分享


四、安装Powerline字体:

# wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf

# wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf

# mv PowerlineSymbols.otf /usr/share/fonts/

# fc-cache -vf /usr/share/fonts/            //更新系统的字体缓存

# mv 10-powerline-symbols.conf /etc/fonts/conf.d/

 

五、在Bash中启用Powerline

# pip show powerline-status     //获取Powerline的安装位置

技术分享

# find / -name powerline.sh -->  /usr/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh

# vim /etc/profile.d/powerline.sh

powerline-daemon -q

POWERLINE_BASH_CONTINUATION=1

POWERLINE_BASH_SELECT=1

. /usr/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh

# . /etc/profile.d/powerline.sh

技术分享


六、在Vim中启用Powerline

# find / -name vim --> /usr/lib/python2.7/site-packages/powerline/bindings/vim

新建文件/root/.vimrc,添加如下代码至文件/root/.vimrc

# vim /root/.vimrc

set rtp+=/usr/lib/python2.7/site-packages/powerline/bindings/vim

set laststatus=2

set t_Co=256

# . /root/.vimrc

技术分享

技术分享


本文出自 “天道酬勤” 博客,请务必保留此出处http://qiuyue.blog.51cto.com/1246073/1946345

shubuntu16.04的脚本,自动安装zsh,oh-my-zsh,tmux和powerline,以及配置powerline(代码片段)

查看详情

centos7.3.1708系统虚拟机安装配置图解教程

一、安装CentOS7.3.1708系统   成功引导系统后,会出现下面的界面            界面说明:           Ins 查看详情

centos7.3安装和配置jre1.8

在正式环境里我们可以不安装jdk,仅仅安装Java运行环境jre即可;  第一步:下载jre我们去oracle官方下载下jre http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html 下载serverjre  第二 查看详情

centos7.3安装和配置jre1.8

在正式环境里我们可以不安装jdk,仅仅安装Java运行环境jre即可;  第一步:下载jre我们去oracle官方下载下jre http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html 下载serverjre 这里提供下百度云 查看详情

centos7.3安装和配置jre1.8转

 在正式环境里我们可以不安装jdk,仅仅安装Java运行环境jre即可;  第一步:下载jre我们去oracle官方下载下jre http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html 下载serverjre &n 查看详情

centos7.3下zabbix3.5之邮件报警配置

一、邮件客户端以及脚本相关配置1、安装sendmail,一般操作系统默认安装了安装yuminstallsendmail启动servicesendmailstart设置开机启动 chkconfigsendmailon2、安装邮件发送工具mailx,一般操作系统默认安装了yuminstallmailx-y3、设置发送邮件的... 查看详情

centos7安装rocketmq及配置测试

环境Centos7RocketMQ3.2.6安装位置/usr/local/alibaba-rockermq外网ip182.254.145.66内网ip10.105.23.114安装wgethttps://github.com/alibaba/RocketMQ/releases/download/v3.2.6/alibaba-rocketmq-3.2.6.tar.gztaralibaba-rocke 查看详情

centos7.3练习环境的安装搭建。

...目的:搭建学习环境,配置静态IP方便使用。最小化安装CentOS7.3;配置本地yum源;安装vim编辑器;设置静态IP为172.18.34.88。注:文中#后面为注释一,环境介绍1.VMwareWorkstationPro12.5.62.CentOS-7-x86_64-Everything-1611.iso3.172.18.0.1/16 我的... 查看详情

macosx:powerline风格的zsh配置

...,但是配置过程较为复杂,这个脚本能够帮你一键配置。powerline主题,基于oh-my-zsh的主题,也就是上面的效果啦。iTerm目前最新版本是iTerm2,下载地址http://iterm2.com/,这个没什么好说的,解压以后扔到Applic 查看详情

centos7.3下的一个iptables配置

centos7.3默认使用的防火墙应该是firewall,而不是iptables。而我们xxmj服务器使用的是iptables防火墙。所以,在配置防火墙之前,我们需要先关闭firewall,安装iptables。查看firewall的安装和启动状态[[email protected]~]#yumlistinstalledfirewall... 查看详情

在centos7上安装并配置python3.6环境,怎样使用3.6.1版本

参考技术A在CentOS7上安装并配置Python3.6环境在纯净的CentOS系统上安装Python环境主要有两种办法。一种是通过源码编译安装,另外一种就是安装已经打好的RPM包。依照个人习惯,我们先来看一下如何通过源码编译的方式安装Python3.6... 查看详情

centos7.3安装ansible(代码片段)

1、ansible介绍ansible是新出现的自动化运维工具,基于Python研发。糅合了众多老牌运维工具的优点实现了批量操作系统配置、批量程序的部署、批量运行命令等功能。仅需在管理工作站上安装ansible程序配置被管控主机的IP信息,被... 查看详情

centos7.3最小化安装后安装桌面问题(代码片段)

centos7.3最小化安装后安装桌面问题/etc/sysconfig/network-scripts文件下网卡配置文件,默认为onboot=no,修改为yes重启网络服务systemctlrestartnetworkgcc,gcc-c++未安装,yum安装,避免装其他软件错误安装Desktop新命令yumgroups>yumgroupsinstall"GnomeDe... 查看详情

mac终端定制(iterm2+oh-my-zsh+powerline+solarized+agnoster)(代码片段)

...卸载uninstall_oh_my_zshoh-my-zsh安装成功效果图:三、安装Powerline字体库gitclonegit@github.com:powerline/fonts.gitcdfonts./install.sh配置iTerm2:(iTerm2>Preferences>Profiles>Text>ChangeFont),如下图:如果没有发现红色框的Non... 查看详情

mac终端定制(iterm2+oh-my-zsh+powerline+solarized+agnoster)(代码片段)

...卸载uninstall_oh_my_zshoh-my-zsh安装成功效果图:三、安装Powerline字体库gitclonegit@github.com:powerline/fonts.gitcdfonts./install.sh配置iTerm2:(iTerm2>Preferences>Profiles>Text>ChangeFont),如下图:如果没有发现红色框的Non... 查看详情

mac终端定制(iterm2+oh-my-zsh+powerline+solarized+agnoster)(代码片段)

...卸载uninstall_oh_my_zshoh-my-zsh安装成功效果图:三、安装Powerline字体库gitclonegit@github.com:powerline/fonts.gitcdfonts./install.sh配置iTerm2:(iTerm2>Preferences>Profiles>Text>ChangeFont),如下图:如果没有发现红色框的Non... 查看详情

centos7.3安装zabbix3.x

CentOS7.3安装Zabbix3.X一、配置CentOS7关闭selinux     #setenforce0临时关闭需要关闭selinux,一定要关闭这个,开启selinux会引起一连串问题,甚至zabbix的discovery功能也不能正常使用#sed-i"s/SELINUX=enforcing/SELINUX=disabled/g"/et 查看详情

centos7.3安装最新版lamp环境

 本篇文章讲解的是centos7.3环境中安装Apache2.4+MySQL5.7+PHP7.1.8 一.Apache 1.查看httpd包是否可用yumlist|grephttpd 2.安装Apacheyuminstallhttpd 3.配置servernamevi/etc/httpd/conf/httpd.conf修改这行:ServerName 查看详情