Kann mir jemand erklären wie ich beim Aufbau einer Change Root Umgebung mit LAMPP vorgehen muss ?
Mfg
SnakeCoder
cd /opt/lampp
cp /bin/sh /bin/cat /bin/netstat /bin/egrep bin
cp /lib/libreadline.so.4 /lib/libcrypt.so.1 /lib/libhistory.so.4 lib
cp /lib/libncurses.so.5 /lib/libdl.so.2 /lib/libc.so.6 lib
cp /lib/libnsl.so.1 /lib/ld-linux.so.2 /lib/libm.so.6 lib
cp /lib/libresolv.so.2 /lib/libpthread.so.0 /lib/libutil.so.1 lib
mkdir opt
ln -s .. opt/lampp
mkdir dev
mknod dev/null c 1 3
cd /opt/lampp
ln -s .. opt/lampp
mkdir -p usr/bin usr/lib lib etc tmp dev
ln -s usr/bin bin
chmod 777 tmp
chmod +t tmp
mknod -m 666 dev/null c 1 3 (mknod dev/null c 1 3)
mkdir -p usr/share/zoneinfo
cp -pi /usr/share/zoneinfo/MET usr/share/zoneinfo/
cd etc
ln -s ../usr/share/zoneinfo/MET localtime
cd ..
set | grep LANG
LANG=en_US
mkdir /opt/lamp/usr/share/locale
cp -a /usr/share/locale/en_US /opt/lamp/usr/share/locale/
cp -pi /lib/libtermcap.so.2 /lib/ld-linux.so.2 /lib/libc.so.6 lib/
cp -pi /bin/ls /bin/sh /bin/cat /bin/netstat /bin/egrep bin/
chroot /opt/lampp /bin/ls -l /
rm bin/ls
touch etc/passwd etc/group etc/shadow
chmod 400 etc/shadow
echo 'www:x:888:888:Web Account:/webhome:/usr/bin/False' > etc/passwd
echo 'www:x:888:' > etc/group
echo 'www:*:10882:-1:99999:-1:-1:-1:134537804' > etc/shadow
echo 'int main(int argc, char *argv[]) { return(1); }' > /tmp/False.c
cc -o /www/usr/bin/False /tmp/False.c
chmod 111 usr/bin/*
cp -pi /lib/libnss_files.so.2 lib/
cp -pi /lib/libnss_dns.so.2 lib/
cp -pi /lib/libreadline.so.4 lib/
cp -pi /lib/libcrypt.so.1 lib/
cp -pi /lib/libhistory.so.4 lib/
cp -pi /lib/libncurses.so.5 lib/
cp -pi /lib/libdl.so.2 lib/
cp -pi /lib/libc.so.6 lib/
cp -pi /lib/libnsl.so.1 lib/
cp -pi /lib/ld-linux.so.2 lib/
cp -pi /lib/libm.so.6 lib/
cp -pi /lib/libresolv.so.2 lib/
cp -pi /lib/libpthread.so.0 lib/
cp -pi /lib/libutil.so.1 lib/
# ---- Contents of etc/nsswitch.conf ----#
passwd: files
shadow: files
group: files
hosts: files dns
# ---- Contents of etc/resolv.conf ----#
domain mynet.home
## use the IP address of your naming server
## if bind is not installed on your web server
nameserver 10.0.5.2
## use this if your web server is a (caching) name server
#ameserver 127.0.0.1
# ---- Contents of etc/hosts ----#
127.0.0.1 localhost loopback mynet
10.0.5.88 web.mynet.home web www
mynet:~ # chroot /opt/lampp ./lampp startapache
XAMPP: Starting Apache...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Your /etc/hosts is not okay. I will fix it.
XAMPP: See also http://www.apachefriends.org/faq-lampp-en.html#failed
XAMPP: Next try...
XAMPP: Starting Apache...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Your /etc/hosts is not okay. I will fix it.
XAMPP: See also http://www.apachefriends.org/faq-lampp-en.html#failed
XAMPP: Next try...
XAMPP: Starting Apache...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Your /etc/hosts is not okay. I will fix it.
XAMPP: See also http://www.apachefriends.org/faq-lampp-en.html#failed
XAMPP: Next try...
XAMPP: Starting Apache...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Your /etc/hosts is not okay. I will fix it.
XAMPP: See also http://www.apachefriends.org/faq-lampp-en.html#failed
XAMPP: Next try...
XAMPP: Starting Apache...
XAMPP: Error 1! Couldn't start Apache!
mynet:/opt/chroot # chroot /opt/chroot hostname
mynet:/opt/chroot # chroot /opt/chroot /opt/lampp/lampp start
hostname
Starting XAMPP for Linux 1.4.4...
hostname
XAMPP: Starting Apache with SSL...
XAMPP: Error 127! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Your /etc/hosts is not okay. I will fix it.
XAMPP: See also http://www.apachefriends.org/faq-lampp-en.html#failed
XAMPP: Next try...
hostname
Users browsing this forum: No registered users and 5 guests