You are here

Linux punktar

Linux punktar

 

Hér koma síðan nokkrir Linux punktar.

apt-get install ssh openssh-server && apt-get update && apt-get upgrade && sudo passwd root

stilla netið
cd /afrit/etc && cp -a network/interfaces /etc/network && cp -a resolv.conf /etc && cp -a hosts /etc && /etc/init.d/networking restart && echo t1.brum.is > /etc/hostname && /bin/hostname -F /etc/hostname, eða nano /etc/hostname

Quota
apt-get install quota && nano /etc/fstab && touch /quota.user /quota.group && chmod 600 /quota.* && mount -o remount / && quotacheck -avugm && quotaon -avug

mysql
apt-get install mysql-server mysql-client libmysqlclient12-dev og tengjast með, mysqladmin -u root password yourrootsqlpassword, shell> mysql -h host -u user -p,
Enter password: ********

postfix
postconf -e 'smtpd_sasl_local_domain =' && postconf -e 'smtpd_sasl_auth_enable = yes' && postconf -e 'smtpd_sasl_security_options = noanonymous' && postconf -e 'broken_sasl_auth_clients = yes' && postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination' && postconf -e 'inet_interfaces = all' && echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf && echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf

gera tls certificate
mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

configure tls support
postconf -e 'smtpd_tls_auth_only = no' && postconf -e 'smtp_use_tls = yes' && postconf -e 'smtpd_use_tls = yes' && postconf -e 'smtp_tls_note_starttls_offer = yes' && postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key' && postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt' && postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem' && postconf -e 'smtpd_tls_loglevel = 1' && postconf -e 'smtpd_tls_received_header = yes' && postconf -e 'smtpd_tls_session_cache_timeout = 3600s' && postconf -e 'tls_random_source = dev:/dev/urandom' && postconf -e 'myhostname = t1.brum.is'

courier
apt-get install courier-authdaemon courier-base courier-imap courier-imap-ssl courier-pop courier-pop-ssl courier-ssl gamin libgamin0 libglib2.0-0

Code:
localhost
your.server.name
localhost.your.server.name
example.com
yourdomain.com

/etc/postfix/virtusertable looks like this:

Code:
info@yourdomain.com sample_user
thomas@example.com sample_user
webmaster@yourdomain.com sample_user

Emails for info@yourdomain.com, thomas@example.com and webmaster@yourdomain.com will now arrive in the mailbox of sample_user.

Everytime you change /etc/postfix/virtusertable you have to run the following command:

Code:
postmap /etc/postfix/virtusertable

Code:
/etc/init.d/postfix restart

Vita hvernig ispconfig vinnur með postfix.
fékk "Relay access denied" þegar ég reyndi að senda póst frá hotmail aðgangi.
lausnin;
1) Comment the mydestination line.
2) Add these lines at the end of the main.cf file:
og ..
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
og /etc/init.d/posfix restart

----------------------------------------------------------

apache2 virkaði ekki, lausnin var, apache2ctl start

nano /etc/proftpd.conf && /etc/init.d/proftpd restart && apt-get install webalizer && apt-get install libhtml-parser-perl libdb-file-lock-perl libnet-dns-perl

webmin, Net_SSLeay
cd /slóð/að/webmin.ss.ss ./setup.sh, ispconfig sett upp skv leiðbeiningum perfect_setup_ubuntu, howtoforge.com

apt-get install backuppc sysv-rc-conf dpkg --set-selections /slóð/að/skrá > pakkar_jun_06
breyta leiniorðinu með 'htpasswd /etc/backuppc/htpasswd backuppc'

--== squirrelmail ==--
webalizer og villumelding, /etc/webalizer.conf, LogFile /var/log/apache/access.log.1 breitt í LogFile /var/log/apache2/access.log,

Geyma afrit af mikilvægustu skránum s. s. /etc og /home/notandi á t1 og /home/notandi á ferdavel,
á t1, mkdir /afrit/etc_dagsetning && cp -a /etc /afrit/etc_dagsetning && mkdir /afrit/home_notandi_dagsetning && cp -a /home/notandi /afrit/home_notandi_dagsetning, ferdavel, ssh t1, mkdir /afrit/ferdavel_home_notandi_dagsetning && scp -pr ferdavel:/home/notandi /afrit/ferdavel_home_notandi_dagsetning

--== backup pælingar ==--
rsync er aðalmálið eina sem ræður við nær allt svo sem séríslenska stafi, vera í þeirri tölvu sem taka á afritið af, rsync -av /mappa notandi@netþjónn:/mappa/fyrir/afrit, ath. ntts-3g virðist ekki ráða ennþá við að skrifa möppur með séríslenskum stöfum.

afritataka og clonun á harða diskinum frekar drastískt ekki hægt að endurheimga einstaka skrár
1 aðverð -, cd /, tar cvpzf /slóð/að/afriti.tgz --exclude=/proc --exclude=/lost+found --exclude=/slóð/að/afriti.tgz --exclude=/mnt --exclude=/sys /, og restore með, tar xvpfz backup.tgz -C /, gerða aftur möppur sem voru excluded, mkdir proc mkdir lost+found mkdir mnt mkdir sys etc...,

Annar möguleiki er að taka afrit af einstökum möppum sem síðan eru exluded þegar afrit er tekið af / ( rótinni ), eða splittað tar -cjvp . | split -b 1024m - /mnt/backup/backup.tar.bz2. This will create files like backup.tar.bz2.aa backup.tar.bz2.ab backup.tar.bz2.ac og til að endurheimta cat /mnt/backup/backup.tar.bz2.?? | tar -xjvp

