Friday, June 29, 2007

HOWTO: Use dpkg to Install .deb Files.

by Jon on November 27th, 2005

I’ve written about using apt-get to get and install debian packages. However, a recent comment by a reader brought the fact that I hadn’t written anything on what to do with a .deb file that exists on your system already either by download or other media.

Using the apt-get application is the quickest way to find and install debian packages. The installation part is done by an application named dpkg. Dpkg doesn’t have to be used by apt-get, you can use it manually as well.

From the man dpkg command:

dpkg - a medium-level package manager for Debian

Whatever that means.

In keeping with GNU/Linux system security, only the superuser can use the dpkg application. Dpkg is a typical GNU/Linux application that is controlled by command-line switches. Possibly the most common use of dpkg is to install a local .deb file.

To install a .deb file, become root and use the command:

dpkg -i filename.deb

Dpkg can also be used to:

* dpkg –unpack: unpacks the file but does not install it
* dpkg –configure: presents whatever configuration options are available for the package
* dpkg –remove: removes a package

Some of the package manipulation commands are actually carried out by an application called dpkg-deb. In those cases, dpkg just acts as a front end to dpkg-deb and passes the commands to it.

Dpkg-deb can also be used to manipulate .deb files. Some of the more useful commands of dpkg-deb are:

dpkg-deb –show filename.deb

This will display the information for filename.deb. Normally, this is boring information like the application version (which is normally evident from the filename), but in some cases more interesting and useful information is displayed.

Consult the dpkg man page for information on the more arcane uses for dpkg.
Debian Installation Instructions
From Newscloud
Jump to: navigation, search

From your SSH shell, the steps below should properly configure your system. For this exercise, we use Debian 3.1 Stable (formerly Sarge). I wrote these instructions using an account at JVDS (StandardLinux1 VPS for $20/mo).

You can also browse our sample configuration files in /static/platforms/debian. We have example files here for php.ini, httpd.conf and custom.conf. We don't recommend copying these but they may be helpful for comparison via diff.
Contents
[hide]

* 1 General System Requirements
* 2 See also
* 3 Configure the NewsCloud environment
o 3.1 Get packages
o 3.2 Install NewsCloud
o 3.3 Configure MySQL
o 3.4 Configure Apache
o 3.5 Configure Smarty
o 3.6 Configure cron
o 3.7 Update the database
o 3.8 Installing mod_gzip compression

[edit]
General System Requirements

* Apache/1.3.33
* MySQL 4.x
* PHP 4.x

[edit]
See also

* Release Notes: These instructions were tested with the January 2007b release.
* NewsCloud Hosting Options

[edit]
Configure the NewsCloud environment

The following procedures demonstrate how to update your Debian packages and configure Apache, MySQL, Smarty, PHP, cron and NewsCloud.
[edit]
Get packages

#refresh debian packages
apt-get update

#install helpful tools
apt-get install sudo
apt-get install apt-show-versions

#set up Apache 1.3, MySQL 4.1x, PHP4, GD, PEAR and Smarty
apt-get install apache
apt-get install mysql-server-4.1
apt-get install libapache-mod-php4 php4-mysql php4-gd php4-pear
apt-get install smarty
apt-get install postfix
pear install HTTP HTTP_Download HTTP_Header HTTP_Request
pear install HTML_Common
pear install HTML_QuickForm

# set up CVS
apt-get install cvs

[edit]
Install NewsCloud

# get newscloud source and database from CVS
# place code in staging directory /code
mkdir /code
cd /code
cvs -d:pserver:anonymous@newscloud.cvs.sourceforge.net:/cvsroot/newscloud login
cvs -z3 -d:pserver:anonymous@newscloud.cvs.sourceforge.net:/cvsroot/newscloud co -P newscloud

