Changes

From SME Server
Jump to navigationJump to search
10,607 bytes added ,  22:33, 15 June 2016
Line 15: Line 15:     
smeserver-dar2 pour le panel  
 
smeserver-dar2 pour le panel  
 +
====cvs make a new source====
 +
 +
cd smecontribs/rpms/smeserver-rkhunter
 +
rm -rf contribs8
 +
cvs update -dPA
 +
-> test si branch a construire existe -> arret
 +
cp -R contribs8/ contribs9
 +
rm -rf contribs9/CVS/
 +
cvs add contribs9
 +
cd contribs9
 +
make prep
 +
mv smeserver-rkhunter-1.2.0 smeserver-rkhunter-1.4.0
 +
rm -rf *.patch
 +
tar cvzf smeserver-rkhunter-1.4.0.tar.gz smeserver-rkhunter-1.4.0
 +
#or tar -Jcvf  smeserver-rkhunter-1.4.0.tar.xz smeserver-rkhunter-1.4.0
 +
date +%s > import.log
 +
make new-sources FILES="smeserver-rkhunter-1.4.0.tar.gz"
 +
cvs add .cvsignore *.spec Makefile import.log sources
 +
 +
-> remove Patch and %patch
 +
 +
cvs commit -m '* Thu Aug 13 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.4.0-1.sme
 +
- First Import to contribs9'
 +
 +
====plague-client====
 +
http://buildsys.koozali.org/build/10/smeserver-core/x86_64/plague/0.4.5.8-2.el7.sme/noarch/plague-common-0.4.5.8-2.el7.sme.noarch.rpm
 +
http://buildsys.koozali.org/build/10/smeserver-core/x86_64/plague/0.4.5.8-2.el7.sme/noarch/plague-client-0.4.5.8-2.el7.sme.noarch.rpm
 +
 +
====SOGO3====
 +
db yum_repositories set sogo3 repository \
 +
    BaseURL http://inverse.ca/rhel-v3/6/\$basearch \
 +
    EnableGroups yes \
 +
    GPGCheck no \
 +
    Name "Inverse SOGo Repository" \
 +
    IncludePkgs gnustep-base,libmemcached,libwbxml,sogo*,sope49* \
 +
    Visible yes \
 +
    status disabled
 +
====Testspeed====
 +
http://speedof.me/
 +
 +
====Find upstream rpms patched by contribs.org====
 +
For the need of the distribution we ought to patch some upstream rpms, this is the list
 +
rpm -qa --qf "%{name} %{BuildHost}\n" | grep -P 'build64\-1|builder.koozali.org' | awk '{print $1}' | grep -vP '^smeserver|e\-smith' | sort
 +
 +
====Mock configuration & scl build ====
 +
http://people.centos.org/hughesjr/scl_examples/
 +
http://grokbase.com/t/centos/centos/142tg0hrmw/how-to-build-scl-python-setuptools-from-src-rpm
 +
 +
====remove the degraded raid====
 +
mdadm --grow /dev/md0 --force --raid-devices=1
 +
 +
====Using Simple "Wildcards" and "Repetitions"====
 +
Calling these "wildcards" may actually conflict with the theoretical grammar and syntax of Perl, but in fact is the most intuitive way to think of it, and will not lead to any coding mistakes.
 +
 +
.  Match any character
 +
\w  Match "word" character (alphanumeric plus "_")
 +
\W  Match non-word character
 +
\s  Match whitespace character
 +
\S  Match non-whitespace character
 +
\d  Match digit character
 +
\D  Match non-digit character
 +
\t  Match tab
 +
\n  Match newline
 +
\r  Match return
 +
\f  Match formfeed
 +
\a  Match alarm (bell, beep, etc)
 +
\e  Match escape
 +
\021  Match octal char ( in this case 21 octal)
 +
\xf0  Match hex char ( in this case f0 hexidecimal)
 +
 +
