FAQ: Installation beside to the system Of freeBSD.

 
Author Message
CteNNal.





Posted: Mon Apr 07, 2008 23:35    

Installation beside to the system Of freeBSD.
or why it is necessary to place programs from the ports, but not by the hands
Q: Why you do advise everything to place from the ports, does can actually simpler of where everything switch oned it is compiled with the necessary options?
A: Because ports - this is standard mounting method before the system. This means that program, the reference documents, shared libraries and files of headings are placed precisely there, where it is must, and therefore there is no need for subsequently to be occupied by long searches.
Moreover, the system of Audit FreeBSD works only ON, established from the ports, and it means that establishing from , you will themselves of at the point of the safety of system itself seek statements about the critical vulnerabilities of programs and their new versions.
Q: Indeed to actually more simply set from where everything switch oned is compiled with the necessary options?
A: In reality - not simpler, but it is more complex. Because the system of ports itself finds dependences and automatically is placed necessary . In the case of installation by hand, it is necessary to independently place the necessary libraries, which, in turn, depend on other libraries, which also depend on the libraries, which .....
And these are - . Misfortune comes when necessary to renew any package; for example, during the detection of any vulnerability or with the replacement of version.
Visualize that arose the need for renewing libfreetype. If is established PHP5 with the support gd, at the point of us (possibly) it is necessary to libfreetype, libgd and php- gd. And all this by hand, with the recollection of the options, with which was assembled all this past time, with the preliminary purging of system from the old version and so forth
But if we gathered from the ports, everything is solved by the exactly one command: portupgrade of freetype-1.2.3. Everything else system will do itself.
Q: But I myself placed from - everything worked and it was not necessary to .
A: Yes, it worked. But it was how long required in order all this to place, to be dismantled against the dependences and to run in the manner that necessary?
By hand, it is must for the installation of the same Of apache + OF PHP5 + Of mySQL + gadolinium:
- to gather gd, jpeg, png, freetype
- to gather and to establish mysql
- to gather and to establish apache
- to gather PHP5.
In this case it is necessary to remember about the ways of installation, the flags of optimization, additional dependences, to write by hand the scripts of automatic start….
But with the installation from the ports everything exactly beside two commands:
cd /usr/ports/databases/php5-extensions
make of install of clean
Q: Where to read about the fact that it is necessary to place from the ports for the normal operation of any package in order to then not poke before the errors?
A: The system of ports is done so that it automatically finds all dependences. Therefore it is not necessary to be harassed, that the system something “will forget” to place. Will be established only that is necessary for the work.
For example, it is must the support of mysql for PHP5, but we do not know, before what port to seek. We make:
Code:
cd /usr/ports
make of search of name=php5 | grep of mysql





Port: php5-mysql-5.1.2_1
Path: /usr/ports/databases/php5-mysql
Info: The mysql shared extension for php
It is possible to use the utility of portsearch
/usr/ports/Tools/scripts/portsearch - n of mysql - d of php5
Q: But it is here during utilization of and reading of the documentation before them of problems - minimum.
A: Untruth. Problems it is more. Because it is necessary to remember that also where it was established, what version and for which precisely. In this case, through half a year you nevertheless will forget about the fact that also where they placed.
Q: But as down the count of optimization?
A: If to you is actually necessary velocity, place ONLY from the ports. As a rule, ports have additional flags for the assembly of the optimized code depending on concrete architecture. Thus, mysql and openssl down x86/of amd64 are assembled with the wide utilization of a code, written on the assembler.
Q: Where to seek ports?
A: Down http://vreshports.arj/, and…. (according to the miracle!) down http://friibsd.arj/
Q: How to renew the tree of ports?
A: Down FreeBSD of version 5.5 and 6.X- with the help of the program of portsnap, which is the unit of the base system.
The first time it sufficiently much, the order of 35 megas-byte, but it will then renew only changed ports, and this is entirely small traffic.
First starting:
Code:
portsnap of fetch
portsnap of extract
portsnap of update
Subsequent starting:
Code:
portsnap of fetch
portsnap of update
On the old versions it is possible to use cvsup or to place from the ports of portsnap
cvsup:
/usr/ports/net/cvsup-without-gui
Restoration appears as follows:
cvsup - g - L 2 /usr/share/examples/cvsup/ports-supfile
after indicating before the file of ports-supfile it , based on which will be drawn off the tree of ports.
portsnap
/usr/ports/sysutils/portsnap
Q: How to renew the established ports?
A: Ports should be renewed by the program of portupgrade
To place it fashionably from the ports:
Code:
cd /usr/ports/sysutils/portupgrade
make of install of clean
Q: How to check that established ON beyond the vulnerability?
A: It is very simple: after establishing and after launching the program of portaudit.
Code:
cd /usr/ports/sysutils/portupgrade
make of install of clean
Entire procedure of Audit is very simple: portaudit - Fda
Code:
audetvile.tbs 100% of 33 kB of 40 kBps
New of database of installed.
Database of created: on Tuesday February 28, 2006. the 17:10: 12 (MSK)





Moderators, you will stick theme beside the section UNIX, but not RTFM - there nevertheless no one reads.





WBR, Andrei.
If I fell to you towards, it means to you with me not on puTTY.
|---Is greater than if you do not know English - you defective .
The last time it edited: Stellar. (Watts Feb 28, 560668: 16), in all it edited 2 times (a)
Back to top
 
sdlanjair





Posted: Tue Apr 08, 2008 08:21    

I somehow wrote for , so that to the pile:
1. use ports. This makes it possible to avoid problems with the compilation and the work. With the collection of program based on the port as a rule are placed for the more correct work before the system.
2. if programs no before the collection of ports look for before you unofficial port.
3. if you assemble with it is not worthwhile on the spread advice to go before the directory and to speak {BEFORE PATH} of /configure && of make && of make of install. One should understand for the beginning that the sufficient rigid structure of catalogs (centimeter(s) of man of hier (7)) and to disturb it simple because laziness to manufacture some activities is sufficiently foolish beside OpenBSD. Therefore the script of configure should be fulfilled with the keys by those indicating the correct of the location of the files of program. For example one should assume before /usr/local/bin/.
4. read documentation. man of ports contains response down the spread question “as to me to look the dependences of port” and much other useful information.
5. sometimes it is worthwhile to do its port of program. There is nothing complex before this.
Back to top
 
Amsomd





Posted: Tue Apr 08, 2008 11:58    

To Keen its 5 kopecks - for the removal “excess” packages a good tool - pkd_cutleaves.
Back to top
 
mtv





Posted: Tue Apr 08, 2008 17:01    

It would be desirable to still hear response, as it is correct to add options with the assembly from the ports.
For example, to gather apache with the option -enable-module=proxy. How it is correct to do? To prescribe the variable of medium down the period of compilation? To introduce changes in Makefile?
Back to top
 
CteNNal.





Posted: Thu Apr 10, 2008 14:15    

mdv wrote (a):
It would be desirable to still hear response, as it is correct to add options with the assembly from the ports.
For example, to gather apache with the option -enable-module=proxy. How it is correct to do? To prescribe the variable of medium down the period of compilation? To introduce changes in Makefile?
But that, perhaps from the ports this module no longer is placed?
But this then that?
pkg_which /usr/local/libexec/apache/libplohy.co
apache-1.3.34_4
Back to top
 
mtv





Posted: Thu Apr 10, 2008 14:53    

It interests precisely as correct to make similar things. In particular, the given example relates down apache22 - I wish to place him for the test targets, but with the possibility of . If I am not mistaken, from the ports he so is not placed. But this is - a particular example for the illustration.
Not always indeed before the ports are used on default those options, which are necessary. How it is correct to change them?
Back to top
 
CteNNal.





Posted: Thu Apr 10, 2008 16:25    

/usr/ports/www/apache22 # make of extract
To enable a of module of category: WITH__MODULES
To disable a of module of category: WITHOUT__MODULES
Per default categories are:
AUTH AUTHN AUTHZ DAV CACHE MISC
Categories of available:
AUTH AUTHN AUTHZ CACHE DAV EXPERIMENTAL LDAP MISC PROXY SSL SUEXEC THREADS
Back to top
 
Amsomd





Posted: Fri Apr 11, 2008 04:56    

mdv wrote (a):
Not always indeed before the ports are used on default those options, which are necessary. How it is correct to change them?
It is correctly possible in different ways. Me it pleases to indicate the necessary options before the file of pkgtools.conf, the parameter MAKE_ARGS. Well and to establish, naturally, through portinstall… Earlier than Makefile it directed
Back to top
 
Tyr





Posted: Fri Apr 11, 2008 11:13    

Amsand wrote (a):
mdv wrote (a):
Not always indeed before the ports are used on default those options, which are necessary. How it is correct to change them?
It is correctly possible in different ways. Me it pleases to indicate the necessary options before the file of pkgtools.conf, the parameter MAKE_ARGS. Well and to establish, naturally, through portinstall… Earlier than Makefile it directed
In my opinion man requested, as to generally establish these functions not through straightening Of makefile.
Then thus: make - DWITHOUT_IPV6=YES WITH_STATIC_SUPPORT of install or through the installation of the variable of the encirclement (there is a risk to forget to conversely then ; therefore I so I do not make): setenv WITHOUT_IPV6 YES






Origin: To necessary, but not to read.
Back to top
 
Tyr





Posted: Fri Apr 11, 2008 18:29    

Still on portsnap of vs. of cvsup. Why is better the utilization of portsnap, besides simplicity (of absent) , than cvsup? Only because of the signed archive with the ports?
And correction to FAQ', portsnap of fetch do not pass (at least, in me), since of portsnap.conf remained they are brought down before /usr/src/etc (probably, he forgot mergemaster to do with the restoration):
Quotation:
white2u# of portsnap of fetch
portsnap: SERVERNAME of must be of given of via of command of line or of configuration of file.
white2u# of portsnap of fetch - s pordsmap.FreeVST.orj
portsnap: Key of must be of given of via - k of option or of configuration of file.
white2u# of locate of portsnap.conf
/usr/obj/usr/src/share/man/man5/portsnap.conf.5.gz
/usr/share/examples/etc/portsnap.conf
/usr/share/man/man5/portsnap.conf.5.gz
/usr/src/etc/portsnap.conf
/usr/src/share/man/man5/portsnap.conf.5






Origin: To necessary, but not to read.
The last time it edited: Dyr ( Mar 2, 200951:29), in all edited 1 time
Back to top
 
Amsomd





Posted: Sat Apr 12, 2008 21:40    

Dyr wrote (a):
Why is better the utilization of portsnap
Well at least because this is the unit of the system
Back to top
 
Tyr





Posted: Mon Apr 14, 2008 14:07    

Amsand wrote (a):
Dyr wrote (a):
Why is better the utilization of portsnap
Well at least because this is the unit of the system
You do not argue with this. =) but it seems to me that the utilization of cvsup, its- that possibility to renew still and system itself, and the utilization of refuse of file more convenient and more useful will. No?
P.S. however, already found the considered theme av url






Origin: To necessary, but not to read.





Fr33M@n





Small is the addition:
Q: How it is correct to place ?
A: For the competent imposition of it is necessary to fulfill the following activities:
Code:
# cd /usr/ports/some/prog
# fetch of url
# mv patch of files/patch-some.patch
# make of build
With this approach no longer it is necessary each time down hands to place this , system will do entire itself.





WBR, Vasiliy
I would change peace, but god did not give …





@





Dyr wrote (a):
Amsand wrote (a):
It is correctly possible in different ways. Me it pleases to indicate the necessary options before the file of pkgtools.conf, the parameter MAKE_ARGS. Well and to establish, naturally, through portinstall… Earlier than Makefile it directed;)
In my opinion man requested, as to generally establish these functions not through straightening Of makefile.
Then thus: make - DWITHOUT_IPV6=YES WITH_STATIC_SUPPORT of install or through the installation of the variable of the encirclement (there is a risk to forget to conversely then ; therefore I so I do not make): setenv WITHOUT_IPV6 YES
It is possible these options before /etc/make.conf to record somehow thus:
Code:
.if i {.CURDIR: N*/ports//<Ъ
Back to top
 
sqoerL





Posted: Mon Apr 14, 2008 19:23    

and the analog of gentoo of emerge - pv exists? i.e. I wish to look:
- how much as far as the capacity will be pumped out with the installation
- the established dependences with the installation/turning off of various options of assembly. how it is possible this to do beside FreeBSD?
Back to top
 



Powered by phpBB © 2001- 2008 phpBB Group