User talk:Stephdl

From SME Server
Jump to navigationJump to search

http://fedoranews.org/tchung/rpmbuild/

http://forums.contribs.org/index.php/topic,50158.0/topicseen.html perl -e "use esmith::util;esmith::util::setUserPassword( 'username', 'password');"; /sbin/e-smith/signal-event password-modify username

http://forums.contribs.org/index.php/topic,50141.0.html Advice/fr

de epel il y a bugzilla, cacti, gallery2, mediawiki, nagios, zaraf, moodle, ocsinventory, roundcube, wordpress et zabbix

voir smeserver-mediawiki.src.rpm smeserver-kplaylist.src.rpm smeserver-groupoffice smeserver-wordpress

faire contrib smf  typo3 phpbb
tester  smeserver-user-webspace a user web space


smeserver-dar2 pour le panel

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/

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? A tester sur w7 et W8 http://forums.contribs.org/index.php/topic,50046.msg250942.html I confirm, i'm referring to the automatically mapped home drive in Windows XP. the above drive doesn't show in Windows 7 without editing the netlogon.bat file. i've deleted the REM in the line about "net use z: /home" and then it's ok. Now it works fine. Thanks to all for the help. i'm trying sme server 8 since few months.

different wiki syntax

[Please see how to get a wiki account ]

plop
plop
plop

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:

  1. Login to shell.contribs.org like this: ssh username@shell.contribs.org
  2. Navigate to the teams directory: cd /teams
  3. 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
  4. Now copy the relevant package from smetest to smecontribs, old versions are removed automatically cp smetest/package-name-version.rpm smecontribs/


Important.png Note:
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

ln -f -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98popfile
/sbin/e-smith/db configuration set popfile service status enabled
/sbin/e-smith/signal-event remoteaccess-update
service popfile start

Deleting and unregistering service

service popfile stop
sleep 3
rm -f /etc/rc7.d/S98popfile
rm -f /etc/rc.d/init.d/popfile
/sbin/e-smith/config delete popfile
/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.

db configuration set transmission-daemon service
db configuration setprop transmission-daemon TCPPort 51413
db configuration setprop transmission-daemon status enabled
db configuration setprop transmission-daemon access public

créer a la main des valeurs db configuration

##set db configuration
#/sbin/e-smith/db configuration setprop automysqlbackup Mailcontent log
#/sbin/e-smith/db configuration setprop automysqlbackup Sizemail 8000
#/sbin/e-smith/db configuration setprop automysqlbackup Mailto root  
#/sbin/e-smith/signal-event console-save

smesrver-geneweb #a regarder pourquoi le service doit etre demarré a la main

config set gwd service
config setprop gwd status enabled
signal-event post-upgrade
signal-event reboot

Wondershaper

http://wiki.contribs.org/Wondershaper
smeserver-qos daniel
smeserver-htbwshaper 

temp Folder for php

mkdir /etc/e-smith/templates-custom/etc/php.ini/              
nano /etc/e-smith/templates-custom/etc/php.ini/12phptmpfolder

then paste this and save the file by ctrl+x

upload_tmp_dir = /tmp

and then do

signal-event console-save 

allow the "allow_url_fopen"

 mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
 nano -w /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/99allow_url_fopen
 

and paste the following and save this

 <Directory /home/e-smith/files/ibays/owncloud/html>
 php_admin_flag allow_url_fopen on
 </Directory>
 

then at the command line prompt enter:

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

ROOT PWD

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

yum --enablerepo smecontribs install cgminer
cgminer -o contribs.org:8332 -u myident -p x
screen -S cgminer -t cgminer -dm cgminer -o contribs.org:8332 -u myident -p x

If you want to make it start automatically and run in the background you can do the following:

screen -S cgminer -t cgminer -dm cgminer -o contribs.org:8332 -u myident -p x

then connect to it with:

screen -x

and disconnect from it with:

CTRL-A, CTRL-D


Commençons par le cas de la création d'un DBA avec accès depuis votre réseau local. Ceci est fort utile si vous souhaitez administrer votre serveur MySQL à partir d'une autre machine de votre réseau (il existe de sympathiques interfaces graphiques qui simplifient la vie). Je supposerais ici que l'adresse de votre réseau est 192.168.10.0/255.255.255.0 ; vous pouvez même spécifier une adresse IP en particulier, pour plus de sécurité (dans ce cas, le masque serait 255.255.255.255) :

mysql> GRANT ALL PRIVILEGES ON *.* TO 'nouveau_dba'@'192.168.10.0/255.255.255.0' IDENTIFIED BY 'mot_de_passe' WITH GRANT OPTION; Query OK, 0 rows affected (0.01 sec)

Nota : l'option "WITH GRANT OPTION" n'est pas indispensable et doit être évitée à chaque fois que c'est possible. Elle n'est présentée ici que pour être conforme aux droits que doit avoir un DBA (voir la documentation s'y rapportant pour plus d'informations).

Autre cas, création d'un utilisateur standard avec accès local sur une base de données existante (très utile pour les scripts PHP, notamment) :


mysql> GRANT SELECT, UPDATE, INSERT, DELETE ON base_de_données.* TO 'nouvel_utilisateur'@'localhost' IDENTIFIED BY 'mot_de_passe'; Query OK, 0 rows affected (0.01 sec)

Nota : ne modifiez pas le paramètre 'localhost'.

Il existe bien entendu de multiples variations et combinaisons, mais les deux cas que je viens de vous présenter correspond à l'immense majorité des besoins des utilisateurs sur SME.

Après la création de nouveaux utilisateurs, vous devez indiquer à MySQL de les prendre en compte et, ensuite, quitter le client :

mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)

mysql> QUIT; Bye

JIGDO

The documentation is the one line below. It presumes that jigdo is installed, when using SME 7 I used Dag, but on my COS6 build machine it was from epel, so just.

yum install jigdo

Then you need to obtain|mirror|download .../smeserver/releases/testing/8.1beta1/ You need both the iso and smeos directories.

After that it really is just one command, which you run from the iso/i386 or iso/x86_64 directories

To create the ISO you need the iso and smeos directories from your local mirror.

From the i386 directory

jigdo-lite --noask --scan ../../smeos/i386/ *.jigdo

Netlogon_optimisation_and_user_informations_displayed

http://wiki.contribs.org/Netlogon_optimisation_and_user_informations_displayed

Script contrib rpm

http://atlas.itx.pialasse.com/makecontrib/

atomic repo

/sbin/e-smith/db yum_repositories set atomic repository Name 'Atomic EL5' MirrorList 'http://www.atomicorp.com/mirrorlist/atomic/centos-5-$basearch' GPGCheck yes GPGKey 'https://www.atomicorp.com/RPM-GPG-KEY.art.txt' Visible no

Signal event now to register the yum command in accepting the added repository above:

/sbin/e-smith/signal-event yum-modify

Finally we yum install the xxx with the command:

/usr/bin/yum -y --enablerepo='atomic' install xxx

update mysql

from atomic 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...

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.

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.

TheKinrar (talk) 15:48, 4 May 2014 (MDT)