Difference between revisions of "SME Site Maker"

From SME Server
Jump to navigationJump to search
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This script is designed to help you when create a new web site under /opt directory. If you want to create a site under an ibay, do not use this script.
+
{{Languages}}
 
+
<!-- here we define the contrib name variable -->
{{drawBoxNote|content=Please feel free to modify or add info to this howto, and make corrections in typos, because I don't speak English very good. Also to script, you can fix some typos and beautify the code.}}
+
<!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want-->
 +
{{#vardefine:contribname| {{lc: {{#titleparts:  sitemaker  |1}} }} }}
 +
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:  sitemaker  |1}} }} }}
 +
<!-- we define the language -->
 +
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}
  
 
==Purpose==
 
==Purpose==
 +
This script is designed to help you when create a new web site under /opt directory. If you want to create a site under an ibay, do not use this script.
 
The main purpose is to automate the time consuming (and sometimes confusing) process of installing an application to the /opt directory. If you do not use SMESiteMaker you must create the dir, conf files, and DB configs manually from the command line. With SMESiteMaker,  you only have to answer the questions in the wizard.
 
The main purpose is to automate the time consuming (and sometimes confusing) process of installing an application to the /opt directory. If you do not use SMESiteMaker you must create the dir, conf files, and DB configs manually from the command line. With SMESiteMaker,  you only have to answer the questions in the wizard.
  
The script creates the basic environment for your site, such as directory, permissions, apache configuration, add, replace or leave databases and user, and restart the pertinent services. Of course you can edit the final config file (under /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_yourconfname) to add your own parameters, but generally default is ok.
+
The script creates the basic environment for your site, such as directory, permissions, apache configuration, add, replace or leave databases and user, and restart the pertinent services. Of course you can edit the final config file (under /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/'''99SMESiteMaker_''yourconfname''''') to add your own parameters, but generally default is ok.
  
==Usage==
+
=== Version ===
 +
{{ #smeversion: smeserver-sitemaker}}
  
First, download the last attachment from [[Bugzilla:2975]] to any location in your SME.
+
==Installation==
 +
yum --enablerepo=smecontribs install smeserver-sitemaker
  
Then untar the script. In this example I use v1.7:
+
==Uninstall==
  tar xzvf SMESiteMaker_v1.7.tar.gz
+
  yum remove smeserver-sitemaker
 
+
==Usage==
Enter to SMESiteMaker dir.
+
Type at command prompt:
cd SMESiteMaker
+
  smesm
 
 
and finally execute the script
 
sh SMESiteMaker
 
or
 
  ./SMESiteMaker
 
  
 
The script gives you information and prompts for answers at each step.
 
The script gives you information and prompts for answers at each step.
  
==Removal==
+
==Reverting changes==
 
If you make a mistake or want to revert the changes, first remove the directory you choose to locate your site under /opt. Then remove the file /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_yourconfname. If you create a DB then remove DB and User if they are new and no longer needed.
 
If you make a mistake or want to revert the changes, first remove the directory you choose to locate your site under /opt. Then remove the file /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_yourconfname. If you create a DB then remove DB and User if they are new and no longer needed.
  
Line 38: Line 40:
 
==Comments & Support==
 
==Comments & Support==
 
Please, use this thread in the forum for questions or comments:
 
Please, use this thread in the forum for questions or comments:
[http://forums.contribs.org/index.php?topic=36516.msg162056#msg162056 SME SM Forum thread]
+
[http://forums.contribs.org/index.php?topic=38883 New SME SM thread]
  
 +
[http://forums.contribs.org/index.php?topic=36516.msg162056#msg162056 Old SME SM thread]
 +
 +
==Screen Capture==
 +
[[Image:Smesm.png]]
 +
 +
 +
 +
==Improvements==
 +
 +
You can improve the script adding new functions, and specially re-writing my bad english text strings.
 +
 +
You can add functions to handle perl, and custom apache and php directives.
 +
 +
The idea of this script can be used as the new panel development, for add and configure the web site via server-manager.
 +
 +
Here I list the variables used into the script and their signify:
 +
 +
$files_root - Root directory name
 +
$f_root - Root Pathname
 +
$alias_root - HTTP alias choosed
 +
$a_root - HTTP alias configured
 +
$f_ssl - Flag SSLRequireSSL on
 +
$f_idx - Flag Indexes
 +
$f_aov - Flag AllowOverride
 +
$f_php - Flag PHP
 +
$f_fop - Flag allow_url_fopen
 +
$f_eac - Flag Eaccelerator
 +
$f_rgl - Flag register_globals
 +
$f_obd - Flag open_basedir
 +
$open_bd - Open Basedir directories
 +
$fopt - Temp var used in Options
 +
$f_cgi - Flag CGI
 +
$f_cgisamedir - Flag indicating cgi dir is the same as root dir
 +
$cgi_root - CGI directory name
 +
$c_root - CGI pathname configured
 +
$calias_root - CGI alias choosed
 +
$ca_root - Add "/" in CGI Alias
 +
$db_on - Flag MySQL
 +
$db_host - host db
 +
$db_name - name db
 +
$db_pass - pass db
 +
$db_user - user db
 +
$query_file - temp query file
 +
$db_new - temp variable new db
 +
$db_unew - temp variable new user
 +
$custom_httpd_dir - /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
 +
$conf_name - Name for this configuration
 +
$c_name - 99SMESiteMaker_$conf_name
 +
$c_file - $custom_httpd_dir/$c_name
 +
 +
 +
 +
==Bugs==
 +
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title= bugzilla}}
 +
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}
 +
 +
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}}
  
 
==Changelog==
 
==Changelog==
 +
Only released version in smecontrib are listed here.
  
# Author: Normando Hall (PicsOne)
+
{{#smechangelog: {{#var:smecontribname}} }}
# nhall@unixlan.com.ar
 
#
 
# Status
 
# Version: 1.7
 
# 10/04/2007  (d/m/Y)
 
#
 
#
 
# Changelog
 
#
 
# 1.7 (by Normando Hall)
 
# Fix some bugs with MySQL database and users already exists
 
# Set debug output to /opt
 
# Added SME6 support
 
# Improve some functions
 
# Stylize prompt
 
#
 
# 1.5 (by Normando Hall)
 
# Fix some bugs with CGI dir
 
# Added full mysql support
 
#
 
# 1.1 (by Normando Hall)
 
# Added php open_basedir restriction
 
# Set debug variable
 
#
 
# 1.0 (by Normando Hall)
 
# Initial release
 
 
 
  
 
----
 
----
  
[[Category: Howto]]
+
[[Category: Deprecated_Contrib]]
 +
[[Category:Webapps]]

Latest revision as of 07:31, 11 July 2022




Purpose

This script is designed to help you when create a new web site under /opt directory. If you want to create a site under an ibay, do not use this script. The main purpose is to automate the time consuming (and sometimes confusing) process of installing an application to the /opt directory. If you do not use SMESiteMaker you must create the dir, conf files, and DB configs manually from the command line. With SMESiteMaker, you only have to answer the questions in the wizard.

The script creates the basic environment for your site, such as directory, permissions, apache configuration, add, replace or leave databases and user, and restart the pertinent services. Of course you can edit the final config file (under /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_yourconfname) to add your own parameters, but generally default is ok.

Version

smeserver-sitemaker
The latest version of smeserver-sitemaker is available in the SME repository, click on the version number(s) for more information.


Installation

yum --enablerepo=smecontribs install smeserver-sitemaker

Uninstall

yum remove smeserver-sitemaker

Usage

Type at command prompt:

smesm

The script gives you information and prompts for answers at each step.

Reverting changes

If you make a mistake or want to revert the changes, first remove the directory you choose to locate your site under /opt. Then remove the file /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99SMESiteMaker_yourconfname. If you create a DB then remove DB and User if they are new and no longer needed.

Finally expand template and restart the service:

expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart

Adding functionality?

If you improve or add new functions to the script, please update this wiki page and upload the new version at Bugzilla:2975.

Comments & Support

Please, use this thread in the forum for questions or comments: New SME SM thread

Old SME SM thread

Screen Capture

Smesm.png


Improvements

You can improve the script adding new functions, and specially re-writing my bad english text strings.

You can add functions to handle perl, and custom apache and php directives.

The idea of this script can be used as the new panel development, for add and configure the web site via server-manager.

Here I list the variables used into the script and their signify:

$files_root - Root directory name
$f_root - Root Pathname
$alias_root - HTTP alias choosed
$a_root - HTTP alias configured
$f_ssl - Flag SSLRequireSSL on
$f_idx - Flag Indexes
$f_aov - Flag AllowOverride
$f_php - Flag PHP
$f_fop - Flag allow_url_fopen
$f_eac - Flag Eaccelerator
$f_rgl - Flag register_globals
$f_obd - Flag open_basedir
$open_bd - Open Basedir directories
$fopt - Temp var used in Options
$f_cgi - Flag CGI
$f_cgisamedir - Flag indicating cgi dir is the same as root dir
$cgi_root - CGI directory name
$c_root - CGI pathname configured
$calias_root - CGI alias choosed
$ca_root - Add "/" in CGI Alias
$db_on - Flag MySQL
$db_host - host db
$db_name - name db
$db_pass - pass db
$db_user - user db
$query_file - temp query file
$db_new - temp variable new db
$db_unew - temp variable new user
$custom_httpd_dir - /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
$conf_name - Name for this configuration
$c_name - 99SMESiteMaker_$conf_name
$c_file - $custom_httpd_dir/$c_name


Bugs

Please raise bugs under the SME-Contribs section in bugzilla

and select the smeserver-sitemaker component or use this link


Below is an overview of the current issues for this contrib:

No open bugs found.

Changelog

Only released version in smecontrib are listed here.