CategoryAdministration

NTP configuration

To initially setup the time if there is a big difference you can use the following command
 /usr/sbin/ntpdate -s -b -p 8 -u yourISP.NTP.Server.IP
    Debian:
    Setting timezone:
    sudo dpkg-reconfigure tzdata
    
    /etc/ntp.conf
    server 0.bg.pool.ntp.org
    server 1.europe.pool.ntp.org
    server 2.europe.pool.ntp.org
    Great references http://www.akadia.com/services/ntp_synchronize.html

    hwclock –systohc

    Trac administration

    Trac
    ==Start the administration==
    trac-admin /home/domains/spider/trac-dagensps

    ==Run the server with==
    tracd –auth=*,/home/domains/spider/.passwords,spider.bg –port 8000 /home/domains/spider/trac_envs/dagensps /home/domains/spider/trac_envs/trucks

    ==Add users==
    htdigest /home/domains/spider/.passwords spider.bg a.inkov@spider.bg

    ==Apache Integration==
    http://trac.edgewall.org/wiki/TracCgi#AddingAuthentication
    Here is what I use to start the trac in spider:
    router:/home/domains/spider# cat trac.start.sh
    #!/bin/bash
    tracd –port 8000 \
    –auth=dagensps,/home/domains/spider/.passwords,spider.bg /home/domains/spider/trac_envs/dagensps \
    –auth=trucks,/home/domains/spider/.passwords,spider.bg /home/domains/spider/trac_envs/trucks \
    –auth=bbi,/home/domains/spider/.bbi_passwords,spider.bg /home/domains/spider/trac_envs/bbi/

    Bash tips and tricks

    Nice quick bash book

    http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html (loops)

    How to check if files containt “this” and “that”

    grep -i 'for nut in self._foundNuts:' `grep -ril "loop(1):" *`

    Display timestamp

    date -d @1231351762

    Nginx with Rails

    downloaded from here
    documentation here
    If you want to try different solution check it haproxy Continue reading

    Debian/Ubunto notes

    How to save and installed packges

    http://www.cyberciti.biz/tips/linux-get-list-installed-software-reinstallation-restore.html

    $ dpkg --get-selections > /backup/installed-software.log

    # dpkg --set-selections < /backup/installed-software.log

    Now your list is imported use dselect or other tools to install the package.
    # dselect

    Select ‘i‘ for install the software.

    Upgrade Debian

    http://www.cyberciti.biz/tips/upgrading-debian-sarga-3-to-etch-4.html

    Commands

    cat /etc/debian_version

    Fix the W: There are no public key available for the following key IDs:

    4D270D06F42584E6

    apt-key update

    gpg –keyserver wwwkeys.eu.pgp.net –recv-keys XXXXXXXXXXXXXXXX
    apt-key add /root/.gnupg/pubring.gpg
    apt-get update

    debian tracd initscript

    Trac startup script.

    Continue reading

    Gentoo Cheatsheet

    Java install

    ls /usr/portage/dev-java/sun-jdk/
    emerge -av =dev-java/sun-jdk-1.5.0.13
    java-config -L
    java-config -S 1
    /usr/sbin/env-update && source /etc/profile

    Emerge and Equery

    Taken from here

    emerge brings in new packages. equery looks at the package database.

    update repository:
    emerge –sync
    install package with query
    emrge -av sun-jdk
    start with this software
    emerge links wget htop
    emerge …
    manipulate package database
    emerge -NDtu world
    –update packages and packages that depend on updated packages (–deep) in the world list. Give output in –tree format. Consider packages changed if their USE flags have changed (–newuse, -N) Add –pretend (-p) to just see what it will do first.
    emerge –skipfirst …
    skip first pkg on a rebuild; very useful if something doesn’t work
    equery …
    query package database
    equary belongs
    who owns these files?
    equery list
    list packages on system

    Maintenance

    Taken from here

    Do this whenever you want a steaming pile of fresh packages.

    # emerge --sync
    # emerge --update system
    # etc-update
    if necessary
    # emerge --update world

    I have seen Meddle to do it this way

    emerge –newuse –deep –update world
    emerge –ask –verbose coreutils
    emerge –resume

    Fix the mktemp / coreutils block in Gentoo

    Looks like mktemp is now provided by coreutils. No wonder. This block has been bugging me (read: I’ve been ignoring it) for months.

    To fix just unmerge mktemp and update coreutils.

    Update: Same for the setarch / util-linux block should you come across it. Unmerge setarch.

    Software and Tutorial Links

    IPTables
    Linux firewall with packet string-matching support
    http://www.securityfocus.com/infocus/1531
    Firewall scripts
    http://linuxfirewall.start.bg/
    http://www.puschitz.com/FirewallAndRouters.shtml
    Debian Kernel how-to
    http://myfreesoft.net/phpBB2/viewtopic.php?t=52 * in Bulgarian *
    Source: http://www.howtoforge.com/forums/showthread.php?t=21
    http://www.howtoforge.com/kernel_compilation_debian
    Active Ports (Windows)
    http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx
    Security and Audits Checks & updates
    http://sourceforge.net/projects/advchk
    RedHat – http://www.redhat.com/spacewalk/

    © 2024 Gudasoft

    Theme by Anders NorénUp ↑