You can follow any character, wildcard, or series of characters and/or wildcard with a repetiton. Here's where you start getting some power:
 +
 +
*      Match 0 or more times
 +
+      Match 1 or more times
 +
?      Match 1 or 0 times
 +
{n}    Match exactly n times
 +
{n,}  Match at least n times
 +
{n,m}  Match at least n but not more than m times
 +
 +
Now for some examples:
 +
 +
$string =~ m/\s*rem/i;  #true if the first printable text is rem or REM
 +
 +
$string =~ m/^\S{1,8}\.\S{0,3}/;  # check for DOS 8.3 filename
 +
                                  #  (note a few illegals can sneak thru)
 +
 +
====search about db in template====
 +
grep -srni '${[A-Za-z0-9]\|$[A-Za-z0-9]\|_prop' /etc/e-smith/templates*| grep '}\|_prop' |less
 +
or
 +
grep -srni '${[A-Za-z0-9]\|$[A-Za-z0-9]\|_prop' /etc/e-smith/templates*| grep '} |\|}|\|_prop' |less
 +
 +
====70-persistent-net.rules====
 +
[root@sme9 ~]# locate 70-persistent
 +
/etc/udev/rules.d/70-persistent-net.rules
 +
[root@sme9 ~]# cat /etc/udev/rules.d/70-persistent-net.rules
 +
# This file was automatically generated by the /lib/udev/write_net_rules
 +
# program, run by the persistent-net-generator.rules rules file.
 +
#
 +
# You can modify it, as long as you keep each rule on a single
 +
# line, and change only the value of the NAME= key.
 +
 +
# PCI device 0x8086:0x100e (e1000)
 +
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:94:a1:2c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 +
 +
====upgrade horde5 for sme9====
 +
http://forums.contribs.org/index.php?topic=50969.0
 +
 +
====iso2utf8====
 +
 +
iconv -f iso-8859-1 -t utf-8 fichier_src > fichier_dst
 +
 +
====smartd_supervision====
 +
http://lika.be/wp/2006/02/adding-the-smartd-service-to-sme-server/<br />
 +
 +
http://wiki.contribs.org/Monitor_Disk_Health
 +
 +
====migration_script_sme8tosme9====
 +
you need to move the impacted perl module file in order to have this contrib to work.
 +
 +
please do not open a bug for every contribs with this kind of error, as it should be part of the normal migration process:
 +
http://bugs.contribs.org/show_bug.cgi?id=8137
 +
 +
contribname="password"
 +
version8="1.2"
 +
version9="1.3"
 +
tar -xzf smeserver-$contribname-$version8.tgz
 +
mkdir smeserver-$contribname-$version9
 +
cp -rp smeserver-$contribname-$version8/* smeserver-$contribname-$version9/
 +
mv -r  smeserver-$contribname-$version8/root/usr/lib/perl5/site_perl/esmith/*  smeserver-$contribname-$version9/root/usr/share/perl5/vendor_perl/esmith/
 +
tar -czf smeserver-$contribname-$version9.tgz smeserver-$contribname-$version9
    
====Netlogon probleme W7 W8?
 
====Netlogon probleme W7 W8?
Line 24: Line 154:  
Now it works fine.
 
Now it works fine.
 
Thanks to all for the help. i'm trying sme server 8 since few months.
 
Thanks to all for the help. i'm trying sme server 8 since few months.
 +
====different wiki syntax====
 +
{| style="color:red;background-color:#ffffcc;"
 +
|
 +
[Please see [[Help:Contents#How_to_get_a_wiki_account.3F|'''how to get a wiki account''']] ]
 +
|}
 +
 +
<syntaxhighlight lang="Bash">
 +
plop
 +
plop
 +
plop
 +
</syntaxhighlight>
 +
====daniel_vroom====
 +
https://vroom.firewall-services.com/
 +
 +
https://github.com/dani/vroom
 +
 +
====buildsys====
 +
 +
*If the package was available from upstream and it is to be included in our distro then it just needs copying on the buildsys, for instance this is how I added perl-Taint-Util
 +
 +
cp /mirrors/rpmforge/redhat/el6/en/i386/dag/RPMS/perl-Taint-Util-0.08-1.el6.rf.i686.rpm /build/smeserver/repo/testing/9/smetest/i386/RPMS/
 +
 +
*Releasing a contrib package
 +
After the make build command the build system will try and build your package. After a successful build it will be put in the smetest repository. You should be notified of the result of the build by e-mail.
 +
 +
Once a package is build successfully you should verify your changes, ideally you would have a bug to verify for each modification. After verification of all relevant changes and bugs you can release the package like this:
 +
<ol></li><li>Login to shell.contribs.org like this:
 +
 +
ssh username@shell.contribs.org
 +
</li><li>Navigate to the teams directory:
 +
 +
cd /teams
 +
</li><li>The teams directory contains a few directories of which two are relevant, the first is called updates which will hold the SME Server packages, the other is called contribs and will hold build contribs.
 +
Suppose we would like to release our contrib we would proceed like this:
 +
 +
cd contribs/7
 +
</li><li>Now copy the relevant package from smetest to smecontribs, old versions are removed automatically
 +
 +
cp smetest/package-name-version.rpm smecontribs/
 +
</li></ol>
 +
 +
{{Note box|Within a period of two hours the package should be moved to the smecontribs repository and be available as soon as the mirrors synchronize.}}
 +
 +
Once the server successfully builds it will automatically be pulled on the next repo update run
 +
(40 past the even hours MDT). The package will either be put into the smedev (new package) or smetest (exist in higher repo)  After verification the package is manually moved from smedev/smetest to smecontribs (for contribs)  or smeupdates-testing (for packages in base)
 +
 +
====cours perl====
 +
http://www.dil.univ-mrs.fr/~chris/Perl/Generalites.htm
 +
http://fr.openclassrooms.com/informatique/cours/apprenez-a-programmer-en-perl
 +
==== phpinfo ====
 +
set a file phpinfo.php
 +
 +
<?php   
 +
  phpinfo();   
 +
?>
 +
755 and www:www
 +
 +
==== php55 ====
 +
 +
http://forums.contribs.org/index.php/topic,50585.msg254867.html#msg254867
 +
 +
remi forums
 +
http://forums.famillecollet.com/viewtopic.php?pid=6841#p6841
 +
[root@sme9 ~]# yum --enablerepo=remi-php55,remi,epel update php\* --exclude=php-horde-horde\*
 +
http://forums.contribs.org/index.php/topic,50582.msg256351.html#msg256351
 +
https://access.redhat.com/site/documentation/en-US/Red_Hat_Software_Collections/ ???
 +
====Log====
 +
=====Quick Parse of Log=====
 +
a quick parse of your log, but you should read the entire log
 +
less  /var/log/messages| grep -iE "uninitialized|WARNING|ERROR"
 +
=====Deep parse Log to find errors=====
 +
When you want to test the SME Product it can be useful to see what it occurs
 +
This CL can help you, but you should read the entire log
 +
less  /var/log/messages| grep -iE "useless|uninitialized|warn|fail|error|disable|unable|exit"
 +
of course this is for the /var/log/messages
 +
 +
=====Parse all Logs to find errors=====
 +
Parse all logs and write (under /root) the output to a text file named with the date of day. For example log012214:
 +
 +
find /var/log/ -mtime -2 -print -exec sh -c 'cat "{}" | tai64nlocal | egrep -i "useless|warn|fail|error|disable|remov|unable|exit"' \; > "log$(date +'%m%d%y')" 2>&1
 +
then:
 +
cd /root
 +
less log012214
 +
 +
or this one lighter
 +
 +
find /var/log/ -mtime -2 -print -exec sh -c 'cat "{}" | tai64nlocal | egrep -i "uninitialized|WARNING|ERROR"' \; > "log$(date +'%m%d%y')" 2>&1
 
==== Creating and starting service ====
 
==== Creating and starting service ====
 
  ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98popfile
 
  ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98popfile
Line 29: Line 246:  
  /sbin/e-smith/signal-event remoteaccess-update
 
  /sbin/e-smith/signal-event remoteaccess-update
 
  service popfile start
 
  service popfile start
 +
 
==== Deleting and unregistering service ====
 
==== Deleting and unregistering service ====
 
  service popfile stop
 
  service popfile stop
Line 37: Line 255:  
  /sbin/e-smith/signal-event remoteaccess-update
 
  /sbin/e-smith/signal-event remoteaccess-update
    +
====allow a service to start for a  particular time====
 +
 +
in this way SME's knows how to/if  start the service at startup
 +
config set myapplicationname service status enabled
 +
 +
cd /etc/rc.d/init.d
 +
ln -s myinitscript myapplicationname
 +
 +
 +
this should be not necessary: we are creating a symlink of the original startup script with a new name (the point is that myapplicationname must be identical to the service name above)
 +
 +
cd /etc/rc7.d
 +
ln -s  /etc/rc.d/init.d/e-smith-service SXXmyapplicationname
 +
 +
we create a symlink to e-smith-service startup script with a name where:
 +
S tells SME to start
 +
XX are numbers.. you can decide when to start the service (you should not start something that need the network before the network itself is up and running)
 +
myapplicationname.. you already know :-)
 
==== creer un service a la main avec db configuration et lui attribuer des accès. ====
 
==== creer un service a la main avec db configuration et lui attribuer des accès. ====
 
  db configuration set transmission-daemon service
 
  db configuration set transmission-daemon service
Line 42: Line 278:  
  db configuration setprop transmission-daemon status enabled
 
  db configuration setprop transmission-daemon status enabled
 
  db configuration setprop transmission-daemon access public
 
  db configuration setprop transmission-daemon access public
 +
 
==== créer a la main des valeurs db configuration ====
 
==== créer a la main des valeurs db configuration ====
 
  ##set db configuration
 
  ##set db configuration
Line 89: Line 326:     
==== ROOT PWD ====
 
==== ROOT PWD ====
PWD=$(cat /etc/ldap.secret)###donne le mot de passe mysql root en argument
+
PWD=$(cat /etc/ldap.secret)###donne le mot de passe mysql root en argument
 +
or
 +
perl -Mesmith::util -e 'print esmith::util::LdapPassword();'
 +
or
 +
password = {esmith::util::LdapPassword();}
 +
 
 
==== CGMINER ====
 
==== CGMINER ====
 
  yum --enablerepo smecontribs install cgminer
 
  yum --enablerepo smecontribs install cgminer
Line 165: Line 407:  
from atomic
 
from atomic
 
see http://forums.contribs.org/index.php/topic,50081.0.html
 
see http://forums.contribs.org/index.php/topic,50081.0.html
 +
 +
==== Page de téléchargement en français ====
 +
 +
Mais de rien, ça fait toujours plaisir de pouvoir aider les autres...
 +
 +
[[User:TheKinrar|TheKinrar]] ([[User talk:TheKinrar|talk]]) 12:07, 4 May 2014 (MDT)
 +
 +
J'irai jeter un petit coup d'oeuil à la doc à l'occasion... Là je m'étais mis à traduire la page  [[SME_Server:Volunteering]].
 +
 +
[[User:TheKinrar|TheKinrar]] ([[User talk:TheKinrar|talk]]) 12:32, 4 May 2014 (MDT)
 +
 +
Je n'y étais pas inscrit, mais je fais ça tout de suite. Et j'avais déjà regardé du côté de Pootle, le français est déjà bien avancé il me semble.
 +
 +
[[User:TheKinrar|TheKinrar]] ([[User talk:TheKinrar|talk]]) 15:48, 4 May 2014 (MDT)

Navigation menu