Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial On Packaging Apps for One-Click Installation

Similar presentations


Presentation on theme: "Tutorial On Packaging Apps for One-Click Installation"— Presentation transcript:

1 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: Manually Install Application 1. Specify “Changes” to Automate 2. 3. 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 -

2 1(a) Manually Install the Application
This tutorial will use the application “Coppermine Gallery” as an example. Goto 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 Unzip/Untar the package tar –xvf cpg tar.bz2 Copy the contents of the unzipped web app folder into the html folder cp –rf cpg14x/* html

3 1(b) Manually Install the Application
Complete the installation: Try to launch the Application: 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 install ImageMagick You are now ready to find the files/database create/edited by the installation process

4 2(a) Specify Changes to Automate
Seek out and understand the changes performed by the installation. 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!)

5 2(b) Specify Changes to Automate
See how the database was created! 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!)

6 (Supplemental Install Script for DB)
Note: Download the file to see the actual text (if you want all the detail!) = 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_ s_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',' 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_ ','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_ ','0'),('disable_comment_flood_protect','0'),('upl_notify_admin_ ','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'),(' _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_ _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 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'; 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'; 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 '', `parent` 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'; 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 ' :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'; CREATE TABLE `cpg14x_config` ( `name` varchar(40) NOT NULL default '', PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store the configuration options'; 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_ s_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',' &'),('fullpath','albums/'),('gallery_admin_ ',''),('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_ ','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_ ','0'),('disable_comment_flood_protect','0'),('upl_notify_admin_ ','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'),(' _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_ _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'; CREATE TABLE `cpg14x_ecards` ( `eid` int(11) NOT NULL auto_increment, `sender_name` varchar(50) NOT NULL default '', `sender_ ` text NOT NULL, `recipient_name` varchar(50) NOT NULL default '', `recipient_ ` 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'; 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'; 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'; 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'; 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'; CREATE TABLE `cpg14x_pictures` ( `pid` int(11) NOT NULL auto_increment, `aid` int(11) NOT NULL default '0', `filepath` 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 ' :00:00', `ctime` 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', `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'; 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'; 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'; INSERT INTO `cpg14x_sessions` VALUES (' de e9e3f3645d',1, ,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'; 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'; 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 ' :00:00', `user_regdate` datetime NOT NULL default ' :00:00', `user_group_list` varchar(255) NOT NULL default '', `user_ ` 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'; INSERT INTO `cpg14x_users` VALUES (1,1,'YES','admin','21232f297a57a5a743894a0e4a801fc3',' :39:21',' :39:17','','','','','','','','',''); CREATE TABLE `cpg14x_vote_stats` ( `rating` smallint(6) NOT NULL default '0', ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Detailed stats about votes, only used when enabled'; 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';

7 3. Complete One-Click Install Form
This information is provided as background. 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

8 3(a). Complete One-Click Install Form
Details on the Field to complete are at “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 Diff for the config.inc.php file Patch –p0 –f –E <<'EOF' --- /var/hda/web-apps/coppermine/cpg14x/include/config.inc.php :00: +++ /var/hda/web-apps/coppermine/html/include/config.inc.php :22: -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

9 3(b). Complete One-Click Install Form
Diff for the install.lock file Patch –p0 –f –E <<'EOF' -0,0 +1 +locked EOF Create the database for Coppermine: mysql –u coppermine –pcoppermine coppermine < html/sql/schema.sql mysql –u coppermine –pcoppermine coppermine <<'EOF' = 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 EOF All the content of this file:

10 If you get stuck, don’t hesitate to
Support If you get stuck, don’t hesitate to come by the IRC channel post questions


Download ppt "Tutorial On Packaging Apps for One-Click Installation"

Similar presentations


Ads by Google