Skip to content

Instantly share code, notes, and snippets.

@itiut
Last active August 29, 2015 14:01
Show Gist options
  • Save itiut/293a22550192313db281 to your computer and use it in GitHub Desktop.
Save itiut/293a22550192313db281 to your computer and use it in GitHub Desktop.
kugenuma51の変更管理

development-tools

$ sudo yum groupinstall development-tools

cmake, ncurses

$ sudo yum install cmake ncurses-devel

mkfs.ext4

$ sudo yum install e4fsprogs

tmux

$ cd $KUGENUMA51_HOME/src
$ wget http://pkgs.repoforge.org/tmux/tmux-1.6-1.el5.rf.x86_64.rpm
$ sudo rpm -Uvh tmux-1.6-1.el5.rf.x86_64.rpm

git

$ cd $KUGENUMA51_HOME/src
$ wget https://git-core.googlecode.com/files/git-1.9.0.tar.gz
$ tar xvf git-1.9.0.tar.gz
$ cd git-1.9.0
$ ./configure --prefix=/usr/local
$ make prefix=/usr/local
$ sudo make prefix=/usr/local install

mkfs.xfs

$ sudo yum install xfsprogs

ntpd

$ sudo yum install ntp
$ sudo su -
# chkconfig ntpd on
# service ntpd start

ag

$ sudo yum install pcre-devel xz-devel
$ cd $KUGENUMA51_HOME/src
$ git clone git://github.com/ggreer/the_silver_searcher.git
$ cd the_silver_searcher
$ ./build.sh
$ sudo make install

sysctl without password

$ sudo su -
# visudo
+ tanikawa ALL=(ALL) NOPASSWD: /sbin/sysctl

Run MySQL as a service

$ sudo cp $KUGENUMA51_HOME/opt/mysql/support-files/mysql.server /etc/init.d/

Add following to /etc/my.cnf

+ user=tanikawa

To start/stop MySQL:

$ /sbin/service mysql.server start
$ /sbin/service mysql.server stop

sar

$ sudo yum install sysstat

MegaCli

$ cd $KUGENUMA51_HOME/src
$ wget http://www.lsi.com/sep/Documents/oracle/files/Linux_MegaCLI-8.07.07.zip
$ unzip Linux_MegaCLI-8.07.07.zip
$ sudo yum localinstall MegaCli-8.07.07-1.noarch.rpm --nogpgcheck
$ sudo ln -s /opt/MegaRAID/MegaCli/MegaCli64 /sbin/MegaCli

pidstat

$ sudo yum erase sysstat
$ cd $KUGENUMA51_HOME/src
$ wget http://pagesperso-orange.fr/sebastien.godard/sysstat-10.2.1.tar.bz2
$ tar xf sysstat-10.2.1.tar.bz2 
$ cd sysstat-10.2.1
$ ./configure
$ make
$ sudo make install

cmake

$ sudo yum erase cmake
$ cd $KUGENUMA51_HOME/src
$ wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz
$ tar xf cmake-2.8.12.2.tar.gz
$ cd cmake-2.8.12.2
$ ./bootstrap
$ make
$ sudo make install

g++-4.7

$ cd /etc/yum.repos.d/
$ sudo wget http://people.centos.org/tru/devtools/devtools.repo
$ sudo yum --enablerepo=testing-devtools-5 install devtoolset-1.0

Add following to ~/.bashrc

export PATH=/opt/centos/devtoolset-1.0/root/usr/bin:$PATH

kernel-lt

$ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-5-5.el5.elrepo.noarch.rpm
$ sudo yum --enablerepo=elrepo-kernel install kernel-lt
$ sudo vi /etc/grub.conf
- default=1
+ default=0
$ sudo reboot

But reverted /etc/grub.conf later.

to build OProfile

$ sudo yum install binutils-devel unifdef

to run OProfile

vmlinux is required.

$ sudo yum --enablerepo=base-debuginfo install kernel-debuginfo
$ sudo opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.18-400.1.1.el5.centos.plus/vmlinux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment