Editing
Installation on Slackware
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Mkjail script == Create the following /usr/local/bin/mkjail script: <pre> #!/bin/bash # # mkjail v0.2: chroot jail maker (slack 10.1.0) # feedback: rhatto at riseup.net | GPL # # adjust this to where your things live PACKAGES="/storage/vserver/slack/" DEVICES="/storage/vserver/devices.tar.gz" SCRIPTS="/storage/vserver/etc/" GPGKEY="/storage/vserver/slack/GPG-KEY" SKEL="/storage/vserver/skel.conf" if (($# != 1)); then echo "usage: $0 <server-name>" exit 1 fi server=$1 mkdir /vservers/$server echo "instaling packages..." cd $PACKAGES for dir in a ap n extra contrib; do cd $dir; installpkg -root /vservers/$server *tgz; cd .. done echo "creating /etc/ and copying init scripts" rsync -Cav $SCRIPTS/ /vservers/$server/etc/ cp /etc/resolv.conf /vservers/$server/etc/ cp /etc/localtime /vservers/$server/etc/ echo /dev/hdv1 / ext2 defaults 1 1 > /vservers/$server/etc/fstab echo /dev/hdv1 / ext2 rw 0 0 > /vservers/$server/etc/mtab echo "creating devices and dependencies" cd /vservers/$server/ tar zxvf $DEVICES chroot /vservers/$server/ sbin/ldconfig echo "creating /etc/vservers/$server.conf" cp $SKEL /etc/vservers/$server.conf echo "importing slack gpg pubkey" mkdir /vservers/$server/root/.gnupg gpg --homedir /vservers/$server/root/.gnupg --import $GPGKEY # todo: add rebootmgr echo "done; now edit /etc/vservers/$server.conf" echo "then, set iptables rules and start $server vserver" echo "dont forget to change root's password" </pre> The trick is that you can ask installpkg to install a tgz in a rootdir other than /.
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information