# copy the source code from the staging directory (CVS sync location) to the live Apache Web tree
mkdir /var/www/newscloud
cd /var/www/newscloud
cp /code/newscloud/src/* . -r
# copy the .htaccess files too
cp /code/newscloud/src/.htaccess .
cp /code/newscloud/src/static/redirect/.htaccess ./static/redirect

[edit]
Configure MySQL

# set the MySQL password
mysqladmin -u root password 'yourmysqlpassword'
# Import the sample NewsCloud database into MySQL
mysql -uroot -p
create database newscloud;
quit;
cd /code/newscloud/database
gunzip newscloud.sql.gz
mysql -uroot -p newscloud < /code/newscloud/database/newscloud.sql

[edit]
Configure Apache

#Set up a custom.conf file in /etc/apache/conf.d
cd /etc/apache/conf.d
nano custom.conf

Listen 80
NameVirtualHost *

# if you use a different domain, be sure to change the domain used in .htaccess in the root as well as in /static/redirect

ServerName newscloud.com
ServerAlias *.newscloud.com
DocumentRoot /var/www/newscloud/

AllowOverride All



# eventually we will change this in the code base
# but in the meantime you can global replace image.commonmedia.org with your own image.yourdomain.com
#
# ServerName image.commonmedia.org
# ServerAlias image.commonmedia.org
# DocumentRoot /var/www/newscloud/image_files/
#


# Edit httpd.conf in /etc/apache
cd /etc/apache
nano httpd.conf
# Make the changes below

DocumentRoot /var/www/newscloud

Options SymLinksIfOwnerMatch
AllowOverride None


Options Indexes Includes FollowSymLinks MultiViews
Order allow,deny
Allow from all



# Alias /icons/ /usr/share/apache/icons/
#
# Options Indexes MultiViews
# AllowOverride None
# Order allow,deny
# Allow from all
#

# Alias /images/ /usr/share/images/
#
# Options MultiViews
# AllowOverride None
# Order allow,deny
# Allow from all
#



=== Configure PHP ===

# And for PHP 4.x, use:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

# Edit php.ini in /etc/php4/apache
cd /etc/php4/apache
nano php.ini
# Uncomment and modify the following lines
include_path = ".:/usr/share/php:/var/www/newscloud"
extension=mysql.so
extension=gd.so

# Set up include files with api, db keys
# To prevent abuse, we use three include files for installation-specific passwords
# and keys. The three files should be placed one directory above your root directory
# e.g. If you're web server directory for NewsCloud is /var/www/newscloud. Place these three files in /var/www.
cd /var/www/newscloud
cp *.inc ../
cd /var/www
nano dbKey.inc

apiKey.inc



cryptKey.inc

$pwCrypt='your crypt key for passwords here';
$apiCrypt='your crypt key for api calls here';
?>

dbKey.inc

$database='newscloud';
$username='root';
$password='yourmysqlpassword';
?>

[edit]
Configure Smarty

# Set up Smarty directories

cd /var/www/newscloud
mkdir static/smarty/templates
mkdir /var/www/smarty
mkdir /var/www/smarty/templates_c
mkdir /var/www/smarty/configs
mkdir /var/www/smarty/cache
chown www-data:www-data /var/www/smarty/templates_c
chown www-data:www-data /var/www/smarty/cache
chmod 775 /var/www/smarty/templates_c
chmod 775 /var/www/smarty/cache

# Set up Feed Creator Directory
# Feed creator needs a dir called 'rss' at the root of the workspace

cd /var/www/newscloud
mkdir ./rss
chmod 777 ./rss

[edit]
Configure cron

# Copy sample CRON script to your CRON directory
cp /code/newscloud/src/cron/newscloud.cron /etc/cron.d
# Edit newscloud.cron to include your api key from above or cron jobs will fail
cd /etc/cron.d
nano newscloud.cron

#Restart Apache
/usr/sbin/apachectl restart

[edit]
Update the database

# Run the database updates for December 2006 and January 2007
# Point your browser to:
# http://yourdomain.com/static/DBUpdates/Dec2006.php
# http://yourdomain.com/static/DBUpdates/Jan2006.php

# Remember, the default superuser account in the distribution database
# is newsmonkey@gmail.com with password NewsCloud

# Read more on Administrating NewsCloud

[edit]
Installing mod_gzip compression

# Optional: If you want to optimize apache with gzip. Do the following
sudo apt-get install libapache-mod-gzip
hei,, klo pengin update kernel, di edit aja file sources.list di /etc/apt/ trus apt-update,, gitu!!
Install ImageMagick 5.5.7 on Debian
Posted by - Marius - in : Linux, Debian, Ubuntu , trackback

ImageMagick is a set of programs to manipulate various image formats (JPEG, TIFF, PhotoCD, PBM, XPM, etc…). All manipulations can be achieved through shell commands as well as through an X11 graphical interface. Possible effects: colormap manipulation, channel operations, thumbnail creation, image annotation, limited drawing, image distortion, etc…

Normally with any software I will try to use the latest available version because: the application should be better in newer versions, should be maintained more actively for security issues compared to legacy versions, etc.
Still in this case, I had to install several times an older version of ImageMagick. Why? Not for the application itself, but because of some applications that relied on the php wrapper (the imagick pecl module). This compiles fine with ImageMagick 6, but many functions fail. So in order to have the php module working properly I had to first install imagemagick 5 that is the last version the php module works fine.

I will show how to install ImageMagick 5.5.7 (the latest version available from the 5 branch) from sources on a Debian Etch system. Debian obviously contains packages for ImageMagick (v. 6.2.4 at the time of writing this post), that can be installed as easy as

apt-get install imagemagick

but there is no package for version 5. So we have to install it from source. First download the source from imagemagick ftp:

wget ftp://ftp.imagemagick.net/pub/ImageMagick/ImageMagick-5.5.7-36.tar.gz

Uncompress it somewhere, and you are now ready to compile it. This is no different than

./compile; make; make install

that any Linux user is familiar with. But the tricky part is to install the required packages for the compile to be successful and to use most of the functionalities that we need.

On our Debian system we can install all the required packages to compile the imagemagick debian package:

apt-get build-dep imagemagick

(just make sure you have a deb-src line in your sources.list). Depending from the state of the system and what packages is has already installed the result of this command will be different. For example on a stripped down Debian Etch system it looks like this:

apt-get build-dep imagemagick
Reading package lists… Done
Building dependency tree… Done
The following NEW packages will be installed
binutils build-essential cpp cpp-4.1 debhelper defoma dpkg-dev fontconfig-config g++ g++-4.1 gcc gcc-4.1 gettext graphviz gs-common gs-gpl gsfonts html2text intltool-debian libbz2-dev libc6-dev libexif-dev libexif12 libexpat1 libexpat1-dev libfontconfig1 libfreetype6 libfreetype6-dev libice-dev libice6 libjasper-1.701-1 libjasper-1.701-dev libjpeg62 libjpeg62-dev liblcms1 liblcms1-dev libltdl3 libltdl3-dev libpaper1 libperl5.8 libpng12-0 libpng12-dev libsm-dev libsm6 libssp0 libstdc++6-4.1-dev libtiff4 libtiff4-dev libtiffxx0c2 libwmf-dev libwmf0.2-7 libx11-6 libx11-data libx11-dev libxau-dev libxau6 libxaw7 libxdmcp-dev libxdmcp6 libxext-dev libxext6 libxml2 libxml2-dev libxmu6 libxpm4 libxt6 linux-kernel-headers make patch po-debconf tcl8.4 tk8.4 ttf-dejavu ucf x11-common x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev xtrans-dev zlib1g-dev
0 upgraded, 81 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.6MB/46.6MB of archives.
After unpacking 148MB of additional disk space will be used.

Now we have all what we need to compile imagemagick from source. Use configure with the options you need. For example, for default options you would use just:

./configure

but you might need some special parameters (check the installation docs for details on all the configurations available parameters)… for ex.:

./configure --with-perl=no --with-magick-plus-plus=no --enable-shared --with-gs-font-dir=/usr/share/fonts/type1/gsfonts --x-includes=/usr/include/X11 --x-libraries=/usr/lib/X11
After the configure script finishes verify the result and see if all looks as expected. The output in my case looks like:

ImageMagick is configured as follows. Please verify that this
configuration matches your expectations.

Host system type : x86_64-debian-linux-gnu

Option Configure option Configured value
-----------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
GNU ld --with-gnu-ld=yes yes
LZW support --enable-lzw=yes yes
Quantum depth --with-quantum-depth=16 16

Delegate Configuration:
BZLIB --with-bzlib=yes yes
DPS --with-dps=yes no
EXIF --with-exif=yes yes
FlashPIX --with-fpx=yes no
FreeType 2.0 --with-ttf=yes yes
Ghostscript None /usr/bin/gs (unknown)
Ghostscript fonts --with-gs-font-dir=/usr/share/fonts/type1/gsfonts
/usr/share/fonts/type1/gsfonts/
Ghostscript lib --with-gslib=no no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes yes
LCMS --with-lcms=yes yes
Magick++ --with-magick-plus-plus=no no
PERL --with-perl=no no
PNG --with-png=yes yes
TIFF --with-tiff=yes yes
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=yes yes
X11 --with-x= yes
XML --with-xml=yes yes
ZLIB --with-zlib=yes yes

X11 Configuration:
X_CFLAGS = -I/usr/include/X11
X_PRE_LIBS = -lSM -lICE
X_LIBS = -L/usr/lib/X11
X_EXTRA_LIBS =

Options used to compile and link:
CC = gcc
CFLAGS = -g -O2 -Wall
CPPFLAGS = -I/usr/include/freetype2 -D_REENTRANT -I/usr/include/X11
-I/usr/include/libxml2
CXX = g++
CXXFLAGS = -g -O2
LDFLAGS = -L/usr/lib/X11 -lfreetype -lz -L/usr/lib
LIBS = -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -lexif -lwmflite
-lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm

Now we can proceed with the actual compilation:

make

and if there are no errors with the installation:

make install

(this will install the files under /usr/local, since we have not overwritten the default –prefix).

As a reminder that older software might not compile on newer and modern OS’s (compilers, libraries, etc) the compilation fails on recent Debian Etch versions with:

png.c: In function 'WriteOneJNGImage':
png.c:7639: warning: dereferencing type-punned pointer will break strict-aliasing rules
png.c:7705: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[1]: *** [png.lo] Error 1
make[1]: Leaving directory `/usr/local/src/ImageMagick-5.5.7/coders'
make: *** [all-recursive] Error 1

This is caused by newer versions of libpng12, and in order to compile imagemagick successfully I had to install version 1.2.8rel-7 (opposed to the latest version that is currently installed on etch 1.2.13-4)

Once the installation is completed we can verify the version we installed is working fine with:

/usr/local/bin/identify -version
Version: ImageMagick 5.5.7 12/21/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 2003 ImageMagick Studio LLC

or

/usr/local/bin/convert -version
Version: ImageMagick 5.5.7 12/21/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 2003 ImageMagick Studio LLC

and to get the listing of which image formats are supported on our system:

identify -list format
Format Mode Description
——————————————————————————-
8BIM* rw- Photoshop resource format
8BIMTEXT* rw- Photoshop resource text format
8BIMWTEXT* rw- Photoshop resource wide text format
APP1* rw- Raw application information
APP1JPEG* rw- Raw JPEG binary data
ART* r– PFS: 1st Publisher
Format originally used on the Macintosh (MacPaint?) and later
used for PFS: 1st Publisher clip art. NOT the AOL ART format.
AVI* r– Microsoft Audio/Visual Interleaved
AVS* rw+ AVS X image
BIE* — Joint Bi-level Image experts Group interchange format
BMP* rw- Microsoft Windows bitmap image
BMP2* -w- Microsoft Windows bitmap image v2
BMP3* -w- Microsoft Windows bitmap image v3
CACHE* — Magick Persistent Cache image format
CAPTION* r– Image caption
CMYK* rw+ Raw cyan, magenta, yellow, and black samples
CMYKA* rw+ Raw cyan, magenta, yellow, black, and opacity samples
CUR* r– Microsoft icon
CUT* r– DR Halo
DCM* r– Digital Imaging and Communications in Medicine image
DICOM is used by the medical community for images like X-rays.
The specification, “Digital Imaging and Communications in
Medicine (DICOM)”, is available at http://medical.nema.org/
In particular, see part 5 which describes the image encoding (RLE,
JPEG, JPEG-LS), and supplement 61 which adds JPEG-2000 encoding.
DCX* rw+ ZSoft IBM PC multi-page Paintbrush
DPS r– Display Postscript Interpreter
DPX* rw+ Digital Moving Picture Exchange
EPDF rw- Encapsulated Portable Document Format
EPI* rw- Adobe Encapsulated PostScript Interchange format
EPS* rw- Adobe Encapsulated PostScript
EPS2* -w- Adobe Level II Encapsulated PostScript
EPS3* -w+ Adobe Level III Encapsulated PostScript
EPSF* rw- Adobe Encapsulated PostScript
EPSI* rw- Adobe Encapsulated PostScript Interchange format
EPT rw- Adobe Encapsulated PostScript with TIFF preview
EXIF* rw- Exif digital camera binary data
FAX* rw+ Group 3 FAX
See TIFF format. Note that FAX machines use non-square pixels
which are 1.5 times wider than they are tall but computer displays
use square pixels, so FAX images may appear to be narrow unless
they are explicitly resized using a resize specification of
“150×100%”.
FITS* rw- Flexible Image Transport System
FPX* rw- FlashPix Format
FRACTAL* r– Plasma fractal image
G3* rw- Group 3 FAX
GIF* rw+ CompuServe graphics interchange format
GIF87* rw- CompuServe graphics interchange format (version 87a)
GRADIENT* r– Gradual passing from one shade to another
GRANITE* r– Granite texture
GRAY* rw+ Raw gray samples
HISTOGRAM* -w- Histogram of the image
HTM* -w- Hypertext Markup Language and a client-side image map
HTML(link)* -w- Hypertext Markup Language and a client-side image map
ICB* rw+ Truevision Targa image
ICC* rw- ICC Color Profile
ICM* rw- ICC Color Profile
ICO* r– Microsoft icon
ICON* r– Microsoft icon
IPTC* rw- IPTC Newsphoto
IPTCTEXT* rw- IPTC Newsphoto text format
IPTCWTEXT* rw- IPTC Newsphoto text format
JBG* — Joint Bi-level Image experts Group interchange format
JBIG* — Joint Bi-level Image experts Group interchange format
JNG* rw- JPEG Network Graphics
See http://www.libpng.org/pub/mng/ for details about the JNG
format. The JNG 1.0 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/mng/documents/.
JP2* rw- JPEG-2000 JP2 File Format Syntax
JPC* rw- JPEG-2000 Code Stream Syntax
JPEG* rw- Joint Photographic Experts Group JFIF format (62)
JPG* rw- Joint Photographic Experts Group JFIF format
LABEL* r– Image label
LOGO* rw- ImageMagick Logo
M2V rw+ MPEG Video Stream
MAGICK* r– Predefined Magick Image
MAP* rw- Colormap intensities and indices
MAT* r– MATLAB image format
MATTE* -w+ MATTE format
MIFF* rw+ Magick Image File Format
MNG* rw+ Multiple-image Network Graphics (libpng 1.2.8)
See http://www.libpng.org/pub/mng/ for details about the MNG
format. The MNG 1.0 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/mng/documents/.
MONO* rw- Bi-level bitmap in least-significant-byte first order
MPC* rw+ Magick Persistent Cache image format
MPEG rw+ MPEG Video Stream
MPG rw+ MPEG Video Stream
MSL* rw+ Magick Scripting Language
MTV* rw+ MTV Raytracing image format
MVG* rw- Magick Vector Graphics
NETSCAPE* r– Netscape 216 color cube
NULL* rw- Constant image of uniform color
OTB* rw- On-the-air bitmap
P7* rw+ Xv thumbnail format
PAL* rw- 16bit/pixel interleaved YUV
PALM* rw- Palm pixmap
PATTERN* r– Predefined pattern
PBM* rw+ Portable bitmap format (black and white)
PCD* rw- Photo CD
PCDS* rw- Photo CD
PCL* -w- Page Control Language
PCT* rw- Apple Macintosh QuickDraw/PICT
PCX* rw- ZSoft IBM PC Paintbrush
PDB* rw+ Palm Database ImageViewer Format
PDF rw+ Portable Document Format
PFA* r– Postscript Type 1 font (ASCII)
PFB* r– Postscript Type 1 font (binary)
PGM* rw+ Portable graymap format (gray scale)
PGX* r– JPEG-2000 VM Format
PICON* rw- Personal Icon
PICT* rw- Apple Macintosh QuickDraw/PICT
PIX* r– Alias/Wavefront RLE image format
PLASMA* r– Plasma fractal image
PM* rw- X Windows system pixmap (color)
PNG* rw- Portable Network Graphics (libpng 1.2.8)
See http://www.libpng.org/ for details about the PNG format.
The PNG 1.2 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/png/documents/.
PNG24* rw- 24-bit RGB PNG, opaque only (zlib 1.2.3)
PNG32* rw- 32-bit RGBA PNG, semitransparency OK
PNG8* rw- 8-bit indexed PNG, binary transparency only
PNM* rw+ Portable anymap
PPM* rw+ Portable pixmap format (color)
PREVIEW* -w- Show a preview an image enhancement, effect, or f/x
PS* rw+ Adobe PostScript
PS2* -w+ Adobe Level II PostScript
PS3* -w+ Adobe Level III PostScript
PSD* rw+ Adobe Photoshop bitmap
PTIF* rw- Pyramid encoded TIFF
PWP* r– Seattle Film Works
RAS* rw+ SUN Rasterfile
RGB* rw+ Raw red, green, and blue samples
RGBA* rw+ Raw red, green, blue, and matte samples
RLA* r– Alias/Wavefront image
RLE* r– Utah Run length encoded image
SCT* r– Scitex HandShake
SFW* r– Seattle Film Works
SGI* rw+ Irix RGB image
SHTML* -w- Hypertext Markup Language and a client-side image map
STEGANO* r– Steganographic image
SUN* rw+ SUN Rasterfile
SVG* rw+ Scalable Vector Gaphics (XML 2.6.27)
TEXT* rw+ Text
TGA* rw+ Truevision Targa image
TIF* rw+ Tagged Image File Format (42)
TIFF* rw+ Tagged Image File Format (42)
TILE* r– Tile image with a texture
TIM* r– PSX TIM
TTF* r– TrueType font
TXT* rw+ Text
UIL* -w- X-Motif UIL table
UYVY* rw- 16bit/pixel interleaved YUV
VDA* rw+ Truevision Targa image
VICAR* rw- VICAR rasterfile format
VID* rw+ Visual Image Directory
VIFF* rw+ Khoros Visualization image
VST* rw+ Truevision Targa image
WBMP* rw- Wireless Bitmap (level 0) image
WMF* r– Windows Meta File
WPG* r– Word Perfect Graphics
X* rw- X Image
XBM* rw- X Windows system bitmap (black and white)
XC* r– Constant image uniform color
XCF* r– GIMP image
XMP* rw- Adobe XML metadata
XPM* rw- X Windows system pixmap (color)
XV* rw+ Khoros Visualization image
XWD* rw- X Windows system window dump (color)
YUV* rw- CCIR 601 4:1:1 or 4:2:2

* native blob support
Upgrade Mambo 4.5.5 to 4.6.2

Ternyata cara upgradenya beda lho,, ini nih caranya :

Mambo 4.5.5 to 4.6.2 Patch Installation Instructions:

Below you will find the steps to bring a Mambo 4.5.5 system up to the 4.6.2 version. This will NOT bring prior versions up to date. You should first try to bring prior versions up to the 4.5.5 patch level before applying the 4.6.2 patch.

The Mambo 4.5.5 to 4.6.2 upgrade process is a bit more complicated than other recent upgrades since the 4.6 branch is a minor release. 4.6 is called a minor upgrade since not a ton of visual changes have taken place, but in reality the core of Mambo has had a significant rewrite and a number of new features added. 4.6 is an important milestone for the project that lays the ground work for future versions of Mambo. The team has worked hard on this release and has done a lot of work trying to maintain compatibility with existing 3rd party components, modules, mambots while at the same time trying to move the project forward. That being said it is important that you THROUGHLY test all your 3rd party components with 4.6 PRIOR to upgrading your installation. It is possible that some of your extensions have not yet been made compatible with Mambo 4.6+. We did go through an extended release candidate testing period to work on 3rd party compatibility and provide 3rd party developers with lots of time to start preparing their extensions for the new release. We recommend you report any issues you find during testing back to the corresponding 3rd party developers. The Mambo team will assist 3rd developers as best we can with making their extensions compatible with the new branch.

Upgrading Steps:

1) Again... test your 3rd party extensions and upgrade AFTER you are confident they are working to your satisfaction.
2) Backup your site (both database & site files)
3) Note: If you never installed the 4.5.5 version of the MOStlyCE (WYSIWYG editor) mambot and/or the MOStlyCE Admin component then you can skip this step.

If you have installed the 4.5.5 versions of the MOStlyCE (WYSIWYG editor) mambot and/or the MOStlyCE Admin component you will need to uninstall them as they were ported versions specific to 4.5.5. After uninstalling the mambot change your default editor to TinyMCE or No Editor in your Global Configuration if it is not already set this way.

When you finish with the upgrade to 4.6.2 you can install the 4.6 version of MOStlyCE & MOStlyCE Admin from the new Add-On Installer on the Installers menu if you have PHP5 or by downloading the 4.6 versions manually from Sourceforge (http://sourceforge.net/project/showfiles.php?group_id=25577).

4) Take your site offline: Site->Global Configuration->Site Offline (YES).
5) Remove the following files and whole directories:

Directories:
/includes/patTemplate
/help

Files:
/includes/mamboxml.php
/globals.php
/administrator/includes/auth.php
/administrator/components/com_weblinks/weblinks_item.xml
/administrator/components/com_languages/admin.languages.html.php
/language/english.xml

6) Run the SQL statements in the file called 455_to_462_upgrade.sql in the upgrades folder via your normal database interface (ie) phpMyAdmin, MySQL commandline, etc. You will need to replace all instances of "#_" with whatever your table prefix is. By default the Mambo table prefix is set at "mos_".

Example: #_containers would change to mos_containers if your table prefix was mos_ (that is a single underscore).

7) Upload and/or extract all files inside the patch into the root of your Mambo installation. Let them overwrite the existing files.
8) Open your configuration.php file
a) Change $mosConfig_helpurl to be $mosConfig_helpurl = 'http://docs.mambo-foundation.org';
b) Change $mosConfig_locale to be $mosConfig_locale = 'en';
c) Verify that $mosConfig_lang = 'english'; (or change if not)
d) Add the following lines:
$mosConfig_usecaptcha = '0';
$mosConfig_locale_use_gettext = 0;
$mosConfig_locale_debug = 0;

9) If you are not utilizing Search Engine Optimization (SEO) within your site then you may skip this step.

If you are currently using SEO within your exisiting 4.5.5 site then you have a bit more work to do/think about. With Mambo 4.6 the SEO/SEF engine was rewritten and thus 4.5.5 style SEF urls will no longer work properly after you upgrade. If you are currently running a 3rd party SEF extension hopefully you have already tested this out with 4.6 as noted in step 1. A number of the 3rd party SEO extensions available were written specifically for the Mambo 4.5 branch and no longer work under Mambo 4.6. So now for what you can/should/and/or/might want to do...

* If you wish to continue utilizing 4.5.5 style urls then you can do this by utilizing the new pre-installed Legacy SEF component (com_legacysef). This was included in the patch by default. In the root of your Mambo installation is a file called htaccess.txt.45x (Note: a backup copy can be found in components/com_sef). You need to rename this file to .htaccess. Be careful to get the right file as there is a similar file named htaccess.txt in the same directory for the 4.6 SEF engine. If you were utilizing SEO with your 4.5.5 site then this file is most likely already in place as .htaccess. To be safe just replace it anyway. With those steps taken your site should continue to work as it has in the past.
* If you wish to utilize the 4.6 SEO engine then you can simply rename the htaccess.txt file found in the root of your Mambo installation to .htaccess. This will cause you some extra work since older 4.5.5 urls will no longer work. You will need to update any hardcoded links on your site for the new 4.6 style SEF urls. It is also worth noting that back-links to articles on your site with older 4.5.5 style urls will also not work.

Of course all of this relies on the fact that you actually have SEO enabled for your site (Global Configuration->SEO Tab->Search Engine Friendly URLs->Yes).

10) Bring your site back online: Site->Global Configuration->Site Offline (NO).
11) Remove the upgrade folder

That's it. Patch complete.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional Note - The following are new features of 4.6 that are not present in the patch from 4.5.5 or the Mambo Lite version of 4.6:

MOStlyCE, MOStlyDBAdmin, mosComment, latest content module, and additional sample templates.

They are present in the full version of 4.6.2 and available as installable addons via the new Add-On installer for those with PHP5 and/or as a manual download from Sourceforge (http://sourceforge.net/project/showfiles.php?group_id=25577).



Wednesday, June 27, 2007

Ini kalo mau coba bikin template untuk mambo :

http://www.mambosolutions.com/dw_tutorial/
hmmhh,, flu brat nih, akhirnya ane bisa juga update mambo dari versi jadul 4.5.2 ke 4.6, efeknya? at least i got the new release product, so it will be more easy to have modification, tapi disini cuma sampe 4.5.3h, selanjutnya pake cara yang sama, copy patchnya ke tempat instalasi, ma backup database.

=========================================================================


How to upgrade from 4.5.2 - 4.5.3h

This guide describes how to update Mambo version 4.5.2 to version 4.5.3h.

First of all,it is important to determine which version of Mambo *exactly* you are running.You can do this by looking in the "includes" folder in your Mambo directory and reading the file named "version.php".


If indeed you are running 4.5.2,you are advised to bring your Mambo up to version 4.5.2.3 before attempting to patch to 4.5.3.For this you will need the Patch_4.5.2_to_4.5.2.3.zip

The first and most basic rule is to back up your current Mambo files before attempting any upgrade - FTP* a copy of your Mambo folder to your PC,or at least copy all your Mambo files to a directory named "backup" outside of public_html, your server web folder.Take a back up of your database too.Here's how.or,at a pinch if you don't have phpMyAdmin,you can use this method though phpMyAdmin is preferable.

* FTP - Windows users should be aware of these issues:http://webtips.dan.info/misc.html

With your back ups safely stored,you can proceed to the next step.Take your Mambo site offline,there are two means of doing this.You can do it via Mambo's Administrator Console Site > Global Configuration > under the "site" tab change Site Offline to "yes".
(you'll need to make configuration.php writable to do it this way.CHMOD 777 is sometimes the only value which works on some servers,and that is scary,even for a moment)

Alternatively,take a copy of configuration.php,open it in a text editor on your computer and set $mosConfig_offline = '0'; to $mosConfig_offline = '1'; upload this modified file in ASCII mode to your server,overwriting the old.You can also do this via cPanel's file editor - but take great care not to insert a carriage return (space) after the final ?> or you will get an array of errors all over the header of your Mambo site which will scare the heck out of you and keep everyone scratching their heads until they figure out the mistake.

Check that your site is now offline by accessing your Mambo URL - taking the site offline during patching is important because your server can lock files and prevent them from being overwritten correctly if you do not.

Next,simply unzip Patch_4.5.2_to_4.5.2.3.zip on your computer,fire up your FTP client and copy the extracted folders and files inside to your Mambo directory,carefully overwriting the corresponding folders/files.Basically,click "Yes" or "O.K" each time your FTP client prompts you,asking if you want to replace the existing folder/files of the same name.*

* See this note from Asphyx:http://forum.mamboserver.com/showpos...21&postcount=5

That done,you can repeat the process with the 4.5.2.3 - 4.5.3h patch.

These are the official patch instructions from within the Patch_4.5.2.3_to_4.5.3h.zip

Mambo 4.5.2.3 to 4.5.3h Patch Installation Instructions:

Below you will find the steps to bring a Mambo 4.5.2.3 system up to the 4.5.3h version. This will NOT bring prior versions up to date. You should first try to bring prior versions up to the 4.5.2.3 patch level before applying the 4.5.3h patch.

Step 1: Backup your site (both database & site files).

Step 2: Take your site offline: Site->Global Configuration->Site Offline (YES).

Step 3: Extract all files inside the patch into your Mambo installation. The files are organized in a hierarchy identical to your 4.5.2.3 install. Let them overwrite the existing files.

Step 4: Log into the Administration system of your Mambo site, goto the Site>Global Configuration screen, click on the "Server" tab and turn ON register globals emulation. With a brand new 453h install this will default to ON, but with the patch you will need to set it manually. Leaving this OFF may cause certain site functions and/or components not to function as expected.

Step 5: Bring your site back online: Site->Global Configuration->Site Offline (NO).

That's it. Patch complete.

Another alternative to the 4.5.3h patch is to simply replace all the core files in your Mambo directory with the full 4.5.3 package.

There are no database upgrades between the above mentioned versions.

Many thanks to maligned-geek for permission to use his upgrade guide