forked from bbockelm/RHEL5-chroot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
96 lines (60 loc) · 2.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
This repository provides "chroot-tool", a simple tool designed for quick
and easy chroots.
We plan on using this to provide a RHEL5-compatibility environment for
batch system jobs which require RHEL5, but the local site provides a RHEL6
host environment.
The tool provides basic functionality using "yum", but a complete chroot will
need additional supplements (such as bind mounts). We include example puppet
manifests for both Condor and PBS sites.
USE:
To create an empty chroot with no installed files:
chroot-tool create
To install the base RPMs for RHEL5:
./chroot-tool install python rpm yum python gcc make autoconf zlib-devel bzip2-devel openssl-devel ncurses-devel wget sqlite sqlite-devel
setup the resolv.conf :
cp /etc/resolv.conf /opt/vhost/chroot/sl5-v1/etc/
Install mezzanine :
git clone [email protected]:lawrencecreates/mezzanine.git
mv mezzanine/ /opt/vhost/chroot/sl5-v1/root/
That list is customized for our site; adjust for yours.
To remove all world-writable directories and setuid binaries from the chroot,
use the "secure" subcommand:
chroot-tool secure
To test out the resulting chroot, do the following:
chroot /chroot/sl5 bash
BUILDING:
chroot-tool is a self-contained python script. However, to build it into an
RPM, do the following:
./build_rpm
CONFIGURAITON:
There are basically two configuration decisions you must make.
First, decide where to build the chroot in the filesystem; this is kept in
/etc/chroot-tool/tool.cfg; the default is:
root_dir = /chroot/sl5-v1
Second, you will need to decide what yum repositories to enable for the chroot
(these are necessarily different from the system ones!). You can configure
yum by editing the file /etc/chroot-tool/yum.conf
http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
./configure --prefix=/usr/local
Inside the chroot :
19 wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
20 tar xzf Python-2.7.5.tgz
21 cd Python-2.7.5
24 ./configure --prefix=/usr/local
25 make && make altinstall
27 cd ..
30 wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
31 tar xf distribute-0.6.27.tar.gz
32 cd distribute-0.6.27
33 python2.7 setup.py install
34 /usr/local/bin/easy_install-2.7 virtualenv
40 virtualenv VENV
43 . ./activate
46 cd ..
48 cd ..
50 git clone [email protected]:lawrencecreates/mezzanine.git
51 cd mezzanine/
54 python setup.py install
58 mezzanine-project lawrence_creates
59 cd lawrence_creates/
65 python manage.py createdb --noinput