Tutorial on packaging apps for one click installation
This presentation is the property of its rightful owner.
Sponsored Links
1 / 10

Tutorial On Packaging Apps for One-Click Installation PowerPoint PPT Presentation


  • 64 Views
  • Uploaded on
  • Presentation posted in: General

Tutorial On Packaging Apps for One-Click Installation. A tutorial describing how to package application for one-click installation on Amahi. The basic process is:. 2. 3. 1. Manually Install Application. Specify “Changes” to Automate. Complete “one-click” Installation Form.

Download Presentation

Tutorial On Packaging Apps for One-Click Installation

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Tutorial on packaging apps for one click installation

Tutorial On Packaging Apps for One-Click Installation

A tutorial describing how to package application for one-click installation on Amahi. The basic process is:

2.

3.

1.

Manually

Install Application

Specify “Changes” to Automate

Complete “one-click”

Installation Form

  • Create a Web App Directory using the Amahi User Interface

  • Download the install package from the original site

  • Complete installation instructions

  • Review changes

    • Config files

    • Databases

    • RPMs required

    • Others (?)

  • Work out the steps to create the changes

  • Create the ‘scripts’ required

  • Create a Web App Directory using the Amahi User Interface

  • Download the install package from the original site

  • Complete installation instructions

Note: Refer to wiki for details - http://wiki.amahi.org/index.php/Contributor


1 a manually install the application

1(a) Manually Install the Application

  • Goto http://setup

  • Select the Web App tab (‘soon’ to be a sub-menu in the Applications tab)

    • Create a new Web App ‘coppermine’, this creates the directory

      /var/hda/web-apps/coppermine/html on your HDA

  • From a command prompt in the directory:

    /var/hda/web-apps/coppermine

  • Download the installation package

    wget http://superb-west.dl.sourceforge.net/sourceforge/coppermine/cpg1.4.21.tar.bz2

  • Unzip/Untar the package

    tar –xvf cpg1.4.21.tar.bz2

  • Copy the contents of the unzipped web app folder into the html folder

    cp –rf cpg14x/* html

This tutorial will use the application “Coppermine Gallery” as an example.


1 b manually install the application

1(b) Manually Install the Application

  • Try to launch the Application: http://coppermine

  • It won’t work and will redirect you to complete the installation

    • Follow the instructions to complete the installation

      • Note: the one-click installer normally runs as the apache user, so changing the permissions will not be required in the future

    • Create the database for use by coppermine using the command

      hda-create-db-and-user coppermine

      (creates a database with user and password named coppermine)

    • Also, there is an RPM required: yum installImageMagick

  • You are now ready to find the files/database create/edited by the installation process

Complete the installation:


2 a specify changes to automate

2(a) Specify Changes to Automate

  • Look to see what installation files have changed. The “brute force method” is to take a “difference” of the original unzipped directory and the installed directory

    diff –r –N –U3 /var/hda/web-apps/coppermine/cpg14x /var/hda/web-apps/coppermine/html > diff.install.txt

  • You can view the created text file diff.install.txt and you can see the files edited

    • include/config.inc.php

    • include/install.lock

  • From this file you will create part of the install script (each diff command can be used to apply the changes to the original files!)

Seek out and understand the changes performed by the installation.


2 b specify changes to automate

2(b) Specify Changes to Automate

  • Look for the database creation script in the install directory. You will find three .sql script files:

    • schema.Sql, basic.sql, update.sql

      (on inspection the first two have to be run to create the database)

  • Experimenting with these shows they are NOT complete enough to build the installed database – we will use another method to do this. From the command line dump the database:

    mysqldump –-add-drop-table –u coppermine –pcoppermine coppermine >db.txt

    (unfortunately this makes a file too big to be in the install script)

  • Comparing the dump with the schema.sql file, a smaller install script for the database can be created – (see next page for the MySQL script!)

See how the database was created!


Supplemental install script for db

(Supplemental Install Script for DB)

Note: Download the file to see the actual text (if you want all the detail!)

SET @scc = @@character_set_client;

SET character_set_client = utf8;

INSERT INTO `CPG_bridge` VALUES ('short_name',''),('license_number',''),('db_database_name',''),('db_hostname',''),('db_username',''),('db_password',''),('full_forum_url',''),('relative_path_of_forum_from_webroot',''),('relative_path_to_config_file',''),('logout_flag',''),('use_post_based_groups',''),('cookie_prefix',''),('table_prefix',''),('user_table',''),('session_table',''),('group_table',''),('group_relation_table',''),('group_mapping_table',''),('use_standard_groups','1'),('validating_group',''),('guest_group',''),('member_group',''),('admin_group',''),('banned_group',''),('global_moderators_group',''),('recovery_logon_failures','0'),('recovery_logon_timestamp','');

INSERT INTO `CPG_categories` VALUES (1,0,'User galleries','This category contains albums that belong to Coppermine users.',0,0,0);

INSERT INTO `CPG_config` VALUES ('albums_per_page','12'),('album_list_cols','2'),('display_pic_info','0'),('alb_list_thumb_size','50'),('allowed_mov_types','ALL'),('allowed_doc_types','doc/txt/rtf/pdf/xls/pps/ppt/zip/gz/mdb'),('allowed_snd_types','mp3/midi/mid/wma/wav/ogg'),('allowed_img_types','ALL'),('allow_private_albums','1'),('allow_user_registration','0'),('allow_unlogged_access','1'),('allow_duplicate_emails_addr','0'),('caption_in_thumbview','1'),('views_in_thumbview','1'),('charset','utf-8'),('cookie_name','coppermine'),('cookie_path','/'),('debug_mode','0'),('debug_notice','0'),('default_dir_mode','0755'),('default_file_mode','0644'),('default_sort_order','na'),('ecards_more_pic_target','http://coppermine.sourceforge.net/'),('home_target','index.php'),('custom_lnk_name',''),('custom_lnk_url',''),('enable_smilies','1'),('filter_bad_words','0'),('forbiden_fname_char','$/\\\\:*?"\'<>|` &'),('fullpath','albums/'),('gallery_admin_email',[email protected]'),('gallery_description','Your online photo album'),('gallery_name','Coppermine Photo Gallery'),('im_options','-antialias'),('impath',''),('jpeg_qual','80'),('keep_votes_time','30'),('lang','english'),('main_page_layout','breadcrumb/catlist/alblist/random,2/lastup,2'),('main_table_width','100%'),('make_intermediate','1'),('max_com_lines','10'),('max_com_size','512'),('max_com_wlength','38'),('max_img_desc_length','512'),('max_tabs','12'),('max_upl_size','1024'),('max_upl_width_height','2048'),('auto_resize','0'),('min_votes_for_rating','1'),('normal_pfx','normal_'),('offline','0'),('picture_table_width','600'),('picture_width','400'),('read_exif_data','0'),('reg_requires_valid_email','1'),('subcat_level','2'),('theme','core'),('thumbcols','4'),('thumbrows','3'),('thumb_method','im'),('thumb_pfx','thumb_'),('thumb_width','100'),('userpics','userpics/'),('vanity_block','1'),('user_profile1_name','Location'),('user_profile2_name','Interests'),('user_profile3_name','Website'),('user_profile4_name','Occupation'),('user_profile5_name',''),('user_profile6_name','Biography'),('user_field1_name',''),('user_field2_name',''),('user_field3_name',''),('user_field4_name',''),('display_comment_count','0'),('show_private','0'),('first_level','1'),('display_film_strip','1'),('display_film_strip_filename','0'),('max_film_strip_items','5'),('thumb_use','any'),('read_iptc_data','0'),('reg_notify_admin_email','0'),('disable_comment_flood_protect','0'),('upl_notify_admin_email','0'),('display_uploader','0'),('display_filename','0'),('language_list','0'),('language_flags','0'),('theme_list','0'),('language_reset','1'),('theme_reset','1'),('allow_memberlist','0'),('display_faq','0'),('show_bbcode_help','1'),('log_ecards','0'),('email_comment_notification','0'),('enable_zipdownload','1'),('slideshow_interval','5000'),('log_mode','0'),('media_autostart','1'),('enable_encrypted_passwords','1'),('time_offset','0'),('ban_private_ip','0'),('smtp_host',''),('smtp_username',''),('smtp_password',''),('enable_plugins','1'),('enable_help','2'),('categories_alpha_sort','0'),('login_threshold','5'),('login_expiry','10'),('allow_email_change','0'),('clickable_keyword_search','1'),('users_can_edit_pics','0'),('show_which_exif','|0|0|0|0|0|0|0|0|1|0|1|1|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|1|0|0|0|1|1|0|0|0|0|1|0|0|0|1|0|0|1|1|0|0|0|0|0|1|0|1|1'),('link_pic_count','0'),('bridge_enable','0'),('language_fallback','1'),('vote_details','0'),('hit_details','0'),('browse_batch_add','1'),('custom_header_path',''),('custom_footer_path',''),('comments_sort_descending','0'),('report_post','0'),('comments_anon_pfx','Guest_'),('admin_activation','0');

INSERT INTO `CPG_filetypes` VALUES ('jpg','image/jpg','image',''),('jpeg','image/jpeg','image',''),('jpe','image/jpe','image',''),('gif','image/gif','image',''),('png','image/png','image',''),('bmp','image/bmp','image',''),('jpc','image/jpc','image',''),('jp2','image/jp2','image',''),('jpx','image/jpx','image',''),('jb2','image/jb2','image',''),('swc','image/swc','image',''),('iff','image/iff','image',''),('asf','video/x-ms-asf','movie','WMP'),('asx','video/x-ms-asx','movie','WMP'),('mpg','video/mpeg','movie','WMP'),('mpeg','video/mpeg','movie','WMP'),('wmv','video/x-ms-wmv','movie','WMP'),('swf','application/x-shockwave-flash','movie','SWF'),('avi','video/avi','movie','WMP'),('mov','video/quicktime','movie','QT'),('mp3','audio/mpeg3','audio','WMP'),('midi','audio/midi','audio','WMP'),('mid','audio/midi','audio','WMP'),('wma','audio/x-ms-wma','audio','WMP'),('wav','audio/wav','audio','WMP'),('ogg','audio/ogg','audio',''),('psd','image/psd','image',''),('ram','audio/x-pn-realaudio','document','RMP'),('ra','audio/x-realaudio','document','RMP'),('rm','audio/x-realmedia','document','RMP'),('tiff','image/tiff','document',''),('tif','image/tif','document',''),('doc','application/msword','document',''),('txt','text/plain','document',''),('rtf','text/richtext','document',''),('pdf','application/pdf','document',''),('xls','application/excel','document',''),('pps','application/powerpoint','document',''),('ppt','application/powerpoint','document',''),('zip','application/zip','document',''),('rar','application/rar','document',''),('gz','application/gz','document',''),('mdb','application/msaccess','document','');

INSERT INTO `CPG_usergroups` VALUES (1,'Administrators',0,1,1,1,1,1,1,0,0,3,0,5,3),(2,'Registered',1024,0,1,1,1,1,1,1,0,3,0,5,3),(3,'Anonymous',0,0,1,0,0,0,0,1,1,0,0,5,3),(4,'Banned',0,0,0,0,0,0,0,1,1,0,0,5,3);

CREATE TABLE `cpg14x_albums` (

`aid` int(11) NOT NULL auto_increment,

`title` varchar(255) NOT NULL default '',

`description` text NOT NULL,

`visibility` int(11) NOT NULL default '0',

`uploads` enum('YES','NO') NOT NULL default 'NO',

`comments` enum('YES','NO') NOT NULL default 'YES',

`votes` enum('YES','NO') NOT NULL default 'YES',

`pos` int(11) NOT NULL default '0',

`category` int(11) NOT NULL default '0',

`thumb` int(11) NOT NULL default '0',

`keyword` varchar(50) default NULL,

`alb_password` varchar(32) default NULL,

`alb_password_hint` text,

PRIMARY KEY (`aid`),

KEY `alb_category` (`category`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store albums';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_banned` (

`ban_id` int(11) NOT NULL auto_increment,

`user_id` int(11) default NULL,

`ip_addr` tinytext,

`expiry` datetime default NULL,

`brute_force` tinyint(5) NOT NULL default '0',

PRIMARY KEY (`ban_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Data about banned users';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_bridge` (

`name` varchar(40) NOT NULL default '0',

`value` varchar(255) NOT NULL default '',

UNIQUE KEY `name` (`name`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stores the bridging data, not used when unbridged';

SET character_set_client = @scc;

INSERT INTO `cpg14x_bridge` VALUES ('short_name',''),('license_number',''),('db_database_name',''),('db_hostname',''),('db_username',''),('db_password',''),('full_forum_url',''),('relative_path_of_forum_from_webroot',''),('relative_path_to_config_file',''),('logout_flag',''),('use_post_based_groups',''),('cookie_prefix',''),('table_prefix',''),('user_table',''),('session_table',''),('group_table',''),('group_relation_table',''),('group_mapping_table',''),('use_standard_groups','1'),('validating_group',''),('guest_group',''),('member_group',''),('admin_group',''),('banned_group',''),('global_moderators_group',''),('recovery_logon_failures','0'),('recovery_logon_timestamp','');

CREATE TABLE `cpg14x_categories` (

`cid` int(11) NOT NULL auto_increment,

`owner_id` int(11) NOT NULL default '0',

`name` varchar(255) NOT NULL default '',

`description` text NOT NULL,

`pos` int(11) NOT NULL default '0',

`parent` int(11) NOT NULL default '0',

`thumb` int(11) NOT NULL default '0',

PRIMARY KEY (`cid`),

KEY `cat_parent` (`parent`),

KEY `cat_pos` (`pos`),

KEY `cat_owner_id` (`owner_id`)

) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COMMENT='Used to store categories';

SET character_set_client = @scc;

INSERT INTO `cpg14x_categories` VALUES (1,0,'User galleries','This category contains albums that belong to Coppermine users.',0,0,0);

CREATE TABLE `cpg14x_comments` (

`pid` mediumint(10) NOT NULL default '0',

`msg_id` mediumint(10) NOT NULL auto_increment,

`msg_author` varchar(25) NOT NULL default '',

`msg_body` text NOT NULL,

`msg_date` datetime NOT NULL default '0000-00-00 00:00:00',

`msg_raw_ip` tinytext,

`msg_hdr_ip` tinytext,

`author_md5_id` varchar(32) NOT NULL default '',

`author_id` int(11) NOT NULL default '0',

PRIMARY KEY (`msg_id`),

KEY `com_pic_id` (`pid`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store comments made on pics';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_config` (

`name` varchar(40) NOT NULL default '',

`value` varchar(255) NOT NULL default '',

PRIMARY KEY (`name`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store the configuration options';

SET character_set_client = @scc;

INSERT INTO `cpg14x_config` VALUES ('albums_per_page','12'),('album_list_cols','2'),('display_pic_info','0'),('alb_list_thumb_size','50'),('allowed_mov_types','ALL'),('allowed_doc_types','doc/txt/rtf/pdf/xls/pps/ppt/zip/gz/mdb'),('allowed_snd_types','mp3/midi/mid/wma/wav/ogg'),('allowed_img_types','ALL'),('allow_private_albums','1'),('allow_user_registration','0'),('allow_unlogged_access','1'),('allow_duplicate_emails_addr','0'),('caption_in_thumbview','1'),('views_in_thumbview','1'),('charset','utf-8'),('cookie_name','coppermine'),('cookie_path','/'),('debug_mode','0'),('debug_notice','0'),('default_dir_mode','0755'),('default_file_mode','0644'),('default_sort_order','na'),('ecards_more_pic_target','http://coppermine/'),('home_target','index.php'),('custom_lnk_name',''),('custom_lnk_url',''),('enable_smilies','1'),('filter_bad_words','0'),('forbiden_fname_char','$/\\\\:*?"\'<>|` &'),('fullpath','albums/'),('gallery_admin_email',''),('gallery_description','Your online photo album'),('gallery_name','Coppermine Photo Gallery'),('im_options','-antialias'),('impath','/usr/bin/'),('jpeg_qual','80'),('keep_votes_time','30'),('lang','english'),('main_page_layout','breadcrumb/catlist/alblist/random,2/lastup,2'),('main_table_width','100%'),('make_intermediate','1'),('max_com_lines','10'),('max_com_size','512'),('max_com_wlength','38'),('max_img_desc_length','512'),('max_tabs','12'),('max_upl_size','1024'),('max_upl_width_height','2048'),('auto_resize','0'),('min_votes_for_rating','1'),('normal_pfx','normal_'),('offline','0'),('picture_table_width','600'),('picture_width','400'),('read_exif_data','0'),('reg_requires_valid_email','1'),('subcat_level','2'),('theme','core'),('thumbcols','4'),('thumbrows','3'),('thumb_method','im'),('thumb_pfx','thumb_'),('thumb_width','100'),('userpics','userpics/'),('vanity_block','1'),('user_profile1_name','Location'),('user_profile2_name','Interests'),('user_profile3_name','Website'),('user_profile4_name','Occupation'),('user_profile5_name',''),('user_profile6_name','Biography'),('user_field1_name',''),('user_field2_name',''),('user_field3_name',''),('user_field4_name',''),('display_comment_count','0'),('show_private','0'),('first_level','1'),('display_film_strip','1'),('display_film_strip_filename','0'),('max_film_strip_items','5'),('thumb_use','any'),('read_iptc_data','0'),('reg_notify_admin_email','0'),('disable_comment_flood_protect','0'),('upl_notify_admin_email','0'),('display_uploader','0'),('display_filename','0'),('language_list','0'),('language_flags','0'),('theme_list','0'),('language_reset','1'),('theme_reset','1'),('allow_memberlist','0'),('display_faq','0'),('show_bbcode_help','1'),('log_ecards','0'),('email_comment_notification','0'),('enable_zipdownload','1'),('slideshow_interval','5000'),('log_mode','0'),('media_autostart','1'),('enable_encrypted_passwords','1'),('time_offset','0'),('ban_private_ip','0'),('smtp_host',''),('smtp_username',''),('smtp_password',''),('enable_plugins','1'),('enable_help','2'),('categories_alpha_sort','0'),('login_threshold','5'),('login_expiry','10'),('allow_email_change','0'),('clickable_keyword_search','1'),('users_can_edit_pics','0'),('show_which_exif','|0|0|0|0|0|0|0|0|1|0|1|1|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|1|0|0|0|1|1|0|0|0|0|1|0|0|0|1|0|0|1|1|0|0|0|0|0|1|0|1|1'),('link_pic_count','0'),('bridge_enable','0'),('language_fallback','1'),('vote_details','0'),('hit_details','0'),('browse_batch_add','1'),('custom_header_path',''),('custom_footer_path',''),('comments_sort_descending','0'),('report_post','0'),('comments_anon_pfx','Guest_'),('admin_activation','0');

CREATE TABLE `cpg14x_dict` (

`keyId` bigint(20) NOT NULL auto_increment,

`keyword` varchar(60) NOT NULL default '',

PRIMARY KEY (`keyId`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Holds the keyword dictionary';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_ecards` (

`eid` int(11) NOT NULL auto_increment,

`sender_name` varchar(50) NOT NULL default '',

`sender_email` text NOT NULL,

`recipient_name` varchar(50) NOT NULL default '',

`recipient_email` text NOT NULL,

`link` text NOT NULL,

`date` tinytext NOT NULL,

`sender_ip` tinytext NOT NULL,

PRIMARY KEY (`eid`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to log ecards';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_exif` (

`filename` varchar(255) NOT NULL default '',

`exifData` text NOT NULL,

UNIQUE KEY `filename` (`filename`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stores EXIF data from individual pics';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_favpics` (

`user_id` int(11) NOT NULL,

`user_favpics` text NOT NULL,

PRIMARY KEY (`user_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stores the server side favourites';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_filetypes` (

`extension` char(7) NOT NULL default '',

`mime` char(30) default NULL,

`content` char(15) default NULL,

`player` varchar(5) default NULL,

PRIMARY KEY (`extension`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store the file extensions';

SET character_set_client = @scc;

INSERT INTO `cpg14x_filetypes` VALUES ('jpg','image/jpg','image',''),('jpeg','image/jpeg','image',''),('jpe','image/jpe','image',''),('gif','image/gif','image',''),('png','image/png','image',''),('bmp','image/bmp','image',''),('jpc','image/jpc','image',''),('jp2','image/jp2','image',''),('jpx','image/jpx','image',''),('jb2','image/jb2','image',''),('swc','image/swc','image',''),('iff','image/iff','image',''),('asf','video/x-ms-asf','movie','WMP'),('asx','video/x-ms-asx','movie','WMP'),('mpg','video/mpeg','movie','WMP'),('mpeg','video/mpeg','movie','WMP'),('wmv','video/x-ms-wmv','movie','WMP'),('swf','application/x-shockwave-flash','movie','SWF'),('avi','video/avi','movie','WMP'),('mov','video/quicktime','movie','QT'),('mp3','audio/mpeg3','audio','WMP'),('midi','audio/midi','audio','WMP'),('mid','audio/midi','audio','WMP'),('wma','audio/x-ms-wma','audio','WMP'),('wav','audio/wav','audio','WMP'),('ogg','audio/ogg','audio',''),('psd','image/psd','image',''),('ram','audio/x-pn-realaudio','document','RMP'),('ra','audio/x-realaudio','document','RMP'),('rm','audio/x-realmedia','document','RMP'),('tiff','image/tiff','document',''),('tif','image/tif','document',''),('doc','application/msword','document',''),('txt','text/plain','document',''),('rtf','text/richtext','document',''),('pdf','application/pdf','document',''),('xls','application/excel','document',''),('pps','application/powerpoint','document',''),('ppt','application/powerpoint','document',''),('zip','application/zip','document',''),('rar','application/rar','document',''),('gz','application/gz','document',''),('mdb','application/msaccess','document','');

CREATE TABLE `cpg14x_hit_stats` (

`sid` int(11) NOT NULL auto_increment,

`pid` varchar(100) NOT NULL default '',

`ip` varchar(20) NOT NULL default '',

`search_phrase` varchar(255) NOT NULL default '',

`sdate` bigint(20) NOT NULL default '0',

`referer` text NOT NULL,

`browser` varchar(255) NOT NULL default '',

`os` varchar(50) NOT NULL default '',

PRIMARY KEY (`sid`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Detailed stats about hits, only used when enabled';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_pictures` (

`pid` int(11) NOT NULL auto_increment,

`aid` int(11) NOT NULL default '0',

`filepath` varchar(255) NOT NULL default '',

`filename` varchar(255) NOT NULL default '',

`filesize` int(11) NOT NULL default '0',

`total_filesize` int(11) NOT NULL default '0',

`pwidth` smallint(6) NOT NULL default '0',

`pheight` smallint(6) NOT NULL default '0',

`hits` int(10) NOT NULL default '0',

`mtime` datetime NOT NULL default '0000-00-00 00:00:00',

`ctime` int(11) NOT NULL default '0',

`owner_id` int(11) NOT NULL default '0',

`owner_name` varchar(40) NOT NULL default '',

`pic_rating` int(11) NOT NULL default '0',

`votes` int(11) NOT NULL default '0',

`title` varchar(255) NOT NULL default '',

`caption` text NOT NULL,

`keywords` varchar(255) NOT NULL default '',

`approved` enum('YES','NO') NOT NULL default 'NO',

`galleryicon` int(11) NOT NULL default '0',

`user1` varchar(255) NOT NULL default '',

`user2` varchar(255) NOT NULL default '',

`user3` varchar(255) NOT NULL default '',

`user4` varchar(255) NOT NULL default '',

`url_prefix` tinyint(4) NOT NULL default '0',

`pic_raw_ip` tinytext,

`pic_hdr_ip` tinytext,

`lasthit_ip` tinytext,

`position` int(11) NOT NULL default '0',

PRIMARY KEY (`pid`),

KEY `owner_id` (`owner_id`),

KEY `pic_hits` (`hits`),

KEY `pic_rate` (`pic_rating`),

KEY `aid_approved` (`aid`,`approved`),

KEY `pic_aid` (`aid`),

FULLTEXT KEY `search` (`title`,`caption`,`keywords`,`filename`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store data about individual pics';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_plugins` (

`plugin_id` int(10) unsigned NOT NULL auto_increment,

`name` varchar(64) NOT NULL default '',

`path` varchar(128) NOT NULL default '',

`priority` int(10) unsigned NOT NULL default '0',

PRIMARY KEY (`plugin_id`),

UNIQUE KEY `name` (`name`),

UNIQUE KEY `path` (`path`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stores the plugins';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_sessions` (

`session_id` varchar(40) NOT NULL default '',

`user_id` int(11) default '0',

`time` int(11) default NULL,

`remember` int(1) default '0',

PRIMARY KEY (`session_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store sessions';

SET character_set_client = @scc;

INSERT INTO `cpg14x_sessions` VALUES ('9517276809000de5031787e9e3f3645d',1,1240951164,0);

CREATE TABLE `cpg14x_temp_data` (

`unique_ID` char(8) NOT NULL,

`encoded_string` blob NOT NULL,

`timestamp` int(11) unsigned NOT NULL,

PRIMARY KEY (`unique_ID`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Holds temporary file data for multiple file uploads';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_usergroups` (

`group_id` int(11) NOT NULL auto_increment,

`group_name` varchar(255) NOT NULL default '',

`group_quota` int(11) NOT NULL default '0',

`has_admin_access` tinyint(4) NOT NULL default '0',

`can_rate_pictures` tinyint(4) NOT NULL default '0',

`can_send_ecards` tinyint(4) NOT NULL default '0',

`can_post_comments` tinyint(4) NOT NULL default '0',

`can_upload_pictures` tinyint(4) NOT NULL default '0',

`can_create_albums` tinyint(4) NOT NULL default '0',

`pub_upl_need_approval` tinyint(4) NOT NULL default '1',

`priv_upl_need_approval` tinyint(4) NOT NULL default '1',

`upload_form_config` tinyint(4) NOT NULL default '3',

`custom_user_upload` tinyint(4) NOT NULL default '0',

`num_file_upload` tinyint(4) NOT NULL default '5',

`num_URI_upload` tinyint(4) NOT NULL default '3',

PRIMARY KEY (`group_id`)

) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COMMENT='Used to store user groups';

SET character_set_client = @scc;

INSERT INTO `cpg14x_usergroups` VALUES (1,'Administrators',0,1,1,1,1,1,1,0,0,3,0,5,3),(2,'Registered',1024,0,1,1,1,1,1,1,0,3,0,5,3),(3,'Anonymous',0,0,1,0,0,0,0,1,1,0,0,5,3),(4,'Banned',0,0,0,0,0,0,0,1,1,0,0,5,3);

CREATE TABLE `cpg14x_users` (

`user_id` int(11) NOT NULL auto_increment,

`user_group` int(11) NOT NULL default '2',

`user_active` enum('YES','NO') NOT NULL default 'NO',

`user_name` varchar(25) NOT NULL default '',

`user_password` varchar(40) NOT NULL default '',

`user_lastvisit` datetime NOT NULL default '0000-00-00 00:00:00',

`user_regdate` datetime NOT NULL default '0000-00-00 00:00:00',

`user_group_list` varchar(255) NOT NULL default '',

`user_email` varchar(255) NOT NULL default '',

`user_profile1` varchar(255) NOT NULL default '',

`user_profile2` varchar(255) NOT NULL default '',

`user_profile3` varchar(255) NOT NULL default '',

`user_profile4` varchar(255) NOT NULL default '',

`user_profile5` varchar(255) NOT NULL default '',

`user_profile6` text NOT NULL,

`user_actkey` varchar(32) NOT NULL default '',

PRIMARY KEY (`user_id`),

UNIQUE KEY `user_name` (`user_name`)

) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COMMENT='Used to store users, not used when bridged';

SET character_set_client = @scc;

INSERT INTO `cpg14x_users` VALUES (1,1,'YES','admin','21232f297a57a5a743894a0e4a801fc3','2009-04-28 13:39:21','2009-04-28 13:39:17','','','','','','','','','');

CREATE TABLE `cpg14x_vote_stats` (

`sid` int(11) NOT NULL auto_increment,

`pid` varchar(100) NOT NULL default '',

`rating` smallint(6) NOT NULL default '0',

`ip` varchar(20) NOT NULL default '',

`sdate` bigint(20) NOT NULL default '0',

`referer` text NOT NULL,

`browser` varchar(255) NOT NULL default '',

`os` varchar(50) NOT NULL default '',

PRIMARY KEY (`sid`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Detailed stats about votes, only used when enabled';

SET character_set_client = @scc;

CREATE TABLE `cpg14x_votes` (

`pic_id` mediumint(9) NOT NULL default '0',

`user_md5_id` varchar(32) NOT NULL default '',

`vote_time` int(11) NOT NULL default '0',

PRIMARY KEY (`pic_id`,`user_md5_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stores votes for individual pics';

SET character_set_client = @scc;


3 complete one click install form

3. Complete One-Click Install Form

  • In general this is the order of the process the one-click installer does:

    • 1. Install (if any) RPM dependencies

    • 2. Install (if any) RPM packages (cross check SHA1SUM for download)

    • 3. Create the “Web App” for the installation

    • 4. Download (if any) tarball

    • 5. cross check tarball SHA1SUM for validity of download

    • 6. untar the tarball (assume the tarball untars into a single folder)

    • 7. rename the untarred folder ‘html’ in the install directory

This information is provided as background.


3 a complete one click install form

3(a). Complete One-Click Install Form

  • “Special things” (beyond the obvious) to complete for this install:

    • RPM dependencies: ImageMagicK

    • Install script based on the diff file created, and the need to create the database

Details on the Field to complete are at http://wiki.amahi.org/index.php/Application_Packaging

Diff for the config.inc.php file

Patch –p0 –f –E <<'EOF'

--- /var/hda/web-apps/coppermine/cpg14x/include/config.inc.php1969-12-31 16:00:00.000000000 -0800

+++ /var/hda/web-apps/coppermine/html/include/config.inc.php2009-04-28 13:22:42.000000000 -0700

@@ -0,0 +1,13 @@

+<?php

+// Coppermine configuration file

+

+// MySQL configuration

+$CONFIG['dbserver'] = 'localhost'; // Your database server

+$CONFIG['dbuser'] = 'coppermine'; // Your mysql username

+$CONFIG['dbpass'] = 'coppermine'; // Your mysql password

+$CONFIG['dbname'] = 'coppermine'; // Your mysql database name

+

+

+// MySQL TABLE NAMES PREFIX

+$CONFIG['TABLE_PREFIX'] = 'cpg14x_';

+?>

EOF


3 b complete one click install form

3(b). Complete One-Click Install Form

  • Create the database for Coppermine:

Diff for the install.lock file

Patch –p0 –f –E <<'EOF'

@@ -0,0 +1 @@

+locked

EOF

mysql –u coppermine –pcoppermine coppermine < html/sql/schema.sql

mysql –u coppermine –pcoppermine coppermine <<'EOF'

SET @scc = @@character_set_client;

SET character_set_client = utf8;

INSERT INTO `CPG_bridge` VALUES ('short_name',''),('license_number',''),('db_database_name',''),('db_hostname',''),('db_username',''),('db_password',''),('full_forum_url',''),('relative_path_of_forum_from_webroot',''),('relative_path_to_config_file',''),('logout_flag',''),('use_post_based_groups',''),('cookie_prefix',''),('table_prefix',''),('user_table',''),('session_table',''),('group_table',''),('group_relation_table',''),('group_mapping_table',''),('use_standard_groups','1'),('validating_group',''),('guest_group',''),('member_group',''),('admin_group',''),('banned_group',''),('global_moderators_group',''),('recovery_logon_failures','0'),('recovery_logon_timestamp','');

…………

…………

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Stores votes for individual pics';

SET character_set_client = @scc;

EOF

All the content of this file:


Support

Support

  • If you get stuck, don’t hesitate to

    • come by the IRC channel

    • post questions http://forums.amahi.org


  • Login