Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
How to remove packages from distro?
View previous topic :: View next topic  
Author Message
tmo
Junior Member


Joined: 18 Feb 2011
Posts: 4

PostPosted: Fri Feb 18, 2011 1:27 pm    Post subject: How to remove packages from distro? Reply with quote

I've been using SMS for some time now and find it a good solution for my server needs.
Now I need to set up a server booting from USB entirely to RAM to be able to completely remove a USB stick.
There's small number of services I actually need and hence would like to remove all the others to release as much RAM as I can.

So here's the question:
How to remove some packages/services/unnecessery files from a ready distribution and not damage a thing?
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Fri Feb 18, 2011 5:32 pm    Post subject: Reply with quote

If you want to optimize your server for consuming less RAM and don't care about space you can look at
http://sms.it-ccs.com/forum/viewtopic.php?t=317

If you want to remove packages you need to remaster SMS a.k.a Install/edit/create a liveCD.
What services you want, to disable remove?

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
tmo
Junior Member


Joined: 18 Feb 2011
Posts: 4

PostPosted: Sat Feb 19, 2011 9:41 pm    Post subject: Reply with quote

I know how to disable services and how to remaster the iso/tar image. What I I want is to delete unnecessary files from the distro to save as much RAM as possible.
The only services I need are dnsmasq and openldap, and other soft needed is pptp client and iptables.
In Slax you can simply compose your customized distributions simply choosing among lzm modules. In SMS these modules consist of entire directory structure and one has to know which files to remove.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sat Feb 19, 2011 11:24 pm    Post subject: Reply with quote

Well there is no easy way of doing that.
You need to install from SMS.Native.CD and remaster e.g.
mount /dev/sr0 /mnt/cdrom
mkdir /tmp/customsms
installpkg -root /tmp/customsms /mnt/cdrom/slackware/a/*.txz
and use linux-live-scripts for newer kernel.

You will need at list slackawe/a series plus
openldap, dnsmasq, iptables, ppp glibc, glibc-zoneinfo, glibc-profile, libprelude, linux-pam, openssl, gnutls , libcrypt, cyrus-sasl, db44, db46, libtool, cryptsetup, zlib, libgcrypt, libgpg-error, libidn, libpcap, libnl, dhcpcd, network-scripts and what else you want or complain.

You can of course use lzm2dir as an alternative and remove files for not totally remaster SMS.

a tip is to use ldd .e.g
Code:
root@sms:~# ldd /usr/libexec/slapd
        linux-gate.so.1 =>  (0xffffe000)
        libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb77c9000)
        liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb77bd000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xb77b9000)
        libdb-4.6.so => /lib/libdb-4.6.so (0xb7688000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb766e000)
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7657000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7653000)
        libpam.so.0 => /lib/libpam.so.0 (0xb7645000)
        libssl.so.0 => /lib/libssl.so.0 (0xb75fd000)
        libcrypto.so.0 => /lib/libcrypto.so.0 (0xb74b7000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7484000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb746c000)
        libc.so.6 => /lib/libc.so.6 (0xb7309000)
        /lib/ld-linux.so.2 (0xb782e000)
        libprelude.so.2 => /usr/lib/libprelude.so.2 (0xb71dd000)
        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb7136000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7121000)
        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0xb70ad000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xb70a9000)
        libltdl.so.7 => /usr/lib/libltdl.so.7 (0xb70a1000)


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
tmo
Junior Member


Joined: 18 Feb 2011
Posts: 4

PostPosted: Mon Feb 21, 2011 12:09 pm    Post subject: Reply with quote

If I install SMS from SMS.Native.CD on a hard drive, doesn't it mean that the entire distribution will be installed with all software provided?
You adviced how to add packages to an exisiting system, not how to remove something from it...
Or maybe I dont' get something. Could you write how to create an empty system from SMS.Native.CD (to start adding only needed packages)?
I assume all Slackware repos should be present inside ISO image, is that right?
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon Feb 21, 2011 12:19 pm    Post subject: Reply with quote

To install a package
installpkg package.txz
To remove a package
removepkg package.txz
To upgrade a package
upgradepkg package.txz

The minimal SMS system need slackware/a series.
Boot from SMS.Native.CD and when ask your for series choose only a and deselect the others with space.
and choose menu mode NOT full mode.
Look at video tutorial for example, just ignore lvm instructions.
http://sms.it-ccs.com/forum/viewtopic.php?t=436

Once you boot at first time you might get errors from faxgetty so you need to edit /etc/inittab and comment dialup line for faxgetty.
You can do it after installation before reboot for first time, just do
"sed -e 's/d1:12345:respawn:/#d1:12345:respawn:/g' -i /mnt/etc/inittab"

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional