setup.sh Question

existenz

Verified User
Joined
Jul 18, 2003
Messages
607
Location
/dev/null
Just wondering if anyone agrees with me. I see that you fetch the files from, ftp://ftp.freebsd.org/

The FreeBSD folks I am sure would love it if we used any other server than the main box. Do you think possibly that in the future it would randomly pick a different server and use ftp.freebsd.org as a backup?

Not that big of a issue but just wondering what anyone thoughts would be on that issue?
 
Try this, to use another mirror:

# export PACKAGEROOT="ftp://adress.to.mirror/"
 
That won't fix the problem. I know we could specificy a mirror but how about the setup.sh file selecting from one of a few randomly?

It is not a priority but I think it may be a good idea in the future? Many times ftp.freebsd.org is slowest of all the servers.
 
There is a way to use the /stand/sysinstall interface for it. cPanel does its FreeBSD installation that way, and is the only thing I really liked about it ;) If I'm not mistaken it will look for alternative mirrors if a package cannot be fetched.
 
Last edited:
I would prefer to get to manually select which box on setup instead of a random selection. That way I can pick one close to me that I know is reliable. I have had problems with certain ones in the past.
 
I thought of that idea, but I did't want to make it to much work for John all at once. I could see it working a list of the countries with servers

[1] Argentina
[2] Australia
[3] Austria

Then if we select 1 you get the listing of servers for that country. This would be saved so that anytime in the future a update requires anything for FreeBSD you can get it from the best mirror.

Just a idea...
 
As I mentionded /stand/sysinstall does all that out of the box. You can select the mirror, you can select your media like ftp or cdrom if you like. Sysinstall can be executed with commandline options like:

/stand/sysinstall mediaSetFTP configPackages

Now you will be presented with all available mirrors around the globe.. You can call this from within the setup.sh script. If I find the time I'll try to embed this into setup.sh and if it works I'll post it here for comments..

Rick

(If Mark or John already looked at this please let me know)
 
Last edited:
Okay this is what I came up with so far. Just tried to figure out how sysinstall handles config files:

Commandline:

/stand/sysinstall configFile="./dasetup.cfg" loadConfig

The contents of "dasetup.cfg":

debug=yes
mediaSetFTP

dists=ports compat22 compat3x compat4x
distSetCustom

#package list
package=cvsup-without-gui
packageAdd

package=perl
packageAdd

package=wget
packageAdd

package=bison
packageAdd

package=flex
packageAdd

package=gd
packageAdd

package=webalizer
packageAdd

#package=bind-utils
#packageAdd

package=bind
packageAdd

package=patch
packageAdd

package=openssl
packageAdd

#package=openssl-devel
#packageAdd

package=krb5
packageAdd

command=fetch www.directadmin.com/setup.sh
system

*end of file*

This will ask you for the nearest mirror, give you the option to configure your network settings. Then installs the port collection, some backwards compatibilty stuff for frontpage and then the packages. Last line is to demonstrate you can call external commands.

Use this on test machines only ofcourse !!

I'll try to see if I can make the port system up to date using cvsup so we have al the latest patched versions..
 
Last edited:
Ok, I have a test file for guys who are interested in testing. What it does:

- Ask the user for nearest location.
- Installing Perl, Ports, cvsup and fastest_cvsup collection
- CVSup of the ports tree will be done using fastest_cvsup.

It wil ping several cvs mirrors around the globe and picks the fastest to download from!

The rest of the packages will be added and then exits.

Note: DA is not installed at this point. It is just a proof of concept for base installation.

The file is here: http://www.paranoia.nl/setup2.tar

Unpack it and chmod 755 the shell scripts and do ./setup2.sh

Use it on a test server though!
 
Last edited:
package=perl

should probably be

package=perl5.8

Also some of the other packages aren't really needed by DA from what I see.

Here is a list of things installed after I updated the box and installed DA.