partimage og partimaged (partimage-server), ræsa partimaged á þeirri tölvu sem taka á afritið á, notar port 4105 ( opna í bastille ), df, listi af partitionum hægt að nota live disk til að restora, leiðbeiningar í vafra /usr/share/doc/partimage/index.html, eingöngu hægt að taka afrit af unmounted filesystem, þarf að notast við live cd, partimage virkaði ekki í 64bit, workaround er, apt-get install partimage && cd /tmp && wget http://switch.dl.sourceforge.net/sourc...... && tar xjf partimage-0.6.4-static.tar.bz2 && mv partimage /usr/sbin/

mondo mindi www.mondorescue.com
sótti mindi-1.0.7 mindi-kernel-1.0 mondo-2.0.7 fylgdi leiðbeiningum, https://wiki.ubuntu.com, mv mindi-1.*tgz mindi-k*.tgz mo*.tgz /usr/local/src, cd /usr/local/src, tar xvfz mindi-1.*tgz mindi-k*.tgz mo*.tgz, cd mondo-2.0.7 ./configure make make install, cd ../mindi-1.0.7 (note: CHANGES and chown warnings may be safely ignored) ./install.sh, cd ../mindi-kernel-1.0 ./install.sh, mv /usr/local/share/mindi/* /usr/local/lib/mindi, villumelding usr/local/lib64/mindi/lib.tar.bz2 er ekki til, cd /usr/local/src/mindi-kernel-1, ls, cp lib* mindi-ker* vmlinuz* /usr/local/lib64/mindi, cd /usr/local/sbin, ls -l, mindi, mondoarchive, vantar growisofs

bare metal backup, hd clonun,
rdiff-backup -v 5 --exclude /sys --exclude /media --exclude /mnt --exclude /lost+found --exclude /proc --exclude /tmp / /media/sda1/KubuntuBackups/, og svo, cp -aR /media/sda1/KubuntuBackups/ / varðveitir allar heimildir og simlinks,sem þíðir að þú getur endurheimt harða diskinn þinn frá Kubuntu install ( live cd ) diskinum, eða dd if=/dev/hda1 of=/media/other/hard_drive.img, ekki hægt að gera backupið á sömu partition og verið er að taka afrit af.

backup einfalt
dpkg --get-selections > /slóð/að/möppu/apt-backup-selections-dagsetning, mysqldump -u root -p --all-databases --opt > "/var/backups/mysql-$DATE.sql", tar --absolute-names --create -j --file $MOUNTDIR/$BACKUPDIR/backup-$DATE.tbz --exclude-from=$EXCLUDE $INCLUDE, taka afrit af /etc /root /var/cache/bind /var/lib/dpkg /var/cache/debconf /var/backups /var/www /usr/local

backuppc, leiðbeiningar;
á myserver.mydomain.com,
apt-get install backuppc rsync libfile-rsyncp-perl par2 smbfs, gera leiniorð fyrir notandann backuppc, htpasswd /etc/backuppc/htpasswd backuppc, leiniorð, dpkg-reconfigure backuppc, yes, browser ( opera ), myserver.mydomain.com/backuppc, nano /etc/backuppc/hosts, ferdavel 0 ( eða 1 ) backuppc ( eða annar notandi sem þarf þá að gera og gera leiniorð fyirr sem verður þá með sitt eigið vefviðmót ),

Til að breyta gagnamöppunni sem afritin eru sett á eða $TopDir frá /var/lib/backuppc yfir á til dæmis harðan diks þá er best að mv /var/lib/backuppc /var/lib/backuppc.backup, nano /etc/fstab og breyta mount point af auka disk, sem dæmi;
#/dev/hdb1
UUID=9ae29084-b3fc-4096-9bb7-414d655bcc8f /var/lib reiserfs defaults 0 1
# mount -t reiserfs /dev/hdb1 /var/lib,

Einnig hægt að nota harðan link en finnst það verri útfærsla.
- Stop BackupPC:
/etc/init.d/backuppc stop
- Copy the BackupPC files to the new hard drive
cp -a /var/lib/backuppc /afrit2/backuppc
- Delete the old files
rm -r /var/lib/backuppc
- Link the new location to the old location
ln -s /slóð/að/möppu/backuppc /var/lib/backuppc
- Start BackupPC Again:
/etc/init.d/backuppc start
- /nafn/á/link ( /var/lib/backuppc ) sést ekki nema í skel. cd /var/lib, ls -al, sést ekki í konqueror
eða annar möguleiki,

why not just mount your other disk on /var/lib/backuppc? (That's what I
do)

aðeins meira um það, On my debian system, all I did was to shut down backuppc, bring up the second file system, mount it somewhere temporarily, move all the data from /var/lib/backuppc over to it, then unmount and remount the second file system to /var/lib/backuppc and voila, I had all the data on a separate drive. Make it all permanent in fstab and restart backuppc and you should be good to go.
Works fine as long as you're dedicating a partion/disk/volume to BackupPC.

muna að dumpa, eða taka afrit af mysql gagnagrunninum mysqldump -u root -p --all-databases --opt > "/var/backups/mysql-$DATE.sql og taka afrit af pökkum sem eru í vélinni þá stundina dpkg --get-selections > pakkar_dagsetning

config skrár, /etc/backuppc/hosts, dhcp 0 ( ekki dhcp ), /etc/backuppc/config.pl ( global ), $Conf{XferMethod} = 'rsync';, ~/localhost.pl og ~/ferdavel.pl, $Conf{XferMethod} = 'rsync';, $Conf{RsyncShareName} = ['/'];, $Conf{BackupFilesExclude} = ['/tmp', '/media', '/mnt', '/proc', '/dev', '/var/lib/backuppc', '/lost+found', '/sys'];, þrjár stillingar, fyrir remote backup á annari vél í gegn um ssh,

Gera ssh lyklapar á myserver.mydomain.com sem notandi backuppc, su backuppc, ssh-keygen -t rsa (þarf að koma í heimamöppu backuppc /var/lib/backuppc/.ssh), enter, enter, enter, ssh-copy-id -i /var/lib/backuppc/.ssh/id_rsa.pub root@hp-ferdavel, prófa hvort virkar, ssh root@ferdavel
sbr. http://www.debian-administration.org/a... , til að taka backup af localhost með rsync. sem er backuppc server. su backuppc, cd ~, ssh-copy-id -i .ssh/id_rsa.pub root@localhost,

backuppc restore á ferdavel með live cd,
bootað með live cd, apt-get install ssh ssh-server, mkdir /hda6, mount -t ext3 /dev/hda6 /hda6; cd /hda6/etc; cp -a network/interfaces /etc/network; /etc/init.d/networking restart; ifconfig, ath iptölu ferdavelar, ssh root@192.168.1.5, su backuppc, cd /afrit2/backuppc; nano -w ( no word wrap ) .ssh/known_hosts, setja # fyrri framan alla tímabundið, ssh-copy-id -i .ssh/id_rsa.pub root@ferdavel, konqueror, brum.is/backuppc, Restore the files to share /, Restore the files below dir
(relative to share), /hda6/slóð/að/möppu, ls /slóð/að/möppu, su backuppc, cd /afrit2/backuppc. nano .ssh/known_hosts, taka út #, og eiða neðstu nýju tveimur línunum ( del ). su, grub, find /boot/grub/stage1, root (hd?,?), setup (hd0), quit, ---user backuppc á t1.brum.is---, nano -w ( no wrap ) .ssh/known_hosts, taka út # og eiða neðstu 2 línunum, del

backuppc á winxx vél;
vita ip adressuna á winxx, backuppc ( t1 ), ath. /etc/hosts, opna /etc/backuppc/server.pl, save as 192.168.1.33.pl, $Conf{XferMethod} = 'rsyncd';, $Conf{RsyncdUserName} = "root";, $Conf{RsyncdPasswd} = "notandi";, $Conf{RsyncShareName} = ['docs'];, $Conf{DumpPreUserCmd} = '$hostIP 192.168.1.33';, $Conf{DumpPreUserCmd} = '$client hp-ferdavel'; mkdir /afrit2/backuppc/pc/192.168.1.33, chown -R 109 /afrit2/backuppc/pc/192.168.1.33 && chgrp -R partimag /afrit2/backuppc/pc/192.168.1.33 && ln -s /etc/backuppc/192.168.1.33.pl /afrit2/backuppc/pc/192.168.1.33/config.pl, hp-ferdavel, backuppc.sourceforge.net eða http://sourceforge.net/project/showfil..., cygwin-rsyncd-2.6.2_0.zip, cygwin-rsyncd-2.6.2_0_README.TXT, fylgja leiðbeiningunum, úrdráttur, cd c:\rsyncd, Edit C:\rsyncd\rsyncd.secrets ( add user og passwd ) og C:\rsyncd\rsyncd.conf, modules [docs] eða [cDrive] stilla þann sem á að nota, run service.bat, /etc/backuppc/hosts

best að nota reiserfs á backuppc diska sem notaðir eru, apt-get install reiserfsprogs og /etc/fstab,
#/dev/hdb1
UUID=9ae29084-b3fc-4096-9bb7-414d655bcc8f /var/lib reiserfs defaults 0 1

fileListReceive failed villa backuppc, lausn að donwgrade rsync úr 2.6.8 til rsync 2.6.4-6, apt-get install rsync=2.6.4-6, echo rsync hold | dpkg --set-selections, þegar vill nota nýrri útgáfu af rsync, echo rsync install | dpkg --set-selections, apt-get install rsync. Líka hægt að bæta við Conf{RsyncArgs} = '--specials', '--one-file-system' í /etc/backuppc/config.pl, sbr. umræður á http://www.mail-archive.com/backuppc-u......, hægt að sækja eldri útgáfu af rsync á packages.debian.org, dpkg -i

Annars er backup pólitíkin mikilvægust. Taka backup af systeminu dpkg --get-selections > /slóð/að/pakkar_dagsetning, mysqldump -u root -p --all-databases --opt > "/var/backups/mysql-$DATE.sql"

dhcp
leiðbeiningar https://help.ubuntu.com/ubuntu/serverg..., tók um 3 mínútur að koma upp og stilla,
apt-get install dhcpd,

# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.5;
option domain-name "brum.is";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
cp -p /usr/share/systemimager/boot/x86_64/standard/initrd.img /tftpboot/

--== bind9 stillingar, er chrooted í /var/lib/named ==--
er með zoneedit.com sem secondary slave fyrir
ekaup.is á dnsþjónum ns7.zoneedit.com 216.122.7.155 og ns8.zoneedit.com 206.55.124.4,
brum.is á dnsþjónum ns8.zoneedit.com 206.55.124.4 og ns17.zoneedit.com 209.126.159.118

bandwith monitoring with vnstat
tar xvfz vnstat...gz, cd vns*, make 64bit, make install, man vnstat, vnstat -h

debconf;
til að sjá hvað er hægt að stilla í tölvu með debconf, grep Package:\\\|Depends:.*debconf /var/lib/dpkg/status til að skoða hverning pakki er stilltur með debconf, debconf-show nafn_á_pakka, til að stilla pakka, dpkg-reconfigure nafn_á_pakka, nota t. d. tila að stilla, debconf: the interface and the priority level of the questions to answer ,xserver-xorg: monitor, video card, and pointing device settings linux-image-kernelversion: a Debian kernel installed using the configuration file of the system's original kernel, instead of from source ,etherconf: network and Internet settings ,locales: the languages supported by the system ,console-data: the keyboard mappings supported by the system ,passwd: password settings ,fontconfig: system font configuration dpkg-reconfigure -plow console-data til að velja lyklaborð, dpkg-reconfigure xserver-xorg ( til að stilla skjá og lyklaborð ) skjákortið á hp-ferdavel er Ati Mobility Radeon X600, driver Ati fglrx, upplausn 1680x1050

console;
google.com, how to switch consoles linux, alt+f2, alt+f3, o. s. fr.,

minni, memory, system log,
htop, minnisnotkun, cpu notkun, f6, raða eftir mynni, endurræsa serverinn af og til til að hreinsa minnið.

external ip adressan mín er 85.197.228.252, nmap 192.168.1.0/24, nmap xxx.aaa.bbb.ccc,

wiki;
mediawiki, vantar admin stjórnum, wikipedia, sama og vanalega, lesa /usr/share/doc/forrit/README.Debian

qemu;
apt-get install kernel-source-2.4.27, make xconfig, load from file, /boot/config_skra, make dep, make modules modules_install install, apt-get install qemu, prófa, qemu -boot d -cdrom /slóð/að/iso_skra.iso, intalla öðru stýrikerfi, cd /media/sda1, df, qemu-img create winxp.img 4096M, qemu -boot d -hda /media/sda1/winxp.img -cdrom /dev/hdc -m 256 -localtim ( default -m 128 sem er full lítið fyrir winxp ), man qemu, Ctrl-Alt-f Toggle full screen, Ctrl-Alt-n Switch to virtual console ’n’. Standard console mappings are: 1 Target system display 2 Monitor 3 Serial port, Ctrl-Alt Toggle mouse and keyboard grab. In the virtual consoles, you can use Ctrl-Up, Ctrl-Down, Ctrl-PageUp and Ctrl-PageDown to move in the back log.

--== open office ==--
-= Íslensk, ensk eða hverskonar stafsetningar leiðrétting sem vera vill =-
Farðu á niðurhalssíðu OpenOffice.org (beinn tengill)
Náðu í það sem kallast "pack" undir iceland og vistaðu það á tölvunni
Opnaðu OpenOffice og farðu í File - Wizards - Install new dictionaries...
Veldu tungumál við hæfi
Veldu Start DicOOo
Hakaðu við Off-line language pack installation
Skrifaðu slóðina að orðabókinni í Select a language pack. (Skjámynd) (ath,
browse virkar ekki hjá mér) og veldu Next
Dæmi um slóð gæti verið /slóð/að/is_IS-pack.zip (ef skjalið hefur verið vistað á
skjáborðið)
Veldu þá orðabók sem þú vilt setja upp, mjög líklega er bara um eina að ræða, og
veldu Next (Skjámynd)
Nú ætti orðabókin að vera uppsett, veldu Finish til að ljúka uppsetningu
(Skjámynd)

32 bita ( 32bit ) stuðningur í amd64 umhverfi;
apt-get install ia32-libs veitir nægan stuðning til að keyra flest 32 bita forrit. vera með chroot möppu með 32 bita stýrikerfi er líka möguleiki sbr. http://haydn.debian.org/~intero-guest/...,
til að setja inn i386 pakka í amd64, dpkg -i --force-architecture packagename_i386.deb

--== drupal setup undir ispconfig ispconfig.org ==--

mikil vandræði með að fá drupal til að virka komst, keyri vefsíðuna undir ispconfig, stærsta málið var að php var keyrt í "safe mode" í ispconfig, ispmanager, sites, mysite.com, basis, ( ekki "php safe mode" ) virkar engan veginn með drupal.
tengjast framhlið, netþjónn:81

-= dns og ip, ip tala er sett á 3 stöðum =-
eitt - management, server, settings, ip address 192.168.1.5
tvö - isp manager, sites, brum.is, basis, ip address 192.168.1.5
þrjú - dns manager, domain, ip address 85.197.228.252 og records, ipaddresse 85.197.228.252, hostename www

eða .. nota internal á öll domain ( það sem kemur út úr ifconfig ), en dnsmananger,
domain.is external ip s. s. 85.197.228.252 svo domainið sjáist á internetinu. In
the DNS manager you must use your external IP and in the website settings use
your internal IP address. Bætti líka við fleiri iptölum á netkortið eth0:1 o. s.
fr..

default dns manager, domain, ip address 85.197.228.252 og records, A record, 85.197.228.252, hostname www, MX mailserver, t1.brum.is

default isp manager, sites, domain.is, basis, ipaddress 192.168.1.5, co domains, 192.168.1.5, domain brum.is

Þarf að stilla viðeigandi documentroot í /etc/apache2/http2.conf, "AllowOveride ALL" og tók út "AllowOverride Indexes AuthConfig Limit FileInfo" undir ispconfig ( öllum þremur til að notast við .htaccess í hverri möppu fyrir sig ( sem stjórnar aðgangsheimildunum ). smá conflikt á milli ispconfig og drupal.

Fékk helling af villumeldingum og komst að því að php5 virkaði ekki með ubuntu default, drupal.org, installing drupal ( leiðbeiningar ), download, wget http://drupal.org/files/projects/drupa... ( tar -zxvf drupal-x.x.x.tar.gz, cp -a drupal-x.x.x/* /var/www/webXX/web og cp -a drupal-x.x.x/.htaccess /var/www/webXX/web.

Permission denied in /var/www/includes/file.inc on line 91,
lausnin, eða skipunin ..

chown -R notandi:hópur /slóð/að/vefmöppu

indexing vandræði, til að fá search module til að virka, cp /etc/cron.daily/syslogd /etc/cron.hourly/drupal.search, eiða öllu nema fyrstu línunni, og bæta við, wget -O - -q http://t1.brum.is/cron.php, drupal indexar brum.is á klukkutíma fresti, ( heimildir 0755 root root, haka við er keyranleg ( skript )).

Íslenskun á viðmótinu. Sótti íslenska skrá http://drupal.org/project/is fyrir drupal 4.6.0 er sjálfur með 4.7.2 ( /var/www/modules/system.module, VERSION ), til að uppfæra íslenskuna og fylla upp í eiður fyrir það sem nýtt er. Leiðbeiningar á http://drupal.org/node/12890 eða Home » Developing for Drupal » Translator's guide.

Við munum skipta einni stórri is.po í minni og bera hana saman við *.pot skrárnar í drupal-pot möppunni. Búa til tóma möppu og vera þar, skipun, for i in /var/www/drupal-pot/*.pot ; do msgmerge --compendium /slóð/að/is.po -o `basename $i .pot`.po /dev/null $i ; done, ( býr til margar litlar *.po skrár úr /var/www/drupal-pot (eða /slóð/að/drupal-po/) og ber þær saman við þýðingarskrána is.po ( stór skrá, t1:/home/notandi/drupal/thiding/is.po ), Næst er að búa til eina stóra is.po skrá; msgcat --use-first general.po [^g]*.po | msgattrib --no-fuzzy -o is.po, brum.is, kerfisstjórn, tungumál, sýsla með tungumál, flytja inn, þýðingaskrá, /slóð/að/nýu/is.po skránni, flytja inn

First, put the small PO files into a subdirectory drupal-pot and your it.po file into another one. Then create an empty directory where you want to keep your new small PO files.

Rewrite modules til að leifa hrein url. sjá apache2 stillingar; kerfisstjórn, stillingar, almennar stillingar, hreinar slóðir, prófa ..., ef í lagi, virk.

php5
setti memory_limit = 50M ( úr 8M ) vegna villumeldinga í drupal /etc/php5/apache2/php.ini

drupal 5
slóðin að modules og theme er /var/www/web--/web/sites/all/--

Til að fá image til að virka, bæta við modules, images og image_assist, brum.is/admin/settings/filters/1/configure, leifð HTML tög,

--== links sem slíkir ==--
hard links - geta eingöngu tengst ákveðinni skrá, symbolic links - ln -s /slóð/að/möppu/eða/skrá /slóð/að/link, skoða með, ls -l, linkur er annað nafn á skrá, tæknilega eru allar skrár hard link þar sem þær eru tenging frá skráar nafninu til "data structursins"

--== chmod -R 0755 /slóð/að/möppu/eða/skrá ==--
heimildir 7 = ( 4,2,1 (oktal kerfið helmingast og leggst við)) r w x, 6 = ( 4, 2 )r w, 4 = ( 4 ) r, oktal 4 = r, oktal 2 = w, oktal 1 = x, röðunin er special, User, Group, Others, special er bara stakt 4 = set-Uid, 2 = set-Gid, 1 = stiki ( fyrir skriptir minnir mig (bls. 63 í Red Hat linux server)),

chown -hR eigandi /slóð/að/skrá/eða/möppu

chgrp -hR group /slóð/að/skrá/eða/möppu

Tók út úr poedit, catalog, stillingar plural forms, nplurals=INTEGER; plural=EXPRESSION;

tar villa, tar xvfz pakki.tar.gz villa
error:
tar: Archive contains obsolescent base-64 headers
I searched on the net and found lots of people running into this bug. Here is a simple solution that works for me:
gzip -d file.tar.gz
and then do
tar -xf file.tar
And it extracts without errors.

phpshop sett upp /var/www/bud/index.php ofl., define('PS_BASE', '/home/notandi/phpshop/'); og /home/notandi/phpshop/config.php, skv. /home/notandi/phpshop/docs/INSTALL.txt, frekar einfalt og hefðbundið.

Athuga firewall reglur eða hvort firewall sé á, iptables -L,

Prófa ssl, openssl s_client -connect t1.brum.is:443 -prexit

nmap -sV t1 gefur góðar upplýsingar um opin port og forrit sem nota portin.

rootkit securety scan monitoring
rkhunter, chkrootkit, Logwatch and bwm-ng monitor

clamscan -ri /
freshclam ( er sjálfvirkt og stillt á 24 sinnum á sólarhring ) /etc/clamav/freshclam.conf
server tengt á ubuntu, https://help.ubuntu.com/community/Servers

sshfs og fuse
á client
apt-get install sshfs fuse-utils && modprobe fuse, nano /etc/modules and add fuse to it, mkdir /mnt/sshfs, gera notendur að félögum í fuse hópnum, usermod -a -G fuse notandi, sshfs server:/ /mnt/sshfs

ssh fullt gluggaviðmót á annari vél
ssh server xhost + x display on a remote host
til að fá remote display til að virka /etc/ssh/sshd_config, X11Forwarding yes á bæði server og client, á client, su notandi xhost +, á server su notandi, xhost +

System documentation man ( manual ),
webmin, system, system-documentation, search for t.d, maildir, searc in, manual pages.

--==
leita að öllu sem viðkemur pakka
apt-cache search clamav ( pakki ),

vefviðmót,
/etc/cups/cups.conf, BrowseAllow, BrowseAddress, , Port 631 https://help.ubuntu.com/ubuntu/serverg..., smbpasswd -a notandi, ( er system notandi ), /etc/smb.conf, muna vel smbpasswd -a notandi
[printers]
comment = All Printers
browseable = yes
path = /tmp
printable = yes
public = yes
writable = no
create mode = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = yes
[homes]
comment = Home Directories
browseable = yes
valid users = %S
create mask = 0775
directory mask = 0775
[deila]
comment = fyrir innra netið
browseable = yes
path = /afrit/deila
write list = @deila, notandi
writable = yes
create mask = 0775
directory mask = 0775
webmail, https://t1.brum.is:10000, system, user & groups, Local groups, create a new group, members ..., notandi, sshfs t1:/ /mnt/sshfs, konqueror, /mnt/sshfs/afrit, hægri músarhnappur, eiginleikar, heimildir, read & write, chown root:deila /afrit/deila, skoða win af linux vél, apt-get install smbfs; mkdir /mnt/win1; smbmount //hp-ferdavel/deila /mnt/win1

--== denyhosts ==--

www.denyhosts.net sshd - Failed logins attacks
denyhosts sbr. http://www.howtoforge.com/preventing_s...... og http://denyhosts.sourceforge.net/, muna ef ssh virkar ekki þá athuga /etc/hosts.deny og ath. hvort ipadressan mín sé komin þangað vegna failed login, sbr. /etc/denyhosts/denyhosts.cfg, DENY_THRESHOLD_RESTRICTED = 2 ( leifir 2 failed login attemps ),
uppsetningin gróft, apt-get install python python2.3-dev python2.3, wget http://mesh.dl.sourceforge.net/sourcef......, tar xvfz DenyHosts-2.5.tar.gz; cd DenyHosts-2.5; python setup.py install. allt fer í /usr/share/denyhosts, cd /usr/share/denyhosts; cp denyhosts.cfg-dist denyhosts.cfg, ath að sé rétt miðað við debian, SECURE_LOG = /var/log/auth.log, LOCK_FILE = /var/run/denyhosts.pid, cp daemon-control-dist daemon-control, ath aftur hvort sé rétt fyrir debian DENYHOSTS_BIN = "/usr/bin/denyhosts.py", DENYHOSTS_LOCK = "/var/run/denyhosts.pid", DENYHOSTS_CFG = "/usr/share/denyhosts/denyhosts.cfg", chown root daemon-control; chmod 700 daemon-control; cd /etc/init.d; ln -s /usr/share/denyhosts/daemon-control denyhosts; update-rc.d denyhosts defaults; /etc/init.d/denyhosts start,

-= leit kfind beagle kerry =-
ef eitthvað fer úrskeiðis þegar verið er að setja inn hugbúnað með tar nota þá kfind sem root og leita á t1. servernum á /mnt/sshfs/slóð/að/möppu/hugbúnaða

-= íslenskir linux speglar =-
ftp://ftp.rhnet.isftp://ftp.rhnet.is (og http://ftp.rhnet.isftp://ftp.rhnet.isf... (og ftp://ftp.rhnet.isftp://ftp.rhnet.is (og ftp://ftp.rhnet.is (og ftp://ftp.rhnet.is (og og rsync)ftp://ftp.rhnet.isftp://ftp.rhnet.is (og ftp://ftp.rhnet.isftp://ftp.rhnet.is (og
ftp://ftp.is.debian.org/debian
ftp.rh.is

-= scriptir =-
Þegar verið er að gera sama aftur og aftur þá borgar sig að gera skriptir til að keyra. Muna chmod 755 slóð/að/skrá eða taka heila möppu í Nautilus. Hafa allar skripti í sömu möppunni í /root, byrja alltaf á #! /bin/sh

-= Ef usb harddisk vandræði =-
unplug the usb hd, rmmod usb-storage, modprobe usb-storage, plug usb hd in agean

md5 /slóð/að/skrá.md5 ...bíða... ber saman með algorithma hvort þetta er óbreitt skrá ( rétta skráin )

Clona hd – backup;
er allt hér http://www.softpanorama.org/Unixificat......
mondo – mindi, http://www.mondorescue.org/ ext3, ext2 og vfat þarf að vera compilað í kernel ( ekki sem modul )
mondoarchive -OVr -7 -d /dev/scd0 -k FAILSAFE -gF -s 4600m (sleppa -V tekur langan tíma )
mkcdrec http://mkcdrec.ota.be/project/document...
Knoppix
System rescue http://www.sysresccd.org/screenshots.e... bestur til að klona sbr.
Linux backup
http://www.linux-backup.nethttp://www....

--== Partitionir – backup og restore ==--

partimage og partimaged, client og backup server, gparted og qtparted (síðra) til að eiða, stækka og búa til partitionir, sfdisk til að taka afrit af patition table ( upplýsingum um uppsetningu á hd ) dæmi um notkun "sfdisk -d /dev/hda > hda-backup" will make a backup, and "cat hda-backup > sfdisk" will restore your partition table, partimage er til að afrita partitionum og pakka þeim þannig að lítið fari fyrir þeim og restora ( þarf að kunna á parted til þess að geta restorað án x viðmóts ). http://www.partimage.org/ Er með tutorial á winxp í ferdavélinni ( mount -t vfat /dev/hda1 /mnt/win_hda1 ), hvernig á að taka afrit af heilu diskunum ( clone hd ) með rescuecd og Knoppix og gparted, partimage
Harðdisk vandræði, sér ekki diskinn eða cd dirfið muna jumperana yfirleitt á slave ( hugsanlega secondary slave ).

-= Restoring a Debian Box af netinu í gegn um floppie og adsl tengingu. =-

# Save debian system
dpkg --get-selections * > /mnt/floppy/backup_pkg_dagsetning.lst

# Restore a debian system
boot minimum debian system (m. networking og dhcp) from its root-boot floppies
dpkg --set-selections < /mnt/floppy/backup.pkg.lst apt-get update
apt-get dselect-upgrade
apt-get dist-upgrade
apt-get upgrade
Úr debian server setup;
Smá plan - srever = tilraun.is, lítil swap 500 mb, og ein stór / sem væri þá svona í /etc/fstab /dev/sda1 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 kannski eina sem er ekki með diska kvóta ( diskakvóti nauðsinlegur á server) fyrir stórar skrár 30 G.
Lesa readme.debian sem er yfirleitt i /usr/share/doc/...

--== ssh námskeið ==--

ssh
> Is it possible to copy files with ssh?
Copy a file securely to a remote machin. Vera tengdur með ssh vélina sem á að copara af cat skrá | ssh notandi@vél_sem_á_að_copera_á(tengja_til_baka) "cat >skrá"
Copy a file securely from a remote machine
ssh user@machine "cat file" >file notandi virkaði bara á eina skrá nákvæmlega svona.
tendist t1.brum.is með ssh iptala og svo yfir á ferdavel þaðan og koperaði /home/notandi til /home/notandi/notandi_backup á ferdavel.
scp -rp root@192.168.1.5:/home/notandi/* /home/notandi/notandi_backup
að kóperara möppu yfir á t1.brum.is svona
scp -rp root@ferdavel:/home/notandi/* /home/notandi/ferdavel
ath man scp (secure copy).. eða með öðrum orðum scp efni áfangastður - þar sem bæði efni og áfangastður getur verið á þessari eða hinni tölvunni. Málið er bara þessi röð. efni og síðan áfangastaður.
sftp 192.168.1.5
sftp> --help uppl.
sftp> put /root/* /home/notandi/notandi_backup virkaði flott
muna samt að hafa réttan eiganda ef það eru afrit frá root chown -R notandi:notandi ./config/*
ssh “client” pakkanum fylgir líka sftp. ssh-agent ssh-add programs to make public key authentication more convenient, og ssh-keygen, ssh-keyscan, ssh-copy-id and ssh-argv0 utilities.
#!/bin/bash
# this tars up joe's home directory into myhome.tar.gz tarball.
/bin/tar -zcpf /home/joe/myhome.tar.gz /home/joe

# This sends the tarball to the remote directory
cat /home/joe/myhome.tar.gz | ssh remotemachine "cd backup; cat > backup.tar.gz"

dpkg-reconfigure --priority=low postfix segir til um það hversu margra spurninga dpkg-reconfigure spyr
Squirrelmail vandræði. Var í vandræðum með að fá Íslenskuna til að virka og var í um 3 tíma að finna út úr þessu. Lausnin er; dpkg-reconfigure locales og bæta við tungumáli is _IS iso99088-1
Mysql copera database; mysql -u root -p -h localhost phpshop < /home/phpshop/db/phpshop.sql
Postfix - Skuirrelmail- til að virkja aðgang þarf að senda viðkomandi notanda póst.
-Að copera innihald möppu með orginal heimildum í aðra möppu
cp -a ( sama og cp -dpR ) /var/www/mambo/* /var/www
leita að vírusum í tölvunni m. clamscan -ri, setja línu í /etc/apt/sources.list
deb http://ftp2.de.debian.org/debian-volatile sarge/volatile main
freshclam til að endurnýja gagnagrunn
Til að sækja uppfærslur ath. apt-get update og síðan apt-get dist-upgrade. stilla forrit dpkg-reconfigure nafn_á_pakka

dist-upgrade, leiðbeiningar á ubuntu.com, virkaði frá 6.06 - 6.10 edgy, smá vandamál forrit eins og cups prentarakerfið og postfix póstforritið á servernum hættu að virka, postfix er með saslauthd chrooted undir /var/spool/postfix/var/run/saslauthd í staðinn fyrir /var/run/saslauthd, stillt í /etc/init.d/saslautd

upplýsingar um harða diskinn df -h
df man df til að fá mynd af skráarkerfinu og mount point
setja inn pakka apt-get -install nafn_a_pakka
Stilla pakka dpkg-reconfigure nafn_a_pakka eða debconf -fxxx frontend týpa -pxxx gildi dpkg-reconfigure -fxxx -pxxx

--== dns ==--
muna að tæma cache á vefskoðara!!! þegar verið er að stilla á isnic.is!!!

Nettengingar - internet tengingar stillingar f. serverinn v. brum.is á isnic og zonedit.com dns sbr. perfect_setup_debian_sarge.html
/etc/network/interfaces;
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
Endurræsa svo netið með /etc/init.d/networking restart
/etc/resolv.conf
search server
nameserver 192.168.1.1
nameserver aaa.bb.cc.dd internet adressan hjá mér
nameserver aaa.bbb.ccc.aa
nameserver aaa.bbb.ccc.aaa
og hugsanlega dns hjá hive
nameserver aa.bbb.ccc.dd
----- " ------- .21

Setja hostname
echo server1.example.com > /etc/hostname
hostname -F /etc/hostname

Síminn hjá Hive er 414 1616 og isnic 525 4589

--== wget ==--
wget -c ftp://server:port/slóð/að/skra eða wget -cr .... afrita heila möppu eða jafnvel til að spegla server. Lesa help skrána.

--== xhost ==--

Opna X forrit í Ubuntu skel. sudo root, leiniorð, til að leifa root aðgang. Sem venjulegur notandi "xhost +" síðan su og root leiniorð

sendmail synaptic leita að sendmail og smtpd deamon

umount /mnt/x, device is busy gera, fuser -km /mnt/x, og svo umount /mnt/x

backup af windows rsync -av modify-window=10 src/ /afrit

chroot til að loka skráarkerfi eins og það sé sjálfstætt stýrikerfi. Til mount dæmis einhver.iso mount/ -o loop ( ath betur customising ubuntu.live iso ) chroot /slóð/að/möppu

--== phpmyadmin ==--
sækja á http://www.phpmyadmin.net, cd phpmyadmin----, cp -a config.sample.inc.php config.inc.php, setja einhvern stafastengi í cfg['blowfish_secret'] = '',

athuga hvaða hardware er í tölvunni
lshw (list hardware), þrælvirkar og lsusb til að fá usb devices og id númer þeirra

Hvað er að hlusta á hvaða port
netstat -tapn
eða netstat -tunap

til að downgrade
dpkg -i --force-all coreutils_5.2.1-2ubuntu2_amd64.deb

delete, clean disk, `rm /.Trash-0/* -rf` og `rm /home/*/.Trash-0/* -rf` örugglega nokkur gígabite af eiddu efni, eiða skrám undir /tmp, fara varlega þegar verið er að nota rm ..

systemimager
gerir image af hosts á server, sbr. http://www.falkotimme.com/howtos/syste...,

man mkautoinstallcd, mkautoinstallcd -arc i386 -out-file /var/lib/systemimager/autoinstallcd_ferdavel_ofl.iso,

--== gera eigin live cd, misofs ==--

dd if=/dev/zero of=/tmp/swap bs=1M count=3000 && mkswap swap && swapon swap

apt-get install cloop-utils && export LC_ALL=C && mount kubuntu-5.10-live-i386.iso mnt -o loop && rsync --exclude=/casper/filesystem.cloop -a mnt/ extracted_cd && extract_compressed_fs mnt/casper/filesystem.cloop > extracted_fs && umount mnt

mount extracted_fs mnt -o loop && mount -t proc proc mnt/proc && mount -t sysfs sysfs mnt/sys

nano extracted_cd/isolinux/isolinux.cfg

chroot mnt/ /bin/sh

#fyrir utan chroot
cp /etc/resolv.conf /mnt/s1/mnt/etc &&nano /etc/apt/sources.list

#í chroot
apt-get update && install qtparted gparted partimage mondo language-pack-kde-is_IS-base ssh mtools && apt-get upgrade && exit

chroot mnt dpkg-query -W --showformat='${Package} ${Version}\n' > extracted_cd/casper/filesystem.manifest && exit

umount mnt/proc mnt/sys mnt

#skissa
apt-get remove --purge apache dpkg -r apache

mkdir mnt.new && dd if=/dev/zero of=extracted_fs.new bs=1M count=2000 && mkfs.ext2 extracted_fs.new

mount -o loop,noatime,nodiratime extracted_fs mnt && mount -o loop,noatime,nodiratime extracted_fs.new mnt.new

rsync -avx --progress mnt/. mnt.new/. && umount mnt mnt.new

create_compressed_fs extracted_fs.new 65536 > extracted_cd/casper/filesystem.cloop && (cd extracted_cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)

mkisofs -r -V "notandi1 Ubuntu Live CD" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -onotandi1-kub5.10-live-i386.iso extracted_cd

--== decode encode Utube.com og video.google.com ==--

http://www.videodl.org, video.google.com slóð,
windows forritið super, færa á milli á innra netinu. annars hægt í linux líka svo sem í flv í mpeg eða avi format
ffmpeg -i video.flv -ab 56 -ar 22050 -b 500 -s 320x240 test.mpg eða ffmpeg -i youtube.flv -ar 48000 -ac 2 youtube.avi
eða bara ffmpeg -i bíómynd.flv bíómynd.avi eða bíómynd.mpg && rm bíómynd.flv

--== Xen vitual ==--
xen virtualistion glósur
enable VT í bios ath! ath í skel, cat /proc/cpuinfo, ath. flags vmx, gekk ekki.

--== Virtualbox ==--

virtualbox.org, gekk upp skv. leiðbeiningum, virtualbox er "guest" á "host" vél ( lykil atriði ) og sem notandi notandi sem er í hópnum "vboxusers", get séð filesystem á "host" frá "guest" virtual-vél undir s:\ drifi sem xp-host, þá sé ég winxp disksneiðina á "host". Bjó til 6 Gigabit skráarkerfi og set Winxp þar inn eftir að hafa ákveðið minni o.fl.. Þrælvirkar, share möppu á "guest" og windows disksneið á "host" notast við ntfs bæði á VirtualMachine og host Win disksneiðinni sem ég ætti einnig að ná að skrifa á úr linux með því að mount í /etc/fstab með ntfs-3g (third generation).
/dev/hda4 /media/ntfs ntfs-3g defaults 0 0
og/eða mount /dev/hda4 -t ntfs-3g /media/ntfs

-= til að deila möppu með host og VM vél =-

Skipunin í linux host, slökkva á guest tölvu, vera réttur notandi, su notandi, VBoxManage sharedfolder add (remove) winxp ("VM name") -name xp-server -hostpath /media/hda1
og síðan á win guest ( VM vél ). net use x: \\vboxsvr\sharename ( x: er einhver valinn bókstafur fyrir drifheitið í windows ), ef linux guest, mount -t vboxsf [-o OPTIONS] sharename ( skv VBoxManage -name "nanf" ) mountpoint ( /mnt/mappa )

-= bridgge controle brctrl f. virtualbox =-

ein skipun apt-get uml-utilities bridge-utils
tunctl -t tap1 -u notandi; chmod 0666 /dev/net/tun; brctl addbr br0; ifconfig eth0 0.0.0.0 promisc; brctl addif br0 eth0; dhclient br0; brctl addif br0 tap1; ifconfig tap1 192.168.1.51 up; bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap1/proxy_arp'; route add -host 192.168.1.33 dev tap1; arp -Ds 192.168.1.33 eth0 pub

Bæta tap1 í Interface nafn undir Virtual machine/Network Tab/Adapter 0 , save og enduræsa guest VM,

-= eða til að fá þetta fast með ákveðinni ip tölu =-
apt-get install uml-utilities bridge-utils

--== perl cpan ==--
install per modules, perl -MCPAN -e 'install Chocolate::Belgian'
ath. hvort modules er instllað eða lesa documnet fyrir perl modules, perldoc Chocolate::Belgian

--== amarok vill nota alsa ==--
stilla bæði í systemsettings og Amaroc, stilingar, stilla amarok, vél, úttaks íforrit,

startup script /etc/rc.local

--== Cannot talk to klauncher ==--
kdeinit eða dcopserver_shutdown, kdeinit

--== Mysql ==--
Villumelding. Nær ekki sambandi við gagnagrunninn sem root. Reset master root password in mysql. Fann lausnina á http://www.debian-administration.org/a...
1) root@steve:~# /usr/bin/mysqld_safe --skip-grant-tables &
[1] 6702
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6763]: started
2 ) í öðrum konsole glugga;
root@steve:~$ mysql --user=root mysql

mysql> update user set Password=PASSWORD('new-password-here') WHERE User='root';
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

mysql> exit
Bye

4 ) athuga hvernin tekist hefur til;
root@steve:~# mysql --user=root --pass=new-password-here
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.24a-Debian_4-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> exit
Bye

--== eyða algerlega ==--
shred -uz ( skrá eða * )
 

 

Tags: 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer