エックスサーバーにVimをインストールする

大容量&低価格、安定したレスポンスで評価の高いレンタルサーバー『エックスサーバー』。
しかし我々技術者にとっては、容量がいくつとかMySQLがいくつとか言うスペックよりも、一番重要なのは
『SSHが使えるかどうか』
ですよね。

で、エックスサーバーはSSH接続は可能なんですが、エディタがViしか入っていないので不便です。syntaxがないとコードを書いてても不安でしょうがないので、Vimを入れてみました。
レンタルサーバーのため、当然ローカルユーザーなのでYumなどのパッケージ管理は使えないので、ソースからインストールする必要があります。

Vimをソースからインストール

まずローカルディレクトリに一時ディレクトリを作って、そこにソースをDLします。

$ cd ~
$ makedir tmp
$ cd ./tmp
$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
$ tar jxvf ./vim-7.3.tar.bz2

vimは現在7.4が出てるんですが、Patchが出てなかったので7.3にしました。
解凍してできたvim73の中に入ってPatchをDLして当てます。

$ cd ./vim73
$ mkdir patches
$ cd ./patches
$ curl -O ‘ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.[001-502]’
$ cd ..
$ cat patches/7.3.* | patch -p0

次にconfigureしてmakeでインストール…のはずだったんですが。

$ ./configure –enable-multibyte –enable-xim –enable-fontset –with-features=big –prefix=$HOME

ここでエラーが出て叱られます。

no terminal library found
checking for tgetent()… configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with –with-tlib.

「ターミナルライブラリーがない、例えばncurse的な。それか–with-tlibオプションでターミナルを指定せよ」
とのことなので、じゃあncurseを入れようか…と思うも

yum install ncurse-devel

はもちろん使えません。(root権限がある普通のサーバならこれでOKです)
rpmパッケージからのインストール

ももちろん不可です。

–with-tlibオプションでncursesを指定してみたらどうかな?と一応試してみましたが

$ ./configure –enable-multibyte –enable-xim –enable-fontset –with-features=big –with-tlib=ncurses –prefix=$HOME

checking whether stack_t has an ss_base field… no
checking –with-tlib argument… ncurses
checking for linking with ncurses library… configure: error: FAILED

無いものは無いということでした。

というわけでncursesもソースを探してきてインストールします。

ncursesをインストール

$ cd ~/tmp
$ wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz
$ tar zxfv ncurses-5.7.tar.gz
$ cd ncurses-5.7
$ configure –prefix=$HOME
$ make
$ make install

インストール完了。
これでvimインストールの準備が整ったので、再度configureに挑戦します。

今度こそVimをインストール

$ cd ~/tmp/vim73
$ ./configure –enable-multibyte –enable-xim –enable-fontset –with-features=big –prefix=$HOME
$ make
$ make install

インストールが終わりました。
念の為「vim」と打ってみると

$ vim
version 7.3.502
by Bram Moolenaar 他.
Vim はオープンソースであり自由に配布可能です

ウガンダの恵まれない子供たちに援助を!
詳細な情報は :help iccf<Enter>

終了するには :q<Enter>
オンラインヘルプは :help<Enter> か <F1>
バージョン情報は :help version7<Enter>

インストール成功です。

あとは.bashrcにvimのエイリアスを追加すれば完了です。

# User specific aliases and functions
 alias ls='ls -G'
 alias vi='vim'

22 thoughts on “エックスサーバーにVimをインストールする

  1. ピンバック: 20140308のまとめ | Untitled

  2. ピンバック: レンタルサーバー借りてるけど、root権限がない!それでもVim、Gitを使うには | まいうーごはん

  3. 通りすがり

    とても参考になりました!が残念。
    ncursesのインストールまでうまく行ったように見えますが、結局VIMのconfigureで
    「ncursesとかインストールしてみてよ!」
    って同じエラーが出てしまい、挫折。
    基本知識がないので対処できませんでした。う〜ん

    返信
  4. 通りすがり

    失敬、
    –with-local-dir=$HOMEの追加で出来ました!

    ./configure –enable-multibyte –enable-xim –enable-fontset –with-features=big –prefix=$HOME –with-local-dir=$HOME

    返信
    1. dacelo 投稿作成者

      貴重なフィードバックありがとうございます!
      きっと検索でやってきた同じように悩める人がこれで救われると思います。

      返信
  5. Lolityepick7022

    XEvil-スレッド数の制限と最高の精度なしで、ソリューションの数に制限のない最高のcaptchaソルバーツール!
    XEvil5.0は、画像captchaの12.000以上の種類をサポートし、ReCaptcha、Google captcha、Yandex captcha、Microsoft captcha、Steam captcha、SolveMedia、ReCaptcha-2と(はい!!!)ReCaptcha-3あまりにも。

    1.) 柔軟に: 標準でないcaptchaのロジックを調整できます
    2.) イージー: XEvilを起動し、1つのボタンを押すだけで、アプリケーションまたはスクリプトからcaptchaを自動的に受け入れます
    3.) 速い: 0,01単純なcaptchaのための秒,約20..ReCaptchaのための40秒-2、および約5。..8秒でリキャプチャ-3

    利用できるXEvil任意のSEO/住友ソフトウェア、パーザのパスワードチェッカーは、分析用、又はその他のカスタムスクリプト:
    XEvilは、よく知られているアンチcaptchaサービスのほとんどをサポート API: 2Captcha, RuCaptcha, AntiGate (Anti-Captcha), DeathByCaptcha, etc.

    興味があるか? ちょうどより多くの情報のためのGoogle”XEvil”で捜して下さい
    あなたはこれを読んで-それは動作します! 🙂

    よろしく, Lolitaepick9106

    XEvil.Net

    返信
  6. Lolitaepick6436

    XEvil-スレッド数の制限と最高の精度なしで、ソリューションの数に制限のない最高のcaptchaソルバーツール!
    XEvil5.0は、画像captchaの12.000以上の種類をサポートし、ReCaptcha、Google captcha、Yandex captcha、Microsoft captcha、Steam captcha、SolveMedia、ReCaptcha-2と(はい!!!)ReCaptcha-3あまりにも。

    1.) 柔軟に: 標準でないcaptchaのロジックを調整できます
    2.) イージー: XEvilを起動し、1つのボタンを押すだけで、アプリケーションまたはスクリプトからcaptchaを自動的に受け入れます
    3.) 速い: 0,01単純なcaptchaのための秒,約20..ReCaptchaのための40秒-2、および約5。..8秒でリキャプチャ-3

    利用できるXEvil任意のSEO/住友ソフトウェア、パーザのパスワードチェッカーは、分析用、又はその他のカスタムスクリプト:
    XEvilは、よく知られているアンチcaptchaサービスのほとんどをサポート API: 2Captcha, RuCaptcha, AntiGate.com (Anti-Captcha), DeathByCaptcha, etc.

    興味があるか? YouTubeで”XEvil”を検索するだけです。
    あなたはこれを読んで-それは動作します! ;)))

    よろしく, Lolitaepick6671

    XEvil.Net

    返信
  7. Loliteepick5389

    XEvil-スレッド数の制限と最高の精度なしで、ソリューションの数に制限のない最高のcaptchaソルバーツール!
    XEvil5.0は、画像captchaの12.000以上の種類をサポートし、ReCaptcha、Google captcha、Yandex captcha、Microsoft captcha、Steam captcha、SolveMedia、ReCaptcha-2と(はい!!!)ReCaptcha-3あまりにも。

    1.) 柔軟に: 標準でないcaptchaのロジックを調整できます
    2.) イージー: XEvilを起動し、1つのボタンを押すだけで、アプリケーションまたはスクリプトからcaptchaを自動的に受け入れます
    3.) 速い: 0,01単純なcaptchaのための秒,約20..ReCaptchaのための40秒-2、および約5。..8秒でリキャプチャ-3

    利用できるXEvil任意のSEO/住友ソフトウェア、パーザのパスワードチェッカーは、分析用、又はその他のカスタムスクリプト:
    XEvilは、よく知られているアンチcaptchaサービスのほとんどをサポート API: 2Captcha.com, RuCaptcha, AntiGate.com (Anti-Captcha.com), DeathByCaptcha, etc.

    興味があるか? ちょうどより多くの情報のためのGoogle”XEvil”で捜して下さい
    あなたはこれを読んで-それは動作します! 🙂

    よろしく, Lolitoepick3846

    XEvil.Net

    返信
  8. Lolityepick9368

    XEvil-スレッド数の制限と最高の精度なしで、ソリューションの数に制限のない最高のcaptchaソルバーツール!
    XEvil5.0は、画像captchaの12.000以上の種類をサポートし、ReCaptcha、Google captcha、Yandex captcha、Microsoft captcha、Steam captcha、SolveMedia、ReCaptcha-2と(はい!!!)ReCaptcha-3あまりにも。

    1.) 柔軟に: 標準でないcaptchaのロジックを調整できます
    2.) イージー: XEvilを起動し、1つのボタンを押すだけで、アプリケーションまたはスクリプトからcaptchaを自動的に受け入れます
    3.) 速い: 0,01単純なcaptchaのための秒,約20..ReCaptchaのための40秒-2、および約5。..8秒でリキャプチャ-3

    利用できるXEvil任意のSEO/住友ソフトウェア、パーザのパスワードチェッカーは、分析用、又はその他のカスタムスクリプト:
    XEvilは、よく知られているアンチcaptchaサービスのほとんどをサポート API: 2Captcha, RuCaptcha, AntiGate.com (Anti-Captcha), DeathByCaptcha, etc.

    興味があるか? ちょうどより多くの情報のためのGoogle”XEvil”で捜して下さい
    あなたはこれを読んで-それは動作します! ;)))

    よろしく, Loliteepick6915

    XEvil.Net

    返信
  9. Lolitaepick3335

    XEvil-スレッド数の制限と最高の精度なしで、ソリューションの数に制限のない最高のcaptchaソルバーツール!
    XEvil5.0は、画像captchaの12.000以上の種類をサポートし、ReCaptcha、Google captcha、Yandex captcha、Microsoft captcha、Steam captcha、SolveMedia、ReCaptcha-2と(はい!!!)ReCaptcha-3あまりにも。

    1.) 柔軟に: 標準でないcaptchaのロジックを調整できます
    2.) イージー: XEvilを起動し、1つのボタンを押すだけで、アプリケーションまたはスクリプトからcaptchaを自動的に受け入れます
    3.) 速い: 0,01単純なcaptchaのための秒,約20..ReCaptchaのための40秒-2、および約5。..8秒でリキャプチャ-3

    利用できるXEvil任意のSEO/住友ソフトウェア、パーザのパスワードチェッカーは、分析用、又はその他のカスタムスクリプト:
    XEvilは、よく知られているアンチcaptchaサービスのほとんどをサポート API: 2Captcha.com, RuCaptcha, AntiGate (Anti-Captcha.com), DeathByCaptcha, etc.

    興味があるか? ちょうどより多くの情報のためのGoogle”XEvil”で捜して下さい
    あなたはこれを読んで-それは動作します! 😉

    よろしく, Lolityepick7897

    XEvil.Net

    返信
  10. AlexisBrums

    It’s a great saying, but it’s not something you’d necessarily repeat over the dinner table.
    Another success aphorism comes from Chris Grosser.
    The part in Star Wars where Yoda says, There is do, or do not.
    Napoleon Bonaparte could relate.
    He’s earned that title because he’s authored dozens of aphorisms.
    Not so much.
    Not only that, but you can use aphorisms in your writing to summarize your central theme.
    Too many times to count, right.
    Aphorisms often use metaphors or creative imagery to express ideas.
    Another success aphorism comes from Chris Grosser.
    Keep your friends close, but your enemies closer.
    Let me ask you.
    Sometimes, though.
    They’re easy to remember and pass down through generations because they’re concise.
    Build a storyline around that saying.
    But not today.

    返信
  11. AlexisBrums

    Take this proverb, for example.
    You get up and keep trying.
    Check it out.
    Have you ever felt frustrated when other people didn’t meet your expectations.
    He once stated, If you want a thing done well, do it yourself.
    This quote came from Wales, first appearing in an 1866 publication.
    There must be a method to your madness.
    Now here’s the big question.
    20 Aphorism Examples
    It originally read, Count not they chickens that unhatched be…
    Keep your friends close, but your enemies closer.
    Picture of Benjamin Franklin and a caption that says “Aphorist Extraordinaire”
    Oftentimes, it makes sense to delegate tasks.
    But these days.
    Build a storyline around that saying.
    But one key difference is that for a phrase to be truly aphoristic, it needs to be a short statement.

    返信
  12. AlexisBrums

    We see this in literature all the time.
    Don’t count on things that haven’t happened yet because something unexpected could occur.
    Keep your friends close, but your enemies closer.
    Sandys said, Honestie the best policie, which in modern English is…
    That’s not what you expected, was it.
    Skilled writers use aphorisms to evoke big ideas in a relatable way.
    Your stories can benefit from this method too.
    How many times have you heard one of the following aphorism examples.
    Both sayings highlight the benefits of waking up early.
    Examples of Aphorisms for Success
    Examples of Aphorism in Politics
    This is especially true if the excuse is a lie.
    Want a few more.
    search bar with “what use aphorism.” written
    And then.
    An aphorism is a literary device that uses a short, clever saying to express a general truth.

    返信
  13. AlexisBrums

    Aphorisms often use metaphors or creative imagery to express ideas.
    Don’t count on things that haven’t happened yet because something unexpected could occur.
    It’s one of the most recognized aphoristic statements today.
    He once stated, It is better to be alone than in bad company.
    Want a few more.
    Skilled writers use aphorisms to evoke big ideas in a relatable way.
    There must be a method to your madness.
    Today, I’ll define aphorism and show you how these handy little sayings make your writing more memorable.
    See the difference.
    What does it mean.
    It’s one of the most recognized aphoristic statements today.
    This is especially true if the excuse is a lie.
    He’s earned that title because he’s authored dozens of aphorisms.
    (I say these words to make me glad),
    Aphoristic statements also appear in everyday life, such as daily speeches made by politicians and leaders.
    Are you in.

    返信
  14. AlexisBrums

    Both sayings highlight the benefits of waking up early.
    Fall seven times, stand up eight.
    Thomas Jefferson also mirrored this general idea when he said, I find that the harder I work, the more luck I seem to have.
    This aphorism is short and sweet, but it teaches us a valuable truth.
    The complete quote was, A Jack of all trades and master of none, but oftentimes better than a master of one.
    Today, calling someone a Jack of all trades is usually a jab because it implies that their knowledge is superficial.
    And get this.
    Let’s get started.
    Your wish is my command.
    Another aphorism that’s adapted is, Don’t count your chickens before they hatch.
    Opportunities don’t happen.
    Washington also said, It is better to offer no excuse than a bad one.
    Shifting gears a little, let’s talk about one of the world’s greatest aphorists – Benjamin Franklin.
    Today, calling someone a Jack of all trades is usually a jab because it implies that their knowledge is superficial.
    Give it a try!
    Let’s get started.

    返信
  15. AlexisBrums

    Both sayings highlight the benefits of waking up early.
    So what do you do.
    Check it out.
    Washington also said, It is better to offer no excuse than a bad one.
    It’s easier to do it yourself rather than try to explain it to someone else.
    It originated from Lady Mary Montgomerie Currie’s poem Tout vient a qui sait attendre.
    For example.
    Now here’s the big question.
    Proverbs, on the other hand, can be much longer than aphorisms and adages.
    What does it mean.
    Keep your friends close, but your enemies closer.
    Sandys said, Honestie the best policie, which in modern English is…
    The complete quote was, A Jack of all trades and master of none, but oftentimes better than a master of one.
    The original saying was, Eat an apple on going to bed, and you’ll keep the doctor from earning his bread.
    Your stories can benefit from this method too.
    Truthfully, there aren’t huge differences between the three.

    返信
  16. AlexisBrums

    Do you believe that a penny saved is a penny earned.
    Don’t count on things that haven’t happened yet because something unexpected could occur.
    Take a look.
    This aphorism is short and sweet, but it teaches us a valuable truth.
    Other Common Examples of Aphorisms
    They’re easy to remember and pass down through generations because they’re concise.
    Your stories can benefit from this method too.
    Don’t judge a book by its cover.
    But, the aphorism is short and sweet.
    Fall seven times, stand up eight.
    He played the villain in the movie that famously stated.
    Washington also said, It is better to offer no excuse than a bad one.
    That’s not what you expected, was it.
    It originated from Lady Mary Montgomerie Currie’s poem Tout vient a qui sait attendre.
    From there, you can build your story around it.
    But one key difference is that for a phrase to be truly aphoristic, it needs to be a short statement.

    返信
  17. essay service

    It’s a pity you don’t have a donate button! I’d most certainly donate to this brilliant blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this blog with my Facebook group. Chat soon!

    返信
  18. 1xbet-seychas.ru

    1хбет — востребованная букмекерская компания. Заводите профиль на платформе и получайте бонусы. Сделайте ставку на любимую команду. Оцените высокие коэффициенты.
    1xbet рабочее зеркало

    返信
  19. ocifrovivanie-dokumentov.ru

    Оцифровка архива стоимость — это наше направление. Мы предоставляем услуги сканирования бумаг с использованием технологических инноваций. Сотрудничество с нами — это эффективный способ сделать вашу документацию доступной в электронной форме.

    返信

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です