bison-1.875 A parser generator from FSF, (mostly) compatible with Yacc
bsdpan-mod_perl-1.27 Apache - Perl interface to the Apache server API
cvsup-without-gui-16.1h General network file distribution system optimized for CVS
exim-4.24-1 exim 4.24 mail server
expat-1.95.6_1 XML 1.0 parser written in C
freetype2-2.1.4_1 A free and portable TrueType font rendering engine
gd-1.8.4_6 A graphics library for fast image creation
gettext-0.11.5_1 GNU gettext package
jpeg-6b_1 IJG's jpeg compression utilities
libiconv-1.8_2 A character set conversion library
linux_base-7.1_4 The base set of packages needed in Linux mode
m4-1.4_1 GNU m4
nano-1.2.1 Nano's ANOther editor, an enhanced free Pico Clone
nmap-3.27 Port scanning utility for large networks
perl-5.8.0_6 Practical Extraction and Report Language
png-1.2.5_2 Library for manipulating PNG images
proftpd-1.2.9 Highly configurable ftp daemon
vm-pop3d-1.1.6_1 A virtual POP3 server
webalizer-2.1.10_1 A web server log file analysis program
wget-1.8.2_3 Retrieve files from the Net via HTTP and FTP
 
I took the packages from the original setup.sh script so I guess they are needed. Keep in mind that this is the base install from FreeBSD. After this DA scripts and customized packages like Exim, Apache etc wil be retrieved from the DA website.

Perl issue is a strange one it will not fetch the latest from the site even if I state perl5.8 in the script. I'll try to figure it out.
 
I'm assuming you have a box with a fresh install of DA. Can you do a pkg_info and post the results here? Maybe my install missed some stuff.
 
Sure, here it is (I know, perl is not 5.8) :

afio-2.4.7 Archiver & backup program w/ builtin compression
bind-8.3.4 The Berkeley Internet Name Daemon, an implementation of DNS
bison-1.75 A parser generator from FSF, (mostly) compatible with Yacc
buffer-1.17.1 Buffer sporadic I/O for faster tape and pipe throughput
cvsup-without-gui-16.1h General network file distribution system optimized for CVS
expat-1.95.6_1 XML 1.0 parser written in C
fastest_cvsup-0.2.8 Finds fastest CVSup server
flexbackup-1.0.3 Perl-based flexible tape backup system that uses dump/afio/
freetype2-2.1.4_1 A free and portable TrueType font rendering engine
gd-1.8.4_6 A graphics library for fast image creation
gettext-0.11.5_1 GNU gettext package
jpeg-6b_1 IJG's jpeg compression utilities
krb5-1.2.8_1 An authentication system developed at MIT, successor to Ker
libiconv-1.8_2 A character set conversion library
m4-1.4_1 GNU m4
openssl-0.9.7b_1 SSL and crypto library
p5-Time-HiRes-1.46,1 A perl5 module implementing High resolution time, sleep, an
patch-2.5.4 GNU patch utility
perl-5.6.1_13 Practical Extraction and Report Language
png-1.2.5_2 Library for manipulating PNG images
webalizer-2.1.10_1 A web server log file analysis program
wget+ipv6-1.7_3 Retrieve files from the Net via HTTP and FTP with IPv6 capa

This was done on a clean FBSD 5.1-Release. No ports installed, no packages, just minimal OS.

After this there should be a cleanup of ports that are no longer needed. Like fastest_cvsup etc..
 
Last edited:
Your list seems to be allot different then mine. John any word here on what should show after a DA install?


With things list fastest-cvsup, you sure you ran that on a clean install of FBSD, or did you run your script you have for download first?
 
Last edited:
As I mentioned before this is after running the BASE install. DA specific (customized) packages are not installed yet. The original question was if there was a way to select the nearest mirror for installation (base install) that is what this script does. No more no less ;)
 
Ok that explains the differences. My question was wanting to get a pkg_info on a server other then mine that had DA freshly installed and nothing really else done to it. I assumed that was what your list was :)

But yes this is getting a little off topic. I just throught it weird that you say setup.h adds packages that my server does not have after DA install.

I'll move this convo to
http://www.directadmin.com/forum/showthread.php?threadid=1746
and let this one get back on topic :)
 
