| 1 |
jonen |
1.1 |
<h3>jonen's notes - 2003-02</h3> |
| 2 |
|
|
<hr/> |
| 3 |
|
|
|
| 4 |
|
|
- Unix-Systems |
| 5 |
|
|
o learn howto move/maintain /etc of servers at cvs !! |
| 6 |
|
|
Debian: |
| 7 |
|
|
x search if new packages available, do 'apt-get --dry-run upgrade'! |
| 8 |
|
|
x build small systool script 'apt-get_remote.pl' which do a cronly 'apt-get --dry-run upgrade' and send output via mail |
| 9 |
|
|
o review 'apt-get_remote.pl' |
| 10 |
|
|
o what's about parsing some response for comand like installing some marked packages |
| 11 |
|
|
FreeBSD(stable): |
| 12 |
|
|
o read more about BSD package systems (pkg, cvsup) |
| 13 |
|
|
x for simple package installation/de-installation use pkg |
| 14 |
|
|
x install downloaded package: |
| 15 |
|
|
:# pkg_add <package>-<version>.tgz |
| 16 |
|
|
x install package via remote server(only if package is available as *latest*): |
| 17 |
|
|
pkg_add -r <package>.tgz |
| 18 |
|
|
x using cvsup |
| 19 |
|
|
x newbies could use cvsupit (not what it really does..) |
| 20 |
|
|
:# pkg_add -r cvsupit.tgz |
| 21 |
|
|
- cvsupit will proberly ask you for the default values it |
| 22 |
|
|
place at /etc/cvsupfile, which is used by cvsup |
| 23 |
|
|
- after that it will start cvsup to update your system |
| 24 |
|
|
x if /etc/cvsupfile already exists and you know what you do, |
| 25 |
|
|
this command will update your system (maybe run it via cron...): |
| 26 |
|
|
:# /usr/local/bin/cvsup -g -L 2 /etc/cvsupfile |
| 27 |
|
|
o whats about daemon start-stop scripts (like at linux: /etc/init.d/) ? |
| 28 |
|
|
x configure and compile custom kernel: |
| 29 |
|
|
x read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html |
| 30 |
|
|
x create custom kernel conf-file |
| 31 |
|
|
- cd usr/src/sys/i386/conf/ |
| 32 |
|
|
- copy default kenrnel GENERIC to eg MYKERNEL |
| 33 |
|
|
- edit/modify MYKERNEL |
| 34 |
|
|
x configure sources(really?) |
| 35 |
|
|
- run /usr/sbin/config MYKERNEL |
| 36 |
|
|
x build kernel |
| 37 |
|
|
- cd ../../MYKERNEL |
| 38 |
|
|
- make depend |
| 39 |
|
|
- make |
| 40 |
|
|
- make install |
| 41 |
|
|
x use packet fiters (firewall): |
| 42 |
|
|
x read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls.html |
| 43 |
|
|
x some options at the kernel have to be enabled: |
| 44 |
|
|
<pre style="font-size:10px"> |
| 45 |
|
|
options IPFIREWALL #Compiles into the kernel the code for packet filtering. |
| 46 |
|
|
options IPFIREWALL_VERBOSE #Enables code to allow logging of packets through syslogd. |
| 47 |
|
|
# Without this option, even if you specify that packets should be logged in the filter rules, |
| 48 |
|
|
# nothing will happen. |
| 49 |
|
|
options IPFIREWALL_VERBOSE_LIMIT=10 #Limits the number of packets logged through syslogd on a per entry basis. |
| 50 |
|
|
# You may wish to use this option in hostile environments in which you want to log firewall activity, |
| 51 |
|
|
# but do not want to be open to a denial of service attack via syslog flooding. |
| 52 |
|
|
# When a chain entry reaches the packet limit specified, logging is turned off for that particular entry. |
| 53 |
|
|
# To resume logging, you will need to reset the associated counter using the ipfw(8) utility: |
| 54 |
|
|
# ipfw zero 4500 |
| 55 |
|
|
# Where 4500 is the chain entry you wish to continue logging. |
| 56 |
|
|
options IPFIREWALL_DEFAULT_TO_ACCEPT #This changes the default rule action from ``deny'' to ``allow''. |
| 57 |
|
|
# This avoids the possibility of locking yourself out if you happen to boot a kernel with IPFIREWALL support but have not configured your firewall yet. |
| 58 |
|
|
# It is also very useful if you often use ipfw(8) as a filter for specific problems as they arise. |
| 59 |
|
|
# Use with care though, as this opens up the firewall and changes the way it works. |
| 60 |
|
|
</pre> |
| 61 |
|
|
x firewall is enabled at /etc/rc.conf (or /etc/rc.conf.local) |
| 62 |
|
|
firewall_enabled = "YES" |
| 63 |
|
|
firewall_type = "<firewall_type>" |
| 64 |
|
|
x <firewall_type> is either a case at /etc/rc.firewall (/etc/rc.firewall6 for ipv6) |
| 65 |
|
|
or some custom file to read rules from. |
| 66 |
|
|
x Use firewall_type = "OPEN" for default policy 'OPEN' (allow all) |
| 67 |
|
|
|
| 68 |
|
|
|
| 69 |
|
|
|
| 70 |
|
|
- QoS (Quality of Services) |
| 71 |
|
|
o check it out ! |
| 72 |
|
|
|
| 73 |
|
|
- Apache/php: |
| 74 |
|
|
- apache aliases - redirect '/' to index.php (used for url catching/rewriting) |
| 75 |
|
|
|
| 76 |
|
|
- PHP: |
| 77 |
|
|
x search for php widget lib |
| 78 |
|
|
x APL (http://apl.sourceforge.net) |
| 79 |
|
|
- huge lib in pure C |
| 80 |
|
|
x phphtmllib (http://phphtmllib.newsblob.com) |
| 81 |
|
|
a mainly widget/render lib, written in php, complete OO-based |
| 82 |
|
|
and with nice DataList rendering (abstract source API) |
| 83 |
|
|
x integrated with flib |
| 84 |
|
|
x wrote some classes to browse data-objects via class DataList (new classes flibRPCDataSource, ObjectList, TsBackend) |
| 85 |
|
|
o rename flibRPCDataSource (maybe rework to get more abstract) |
| 86 |
|
|
o review ObjectList amd move it to phphhtmllib |
| 87 |
|
|
x semi-integraded with class FormBuilder from binarycloud via interface class FormElementsInterface |
| 88 |
|
|
x new class DataItem, which render one data object for viewing/editing |
| 89 |
|
|
x integrated new FormProcessing classes from phphtmllib (released one day after interface to binaryclouds Formbuilder was written ;) |
| 90 |
|
|
x refactored DataItem to use now phphtmllib form processing instead of interface to binarycload |
| 91 |
|
|
o review code and move to phphtmllib |
| 92 |
|
|
|
| 93 |
|
|
o XOOPS (http://xoops.org) |
| 94 |
|
|
XOOPS is a dynamic OO (Object Oriented) based open source portal script written in PHP. |
| 95 |
|
|
It is the ideal tool for developing small to large dynamic community websites, intra company portals, |
| 96 |
|
|
corporate portals, weblogs and much more. |
| 97 |
|
|
o binarycloud (http://binarycloud.com) |
| 98 |
|
|
binarycloud is an enterprise class web application platform. binarycloud shares many of the capabilities of products |
| 99 |
|
|
like Oracle 9i AS (Application Server) and IBM's WebSphere: |
| 100 |
|
|
Proper definition of a framework: "A framework supplies the infrastructure and mechanisms that execute a policy for |
| 101 |
|
|
interaction between abstract components with open implementations" |
| 102 |
|
|
- benefits: |
| 103 |
|
|
x much code done yet! |
| 104 |
|
|
- drawbacks: |
| 105 |
|
|
o not-really 100% clean code |
| 106 |
|
|
o complex app which gives you only limited possibilities to use only some classes, so not very modular |
| 107 |
|
|
|
| 108 |
|
|
|
| 109 |
|
|
- OpenLDAP: |
| 110 |
|
|
- Contacts: |
| 111 |
|
|
o Evolution: modify/create schema (map Attribute) so the field 'Note' and others can be used |
| 112 |
|
|
|
| 113 |
|
|
- PAM + SASL |
| 114 |
|
|
o seems pam will only works(will only be activated) if plain passwords are used |
| 115 |
|
|
o read more about PAM special in co-operate with SASL !! |
| 116 |
|
|
|
| 117 |
|
|
- Kerberos V |
| 118 |
|
|
x use GQ LdapBrowser with SASL to authenticate against ldap |
| 119 |
|
|
- this requires a 'kinit <username>' at the shell to get the kerberos ticket |
| 120 |
|
|
- ldap will check your ticket pricipial against its acl's ! |
| 121 |
|
|
o 'libpam-ldap' from Turbo is bad, don't use it !! (remember at 'apt-get upgrade' !!) |
| 122 |
|
|
o write this down in some (existing e.g. sendmail?) howto |
| 123 |
|
|
|
| 124 |
|
|
- Sendmail |
| 125 |
|
|
o research some about sendmail-cluster, 2 mx records, howto to set up second mx/cluster? |
| 126 |
|
|
x backup mx: |
| 127 |
|
|
- set up second mx at dns |
| 128 |
|
|
- add at backup mx place some like this at /etx/mail/mailtertable: |
| 129 |
|
|
domain.com esmtp:[123.123.123.123] |
| 130 |
|
|
where the ip points to the system the real user accounts |
| 131 |
|
|
and add every domain to /etc/mail/relay-domains: |
| 132 |
|
|
domain.com |
| 133 |
|
|
o whats about these *open* relaying rules(security ?!?) |
| 134 |
|
|
x simple load balancing: |
| 135 |
|
|
- set up two(or more) mx records with same priority at dns |
| 136 |
|
|
- add at every mx place some like this at /etx/mail/mailtertable: |
| 137 |
|
|
domain.com esmtp:[123.123.123.123] |
| 138 |
|
|
where the ip points to the system the real user accounts are |
| 139 |
|
|
note: this will do load balancing between eg 2 mail server, but if one fails, |
| 140 |
|
|
there is only a 50% chance that sent messages would arrive |
| 141 |
|
|
o change '/etc/init.d/amavisd' to '/etc/init.d/amavis-milter' in howto |
| 142 |
|
|
o migrationtools: |
| 143 |
|
|
o patch migrationtools for sendmail aliases support (/usr/share/migrationtools/migrate_aliases.pl) |
| 144 |
|
|
o create, or search web for, migrationtool for sendmail virtusertable (/usr/share/migrationtools/migrate_virtuser.pl) |
| 145 |
|
|
o review patched kerberosV support at /usr/share/migrationtools/migrate_user.pl? |
| 146 |
|
|
|
| 147 |
|
|
|
| 148 |
|
|
- MySQL: |
| 149 |
|
|
o move this to mysql-common-tasks howto |
| 150 |
|
|
- Create Database |
| 151 |
|
|
:# mysqladmin create <database> |
| 152 |
|
|
- Set Privileges on databases(creates user too, if not exists...): |
| 153 |
|
|
mysql>grant all on <database>.* to <user> identified by "<pass>"; |
| 154 |
|
|
mysql>grant all on <database>.* to <user>@<domain> identified by "<pass>"; |
| 155 |
|
|
|
| 156 |
|
|
|
| 157 |
|
|
- Document saving: |
| 158 |
|
|
o remember *.doc is a non-standard, bloated Mircosoft format, use HTML instead !! |
| 159 |
|
|
see http://www.fsf.org/philosophy/no-word-attachments.html |
| 160 |
|
|
|
| 161 |
|
|
- my documents: |
| 162 |
|
|
o convert all howto's to SDF format ( look at 'nfo/doc/computing/sysadmin/linux/example_sdf_howto.sdf' ) |
| 163 |
|
|
o learn more about Lyx/LaTex |
| 164 |
|
|
o convert all howto's to LaTex format ( look at 'nfo/doc/computing/sysadmin/linux/example_latex_howto.lyx' ) |
| 165 |
|
|
|
| 166 |
|
|
|
| 167 |
|
|
|
| 168 |
|
|
|
| 169 |
|
|
future: |
| 170 |
|
|
o build 'black box' to trace for 'spys' at a isdn/internet connection ;) |
| 171 |
|
|
|
| 172 |
|
|
<hr/> |
| 173 |
|
|
$Id$ |
| 174 |
|
|
|