|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
PortUpgrade ??
is it a good idea to install portupgrade and use that to upgrade ports as opposed to cvsup?
Paul |
|
#2
|
|||
|
|||
|
What I am asking it.
I have a frresh install with NO ports installed and no packages. I need to set up apache, mysql and php How do I go about installing them from ports. and how do I make sure the ports are up to date Paul |
|
#3
|
|||
|
|||
|
you may be misunderstanding a couple of things regarding the ports tree. Portupgrade is used best to upgrade installed ports. It can only do this if the ports tree is up to date. cvsup is the tool that keeps your ports tree up to date. they work hand in hand. And getting them to work is quite simple. What you need to do is install the ports tree if it you have not already done so, with /stand/sysinstall. Then:
Code:
cd /usr/ports/net/cvsup
make install
cd /usr/ports/sysutils/fastest_cvsup
make install
cd /usr/ports/sysutile/portupgrade
make install
cd /usr/local/etc/
mkdir cvsup
mkdir cvsup/sup
cd cvsup/sup
fastest_cvsup -c all -Q #This will tell you the name
#of the server that is
#fastest from your location.
create the following file in the newly created sup directory and name it "supfile", making sure to replace the host with the name given by the fastest_cvsup program: Code:
*default host=REPLACE_THIS_WITH_THE_FASTEST_SERVER!!! *default base=/usr/local/etc/cvsup *default prefix=/usr *default release=cvs tag=RELENG_4 *default delete use-rel-suffix *default compress src-all ports-all tag=. create the following file, name it "cvsrun", make it executable with chmod and place it in /usr/local/bin: Code:
#!/bin/sh
log=/var/log/cvsup
backuplog=/var/log/old/cvsup
num_logs=8
use_bzip2=1
if [ ${use_bzip2} != 0 ]
then
gz_ext=.bz2
fi
# Rotate the log files
umask 22
for i in $(/usr/bin/jot ${num_logs} $((${num_logs}-1)) 0)
do
test -f ${backuplog}.$i${gz_ext} && mv -f ${backuplog}.$i${gz_ext} ${backuplog}.$(($i+1))${gz_ext}
done
test -f ${log} && mv -f ${log} ${backuplog}.0 && [ ${use_bzip2} != 0 ] && /usr/bin/bzip2 -9 ${backuplog}.0
exec >${log} 2>&1
echo Subject: `hostname` weekly cvsup run output
date "+CVSup update started: %Y-%m-%d %T"
/usr/local/bin/cvsup -g -L 2 /usr/local/etc/cvsup/sup/supfile
/usr/local/sbin/portsdb -Uu
/usr/local/sbin/pkgdb -u
date "+CVSup update ended: %Y-%m-%d %T"
(I cannot remember who it was that deserves credit for this beauty. I think I may have gotten them from FreeBSD-Diary...) so, now you can update your ports tree by calling cvsrun. Add this command to your crontab. I would suggest at least weekly updates. Once your ports tree is up to date, you can check which of the installed packages are no longer current with the portversion -L = these can be updated with portupgrade. Now that your ports tree is up to date, you can install new programs and be sure to have the most recent stable port (hence the RELENG_4 tag in the supfile). The easiest way to do this is to search the portstree: cd /usr/ports make search key=apache2 | less this will give you a list of possible matches and the path to the port. The one you want is probably in /usr/ports/www/apache2, so: cd www/apache2 make install This will install apache. You can perform the other installations likewise. -Steven __________________ My mother told me to stand up to homicidal maniacs. –Baldrick Yes, if this is the same mother who confidently claimed that you are a tall handsome stallion of a man, I should treat her opinions with extreme caution. –Edmund Black Adder |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > PortUpgrade ?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|