Alright.. Sysinstall is a little picky when it comes to installing specific versions of packages. If you define perl it wil install 5.6. If you want 5.8 you have to say perl5.8.0. This is a bit odd since installing it manually on the commandline perl5.8 will do just fine..

Keep in mind that FBSD 5.x has moved perl from the base install. After the installation script you will see 2 perl versions 5.6 and 5.8. We will tell the system to use the latter by the command use.perl port during installation.

Is it an idea to install the rest of the packages from the ports? These are more updated and patched after the cvs. Though it takes longer to finish an installation.

Feedback?
 
Last edited:
Rick,

I will test this on our beta box at the start of the week. I will do a fresh base install of 5.1 with you setup file and see how it goes.

I think this was a great idea...thanks for making it happen.
 
Thanks, I hope people find it usefull. Next step will be to install DA. I might need our dynamic duo to step in but I'll try to put it in the original setup myself and see if it runs all the way.
 
Hello,

I'll paste what I have on the build box.. not sure it's going to be "clean" because many things are added/removed in testing to get things working:
Code:
-bash-2.05b# pkg_info
apache+mod_ssl-1.3.29+2.8.16 The Apache 1.3 webserver with SSL/TLS functionality
bash-2.05b.007      The GNU Bourne Again Shell
bison-1.875         A parser generator from FSF, (mostly) compatible with Yacc
bsdpan-Archive-Tar-1.07 Archive::Tar - module for manipulations of tar archives
bsdpan-CPAN-1.76    CPAN - query, download and build perl modules from CPAN sit
bsdpan-Compress-Zlib-1.32 Compress::Zlib - Interface to zlib compression library
bsdpan-Data-Dumper-2.121 Data::Dumper - stringified perl data structures, suitable f
bsdpan-Digest-1.05  Digest - Modules that calculate message digests
bsdpan-Digest-MD5-2.33 Digest::MD5 - Perl interface to the MD5 Algorithm
bsdpan-File-Spec-0.86 File::Spec - portably perform operations on file names
bsdpan-Net-Telnet-3.03 Net::Telnet - interact with TELNET port or other TCP ports
bsdpan-Term-ReadLine-Perl-1.0203 Unknown perl module
bsdpan-TermReadKey-2.21 Term::ReadKey - A perl module for simple terminal control
bsdpan-libnet-1.17  Net::FTP - FTP Client class
bsdpan-mod_perl-1.27 Apache - Perl interface to the Apache server API
exim-4.24-1         exim 4.24 mail server
expat-1.95.6_1      XML 1.0 parser written in C
freetype2-2.1.4_1   A free and portable TrueType font rendering engine
gd-1.8.4_6          A graphics library for fast image creation
gettext-0.11.5_1    GNU gettext package
gmake-3.80          GNU version of 'make' utility
ispell-3.2.06_3     An interactive spelling checker for multiple languages
jpeg-6b_1           IJG's jpeg compression utilities
libiconv-1.8_2      A character set conversion library
libtool-1.3.4_4     Generic shared library support script
m4-1.4_1            GNU m4
mm-1.2.1            Shared memory allocation library for pre-forked process mod
mysql-client-3.23.56 Multithreaded SQL database (client)
p5-Devel-Constants-0.20 Perl module to translate constants back to their named symb
p5-Devel-Profile-1.01 Tell me why my perl program runs so slowly
p5-Devel-Profiler-0.04 A Perl profiler compatible with dprofpp
p5-Time-HiRes-1.46,1 A perl5 module implementing High resolution time, sleep, an
perl-5.6.1_13       Practical Extraction and Report Language
perl-5.8.0_6        Practical Extraction and Report Language
pico-4.55           PIne's message COmposition editor
png-1.2.5_2         Library for manipulating PNG images
proftpd-1.2.9       Highly configurable ftp daemon
vm-pop3d-1.1.6_1    A virtual POP3 server
wget-1.8.2_3        Retrieve files from the Net via HTTP and FTP

John
 
Back
Top