Host OS:
Sybase Patches:
Install LXC and the bridge-utils to support a network bridge:
|
Create the network bridge br0:
|
Edit interfaces:
replace:
auto eth0
|
with:
# LXC bridge
|
Restart networking:
service networking restart |
Create lxc-default-sybase Apparmor profile:
cd /etc/apparmor .d /lxc
|
Edit lxc-default-sybase:
replace:
profile lxc-container-default flags=(attach_disconnected,mediate_deleted) { |
with:
profile lxc-container-default-sybase flags=(attach_disconnected,mediate_deleted) { |
replace/add only if using you’re using LXC version LOWER than 0.7.5-3ubuntu60 – see LXC bug 1021411:
deny @{PROC}
/sys/kernel/
** wklx,
with:
deny @{PROC}
/sys/kernel/
(^shm)** wklx,
Update the kernel with the new lxc-default-sybase profile
apparmor_parser -r /etc/apparmor .d /lxc-containers |
Replace /etc/lxc/lxc.conf with:
lxc.network. type =veth
|
Assuming that volume group VG02 exists, let’s create the container with the name of “sybase”, and a logical volume of 100G using the xfs file system:
lxc-create -n sybase -t ubuntu -B lvm --lvname sybase --vgname VG02 --fstype xfs --fssize 100G |
Before we start the ‘sybase’ container, we need to update the container configuration to use the lxc-container-default-sybase container:
cd /var/lib/lxc/sybase |
Edit config:
replace:
#lxc.aa_profile = unconfined |
with:
lxc.aa_profile = lxc-container-default-sybase |
We’re ready to start the container in console mode (to start it as a daemon add -d):
lxc-start -n sybase |
The default login credentials are ubuntu / ubuntu
Let’s switch to root so we can install the packages to support Sybase ASE 15.7:
sudo su - root |
Enable up to 512MB of shared memory:
echo "kernel.shmmax = 536870912" >> /etc/sysctl .conf
|
Install the packages (nmon is a great os monitoring tool but if you don’t want it, don’t include it):
dpkg --add-architecture i386
|
If you want to install PPA repositories:
apt-get install python-software-properties |
We need to set up the locale:
locale-gen en_US.UTF-8
|
Copy the sybase software to your new Linux Container and extract it into a temporary directory.
Because Ubuntu seems to think that gzip can uncompress files compressed with the ‘compress’ command (it really can’t btw), you need to alias the uncompress with /usr/bin/uncompress.real:
alias uncompress= '/usr/bin/uncompress.real' |
From here, you would install and configure Sybase ASE 15.x as you normally would.
Determine ip address for eth0:
ifconfig | grep "inet addr" |
In my case, the eth0 ip address is 192.168.0.115. You will either want to reserve this address with your DHCP server or setup a static ip in /etc/interfaces.
Assuming we want to keep the 192.168.0.115 address for this container, we need to modify the /etc/hosts file:
Replace:
127.0.0.1 localhost sybase |
with:
127.0.0.1 localhost
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |