Migracao da Twiki para Sprace.

Description

Migramos a twiki da hep.ift.unesp.br para o domínio www.sprace.org.br. Primeiro instalamos a Twiki na sprace:
[root@sprace ~]# mkdir /var/www/html/Twiki
[root@sprace ~]# cd /var/www/html/Twiki
[root@sprace Twiki]# wget http://twiki.org/p/pub/Codev/Release/TWiki-4.1.2.tgz
[root@sprace Twiki]# tar -xvzf TWiki-4.1.2.tgz
[root@sprace Twiki]# cd bin
[root@sprace bin]# cp LocalLib.cfg.txt LocalLib.cfg
[root@sprace bin]#vim LocalLib.cfg
Neste arquivo devemos editar o $twikiLibPath, para
$twikiLibPath = "/var/www/html/Twiki/lib/";
  • Agora iremos verificar permissões:
[root@sprace bin]# chown -R apache:apache /var/www/html/Twiki
foi criado um script para setar as permissões, com o nome de permissons:
[root@sprace bin]# cd /var/www/html/Twiki
[root@sprace Twiki]# more permissions
find . -type d -print -exec chmod -v 755 {} \;
find data -name '*.txt' -type f -exec chmod -v 644 {} \;
find data pub -name '*,v' -type f -exec chmod -v 444 {} \;
find lib -name '*.pm' -type f -exec chmod -v 444 {} \;
find locale -type f -exec chmod -v 444 {} \;
find pub -type f -exec chmod -v 644 {} \;
find pub/TWiki/KupuContrib -type f -exec chmod -v 444 {} \;
find bin -type f -exec chmod -v 555 {} \;
find bin/logos -type f -exec chmod -v 444 {} \;
find templates -type f -exec chmod -v 444 {} \;
find tools -type f -exec chmod -v 555 {} \;
chmod -v 644 lib/LocalSite.cfg
chmod -v 644 data/.htpasswd
chmod -v 644 data/mime.types
chmod -v 444 bin/LocalLib.cfg.txt
chmod -v 444 bin/.htaccess.txt
chmod -v 444 pub/_work_areas/.htaccess
chmod -v 444 pub/_work_areas/README
chmod -v 444 AUTHORS COPYING COPYRIGHT index.html INSTALL.html LICENSE pub-htaccess.txt readme.txt robots.txt root-htaccess.txt subdir-htaccess.txt TWikiHistory.html twiki_httpd_conf.txt TWikiReleaseNotes04x01.html
  • Configurar o httpd, adicionando estas linhas no
[root@sprace data]# less /etc/httpd/conf/httpd.conf
#______________Configuração para a Twiki_________________
ScriptAlias /twiki/bin/ "/var/www/html/Twiki/bin/"
#onde esta instalada a twiki
Alias /twiki/ "/var/www/html/Twiki"
#colocando blockAcess para previnir Denial of Service (DOS)
BrowserMatchNoCase ^$ blockAccess
#Scripts Twiki

        AllowOverride None
        Order Allow,Deny
        Allow from all
        Deny from env=blockAccess

        Options ExecCGI FollowSymLinks
        SetHandler cgi-script
        #Arquivo de entrada para os usuários da Twiki
        AuthUserFile /var/www/html/Twiki/data/.htpasswd
        AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to
register if you do not have one.'
        AuthType Basic

        # Caso o password seja errado:
        ErrorDocument 401 /twiki/bin/view/TWiki/TWikiRegistration
#Não deixa o configure para o resto do munto
#Deixa somente alguns ips funcionarem

        SetHandler cgi-script
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1 192.168.1.200 200.136.80.3
        Require user MarcoDias, EduardoGregores, SergioNovaes, MarcoAndreFerreiraDias
        Satisfy Any

#




        Options None
        AllowOverride Limit
        Allow from all
#Para o PHP4
        php_admin_flag engine off
        AddType text/plain .html .htm .shtml .php .php3 .phtml .phtm .pl .py .cgi

#Mudando para os diretórios locais

        deny from all



        deny from all



        deny from all



        deny from all



        deny from all

  • Agora a migração é feita fazendo a cópias dos arquivos da hep.ift.unesp.br para a sprace; isso não é feito diretamente então enviei para uma conta que tenho na shell.ift.unesp.br e depois irei copiar para os respectivos diretorios na sprace:
[root@sprace data]# less /etc/httpd/conf/httpd.conf
[root@sprace data]# ssh mdias@hep.ift.unesp.br
mdias@hep.ift.unesp.br's password:
-------------------
Welcome to D0SERVER
-------------------
[mdias@d0server mdias]$ cd /var/www/html/Hep/Twiki/
[mdias@d0server Twiki]$ su apache
[apache@d0server Twiki]$ cd data/
[apache@d0server data]$ tar -cpvjf dados.tar.bz2  Main/ UFABC/ Sandbox/  .htaccess .htpasswd
iremos colocar tudo isso no /var/www/html/Twiki/data/ da sprace:
[root@sprace ~]# cd /var/www/html/Twiki/data/
[root@sprace data]# scp shell.ift.unesp.br:/users/mdias/dados.tar.bz2; tar -xpjvf dados.tar.bz2
  • Agora entre no browser em /twiki/bin/configure. No geral o /var/www/html/Twiki/lib/LocalSite.cfg ficou assim:
$TWiki::cfg{DefaultUrlHost} = 'http://www.sprace.org.br';

# cgi-bin URL path for TWiki e.g. /twiki/bin
# Attachments URL path e.g. /twiki/pub
# Attachments store file path (not URL), must match /twiki/pub e.g.
# /usr/local/twiki/pub
# SECURITY NOTE: Directories =twiki/data= , =twiki/templates= and all their
# subdirectories should be set so that they are _not_ visible through
# URLs. (Alternatively, move the directories to a place where they are
# not visible, and set the paths here as appropriate)

# Template directory e.g. /usr/local/twiki/templates
# Topic files store (file path not URL) e.g. /usr/local/twiki/data
# TWiki will use this path to base other defaults, such as the location
# of password files.
# TWiki.cfg will use this path to default where to put log files, unless
# you override individual paths here.
$TWiki::cfg{LogDir} = $TWiki::cfg{DataDir};
#$TWiki::cfg{Password} = 'H1sKOHThGIpQo';
#$TWiki::cfg{Site}{FullLang} = 'en-us';
$TWiki::cfg{Site}{Lang} = 'en';
$TWiki::cfg{Site}{CharSet} = 'iso-8859-15';
$TWiki::cfg{Languages}{fr}{Enabled} = 0;
$TWiki::cfg{Languages}{pl}{Enabled} = 0;
$TWiki::cfg{AntiSpam}{HideUserDetails} = 0;
$TWiki::cfg{Plugins}{EmptyPlugin}{Enabled} = 1;
$TWiki::cfg{Languages}{da}{Enabled} = 0;
$TWiki::cfg{Register}{NeedVerification} = 0;
$TWiki::cfg{Languages}{de}{Enabled} = 0;
$TWiki::cfg{Languages}{'zh-tw'}{Enabled} = 0;
$TWiki::cfg{LoginManager} = 'TWiki::Client::TemplateLogin';
$TWiki::cfg{Sessions}{ExpireAfter} = '21600';
$TWiki::cfg{INCLUDE}{AllowURLs} = 1;
$TWiki::cfg{Languages}{es}{Enabled} = 0;
$TWiki::cfg{Languages}{sv}{Enabled} = 0;
$TWiki::cfg{Languages}{sv}{Enabled} = 0;
$TWiki::cfg{Languages}{it}{Enabled} = 0;
$TWiki::cfg{Languages}{'zh-cn'}{Enabled} = 0;
$TWiki::cfg{Languages}{nl}{Enabled} = 0;
$TWiki::cfg{Plugins}{RenderListPlugin}{Enabled} = 1;
$TWiki::cfg{LocalesDir} = '/var/www/html/Twiki/locale/';
$TWiki::cfg{DataDir} = '/var/www/html/Twiki/data/';
$TWiki::cfg{TemplateDir} = '/var/www/html/Twiki/templates/';
$TWiki::cfg{PubDir} = '/var/www/html/Twiki/pub/';
$TWiki::cfg{PubUrlPath} = '/Twiki/pub/';
$TWiki::cfg{ScriptSuffix} = '';
$TWiki::cfg{ScriptUrlPath} = '/Twiki/bin';
$TWiki::cfg{Plugins}{BlackListPlugin}{Enabled} =0;
$TWiki::cfg{TempfileDir} = '/tmp/twiki';
$TWiki::cfg{OS} = 'UNIX';
$TWiki::cfg{DetailedOS} = 'linux';
$TWiki::cfg{UseClientSessions} = 1;
$TWiki::cfg{Sessions}{IDsInURLs} = 0;
$TWiki::cfg{Sessions}{UseIPMatching} = 1;
$TWiki::cfg{Sessions}{MapIP2SID} = 0;
$TWiki::cfg{LoginNameFilterIn} = '^[^\\s\\*?~^\\$@%`"\'&;|<>\\x00-\\x1f]+$';
$TWiki::cfg{DefaultUserLogin} = 'guest';
$TWiki::cfg{DefaultUserWikiName} = 'TWikiGuest';
$TWiki::cfg{AdminUserWikiName} = 'TWikiAdminGroup';
$TWiki::cfg{SuperAdminGroup} = 'TWikiAdminGroup';
$TWiki::cfg{UsersTopicName} = 'TWikiUsers';
$TWiki::cfg{MapUserToWikiName} = 1;
$TWiki::cfg{AuthScripts} = 'attach,edit,manage,rename,save,upload,viewauth,rdiffauth';
$TWiki::cfg{AuthRealm} = 'Enter your TWiki.LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. !JohnSmith, unless you chose otherwise). Visit TWiki.TWikiRegistration if you do not have one.';
$TWiki::cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';
$TWiki::cfg{MinPasswordLength} = 1;
$TWiki::cfg{Htpasswd}{FileName} = '/var/www/html/Twiki/data//.htpasswd';
$TWiki::cfg{Htpasswd}{Encoding} = 'crypt';
$TWiki::cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping';
$TWiki::cfg{Register}{HidePasswd} = 1;
$TWiki::cfg{SafeEnvPath} = '/bin:/usr/bin';
$TWiki::cfg{DenyDotDotInclude} = 1;
$TWiki::cfg{AllowInlineScript} = 1;
$TWiki::cfg{UploadFilter} = '^(\\.htaccess|.*\\.(?i)(?:php[0-9s]?(\\..*)?|[sp]htm[l]?(\\..*)?|pl|py|cgi))$';
$TWiki::cfg{NameFilter} = '[\\s\\*?~^\\$@%`"\'&;|<>\\x00-\\x1f]';
$TWiki::cfg{AntiSpam}{EmailPadding} = '';
$TWiki::cfg{AntiSpam}{RobotsAreWelcome} = 1;
$TWiki::cfg{Log}{view} = 1;
$TWiki::cfg{Log}{search} = 1;
$TWiki::cfg{Log}{changes} = 1;
$TWiki::cfg{Log}{rdiff} = 1;
$TWiki::cfg{Log}{edit} = 1;
$TWiki::cfg{Log}{save} = 1;
$TWiki::cfg{Log}{upload} = 1;
$TWiki::cfg{Log}{attach} = 1;
$TWiki::cfg{Log}{rename} = 1;
$TWiki::cfg{Log}{register} = 1;
$TWiki::cfg{ConfigurationLogName} = '/var/www/html/Twiki/data//configurationlog.txt';
$TWiki::cfg{DebugFileName} = '/var/www/html/Twiki/data//debug.txt';
$TWiki::cfg{WarningFileName} = '/var/www/html/Twiki/data//warn2024-11-21.txt';
$TWiki::cfg{LogFileName} = '/var/www/html/Twiki/data//log2024-11-21.txt';
$TWiki::cfg{Languages}{ru}{Enabled} = 1;
$TWiki::cfg{Languages}{pt}{Enabled} = 1;
$TWiki::cfg{Languages}{cs}{Enabled} = 1;
$TWiki::cfg{DisplayTimeValues} = 'gmtime';
$TWiki::cfg{Site}{Locale} = 'en_US.ISO-8859-1';
$TWiki::cfg{Site}{LocaleRegexes} = 1;
$TWiki::cfg{UpperNational} = '';
$TWiki::cfg{LowerNational} = '';
$TWiki::cfg{PluralToSingular} = 1;
$TWiki::cfg{StoreImpl} = 'RcsWrap';
$TWiki::cfg{RCS}{ExtOption} = '';
$TWiki::cfg{RCS}{dirPermission} = 493;
$TWiki::cfg{RCS}{filePermission} = 420;
$TWiki::cfg{RCS}{asciiFileSuffixes} = '\\.(txt|html|xml|pl)$';
$TWiki::cfg{RCS}{initBinaryCmd} = '/usr/bin/rcs  -i -t-none -kb %FILENAME|F%';
$TWiki::cfg{RCS}{initTextCmd} = '/usr/bin/rcs  -i -t-none -ko %FILENAME|F%';
$TWiki::cfg{RCS}{tmpBinaryCmd} = '/usr/bin/rcs  -kb %FILENAME|F%';
$TWiki::cfg{RCS}{ciCmd} = '/usr/bin/ci  -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%';
$TWiki::cfg{RCS}{ciDateCmd} = '/usr/bin/ci  -m%COMMENT|U% -t-none -d%DATE|D% -u -w%USERNAME|S% %FILENAME|F%';
$TWiki::cfg{RCS}{coCmd} = '/usr/bin/co  -p%REVISION|N% -ko %FILENAME|F%';
$TWiki::cfg{RCS}{histCmd} = '/usr/bin/rlog  -h %FILENAME|F%';
$TWiki::cfg{RCS}{infoCmd} = '/usr/bin/rlog  -r%REVISION|N% %FILENAME|F%';
$TWiki::cfg{RCS}{rlogDateCmd} = '/usr/bin/rlog  -d%DATE|D% %FILENAME|F%';
$TWiki::cfg{RCS}{diffCmd} = '/usr/bin/rcsdiff  -q -w -B -r%REVISION1|N% -r%REVISION2|N% -ko --unified=%CONTEXT|N% %FILENAME|F%';
$TWiki::cfg{RCS}{lockCmd} = '/usr/bin/rcs  -l %FILENAME|F%';
$TWiki::cfg{RCS}{unlockCmd} = '/usr/bin/rcs  -u %FILENAME|F%';
$TWiki::cfg{RCS}{breaklockCmd} = '/usr/bin/rcs  -u -M %FILENAME|F%';
$TWiki::cfg{RCS}{delRevCmd} = '/usr/bin/rcs  -o%REVISION|N% %FILENAME|F%';
$TWiki::cfg{RCS}{SearchAlgorithm} = 'TWiki::Store::SearchAlgorithms::Forking';
$TWiki::cfg{RCS}{EgrepCmd} = '/bin/egrep %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$TWiki::cfg{RCS}{FgrepCmd} = '/bin/fgrep %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$TWiki::cfg{RCS}{WorkAreaDir} = '/var/www/html/Twiki/pub//_work_areas';
$TWiki::cfg{EnableHierarchicalWebs} = 1;
$TWiki::cfg{SystemWebName} = 'TWiki';
$TWiki::cfg{TrashWebName} = 'Trash';
$TWiki::cfg{UsersWebName} = 'Main';
$TWiki::cfg{WebMasterEmail} = 'mdias@ift.unesp.br';
$TWiki::cfg{WebMasterName} = 'TWiki Administrator';
$TWiki::cfg{MailProgram} = '/usr/sbin/sendmail -t -oi -oeq';
$TWiki::cfg{SMTP}{MAILHOST} = '';
$TWiki::cfg{SMTP}{SENDERHOST} = '';
$TWiki::cfg{SMTP}{Username} = '';
$TWiki::cfg{SMTP}{Password} = '';
$TWiki::cfg{RemoveImgInMailnotify} = 1;
$TWiki::cfg{NotifyTopicName} = 'WebNotify';
$TWiki::cfg{SMTP}{Debug} = 0;
$TWiki::cfg{PROXY}{HOST} = '';
$TWiki::cfg{PROXY}{PORT} = '';
$TWiki::cfg{Stats}{TopViews} = 10;
$TWiki::cfg{Stats}{TopContrib} = 10;
$TWiki::cfg{Stats}{TopicName} = 'WebStatistics';
$TWiki::cfg{TemplatePath} = '/var/www/html/Twiki/templates//$web/$name.$skin.tmpl, /var/www/html/Twiki/templates//$name.$skin.tmpl, /var/www/html/Twiki/templates//$web/$name.tmpl, /var/www/html/Twiki/templates//$name.tmpl, $web.$skinSkin$nameTemplate, TWiki.$skinSkin$nameTemplate, $web.$nameTemplate, TWiki.$nameTemplate';
$TWiki::cfg{LinkProtocolPattern} = '(file|ftp|gopher|https|http|irc|mailto|news|nntp|telnet)';
$TWiki::cfg{SiteWebTopicName} = '';
$TWiki::cfg{SitePrefsTopicName} = 'TWikiPreferences';
$TWiki::cfg{LocalSitePreferences} = 'Main.TWikiPreferences';
$TWiki::cfg{HomeTopicName} = 'WebHome';
$TWiki::cfg{WebPrefsTopicName} = 'WebPreferences';
$TWiki::cfg{NumberOfRevisions} = 4;
$TWiki::cfg{ReplaceIfEditedAgainWithin} = 3600;
$TWiki::cfg{LeaseLength} = 3600;
$TWiki::cfg{LeaseLengthLessForceful} = 3600;
$TWiki::cfg{MimeTypesFileName} = '/var/www/html/Twiki/data//mime.types';
$TWiki::cfg{RegistrationApprovals} = '/var/www/html/Twiki/data//RegistrationApprovals';
$TWiki::cfg{Plugins}{CommentPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{EditTablePlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{InterwikiPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{PreferencesPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{SlideShowPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{SmiliesPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{SpreadSheetPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{TablePlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{TwistyPlugin}{Enabled} = 1;
$TWiki::cfg{PluginsOrder} = 'SpreadSheetPlugin';
1;
  • Ficaram faltando copiar da hep para sprace um diretório :
[apache@d0server Twiki]$ tar -cvpjf documents.tar.bz2 Documents/
e coloca-lo em /var/www/html/Twiki da sprace.

Fulano em dd/mm/aaaa

Coloca o que fez.

Ciclano em dd/mm/aaaa

Mais comentarios
Topic revision: r1 - 2007-06-27 - MarcoAndreFerreiraDias
 

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort