LoginSignup
1
0

More than 5 years have passed since last update.

RHEL7 での GNU GLOBAL のインストール

Last updated at Posted at 2018-09-06

はじめに

ソースコードをブラウザで参照するため、以下で紹介されている GNU GLOBAL を使ってみた。
※エディタではなく、ブラウザで参照するつもりなので、エディタ関連はスルー。

事前準備

やってないと後述の make が失敗する。

$ yum -y install ncurses-devel

インストール

$ cd /usr/local/src
$ wget http://tamacom.com/global/global-6.6.2.tar.gz
$ tar xvfz global-6.6.2.tar.gz
$ cd global-6.6.2/
$ ./configure
$ make
$ make install

HTML の作成

とりあえず ruby-2.2.5.tar.gz でやってみた。

$ wget https://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.5.tar.gz
$ tar zxvf ruby-2.2.5.tar.gz
$ cd ruby-2.2.5/
$ gtags -v
$ htags -safnow

上記の ruby-2.2.5 を DocumentRoot (/var/www/html) に移動し以下を設定した後に、apache を再起動。

$ vi /etc/httpd/conf/httpd.conf
::
    ScriptAlias /ruby-2.2.5/HTML/cgi-bin "/var/www/html/ruby-2.2.5/HTML/cgi-bin/"

</IfModule>

<Directory "/var/www/html/ruby-2.2.5/HTML/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
</Directory>
::

終わったら http://localhost/ruby-2.2.5/HTML/ にアクセス。

以下は kernel の src.rpm を使った場合。あとは DocumentRoot (/var/www/html) に移動し、httpd.conf 編集すること。

$ yum -y install rpm-build
$ yumdownloader --source kernel
$ subscription-manager repos --enable=rhel-7-server-optional-rpms 
$ yum-builddep -y  kernel-3.10.0-862.11.6.el7.src.rpm
$ rpm -ivh kernel-3.10.0-862.11.6.el7.src.rpm
$ cd /root/rpmbuild/SPECS
$ rpmbuild -bp kernel.spec
$ cd /root/rpmbuild/BUILD/kernel-3.10.0-862.11.6.el7
$ gtags -v
$ htags -safnow

複数のソースを参照する場合などを考えた自動化などは要検討。

おまけ

RHEL のカーネルのソースについては以下のページでも確認可能。

Red Hat Code Browser
https://access.redhat.com/labs/psb/

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0