HomePCNew: Difference between revisions

From Wiki RB4
Line 102: Line 102:
* /etc/init.d/sudo update-rc.d SendMailAtStartup.bat start 20 2 3 4 5 .
* /etc/init.d/sudo update-rc.d SendMailAtStartup.bat start 20 2 3 4 5 .
* /etc/init.d/sudo update-rc.d SendMailAtShutdown.bat stop 20 0 1 6 .
* /etc/init.d/sudo update-rc.d SendMailAtShutdown.bat stop 20 0 1 6 .
To see the mail in queue use
mailq


If many mails have been queued e.g. because of an error than you can delete all queued mails by
If many mails have been queued e.g. because of an error than you can delete all queued mails by

Revision as of 13:00, 16 September 2012

Windows XP

Admin Password: halloo

192.168.178.202 Subnet 255.255.255.0 Standardgateway 192.168.178.1 DNS 192.168.178.1

Nur Verwaltungsstationen dürfen den Rechner starten

Ubuntu

User

  • uwe halloo

Hardware

  • /dev/sda: ntfs, 500GB
  • /dev/sdb: ext4, 500GB

Monitors

  • Medion MD 20122 1680x1050
  • SAMTRON 1280x1024

Partitions

  • /dev/sda1: ntfs, 101GB, windows, mounted at /media/sda1
  • /dev/sda2: Container for logical partions, 400GB
  • /dev/sda5: ext4, 389GB, mounted at /
  • /dev/sda6: Linux swap, 10 GB
  • /dev/sdb1: ext4, 500GB

My Scripts

  • /home/uwe/RenameM2T_to_MPG.sh
  • /home/uwe/DeleteRecursiveMPG.sh

Firefox

Apache

General configuration information for configuration and operation can be found here

  • sudo apt-get install apache2
  • <Scripts> in /var/www/
  • added to /etc/apache2/sites-enabled/000-default proxy configuration to JBoss for uweheuer application

JBoss 5

  • sudo apt-get install tar bzip2 gzip zip unzip unace p7zip lha rar unrar-free
  • sudo apt-get install unp
  • download jboss-5.1.0.GA.zip, unzip, copy to /opt/ and chown -R root <DIR>
  • sudo cp /home/jboss/jboss/bin/jboss_init_redhat.sh /etc/init.d/jboss
  • adjust /etc/init.d/jboss
  • sudo chmod ug+x /etc/init.d/jboss
  • sudo update-rc.d jboss defaults
  • manual start or stop in terminal with sudo /etc/init.d/jboss [start|stop]
  • add modify content access right to directory /opt/jboss-5-1.0.GA/server/default

JBoss 7

  • download JBoss 7.1 to /tmp
  • cd /usr/share
  • tar xvf /temp/jboss-as-7.1.0.Final.tar.gz
  • ln -s /usr/share/jboss-as-7.1.0.Final /usr/share/jboss7
  • create /etc/init.d/jboss7 according to https://gist.github.com/1543449 and ajust pathes, users and commands
  • adjust /usr/share/jboss7/standalone/configuration/standalone to accept remote access for normal and admin users according to this
  • add admin user 'UweHeuer' with password 'halloo' by add-user.sh
  • added database configuration according to here
  • /etc/init.d/update-rc.d jboss7 defaults
  • operation see JBoss

Mediatomb

Mediatomb

MySQL

  • decommented in /etc/mysql/my.cnf the entry bind-address
  • added /etc/mysql/my.cnf the entry wait_timeout=2147483 because JBoss DB connection are shut down by mysql after a long time (default value is 28000)
  • mysql --user=root and use mysql and INSERT INTO user (Host, User, Passwort) VALUES('%','root',); and CREATE DATABASE mysql504;
  • mysql and GRANT ALL PRIVILEGES ON *.* TO root WITH GRANT OPTION;

Samba

  • System->Administration->Samba->Button Add Share + Select Directory + Access Tab + Select samba user + Preferences->Samba Users + Change Password of user uwe to halloo
  • in Windows Map Network Drive 192.168.172.201/root with User uwe and password halloo
  • sudo a2enmod proxy_ajp (creates /etc/apache2/mods-enabled/proxy.conf und proxy_ajp.conf)
  • cp /mods-enabled/proxy.conf as backup to proxy.conf.bak
  • edit proxy.conf (Deny from all to Allow from all)
  • cp /sites-enabled/000-default to 000-default.bak as backup
  • edit 000-default (add ProxyPass und ProxyReversePass)
  • restart apache with sudo /etc/init.d/apache2 restart
  • for PHP edit saved /etc/php5/apache2/php.ini to php.ini.bak and edit for mediawiki
  • install phpmyadmin and enable log in without password in /etc/phpmyadmin/config.inc.php


Postfix

  • Installationsanleitung nicht mehr bekannt (vermutlich http://wiki.ubuntuusers.de/Postfix)
  • smtp server access put in /etc/postfix/sasl_password, update postfix db and restart by
sudo postmap hash:/etc/postfix/sasl_password 
sudo /etc/init.d/postfix restart
  • create /etc/init.d/SendMailAtStartup.bat and chmod +x SendMailAtStartup.bat
  • /etc/init.d/sudo update-rc.d SendMailAtStartup.bat start 20 2 3 4 5 .
  • /etc/init.d/sudo update-rc.d SendMailAtShutdown.bat stop 20 0 1 6 .

To see the mail in queue use

mailq

If many mails have been queued e.g. because of an error than you can delete all queued mails by

su
postsuper -d ALL

Logs are in /var/log/mail.err and /var/log/mail.log

enable java plug-in working in firefox switch to sun java

    • sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    • sudo apt-get update
    • sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-jdk
    • sudo apt-get install sun-java6-fonts
    • sudo update-java-alternatives --set java-6-sun
    • installation in /usr/bin/(java|ControlPanel)
    • java -version

Wake Up On LAN

  • WOL: install ethtool and in /etc/rc.local add ethtool -s eth0 wol g and in /etc/init.d/halt change NETDOWN=no and in /etc/default/acpi-support change STOP_SERVICES="networking"

Mediawiki

  • install mediawiki per adept
  • mysql and INSERT INTO user (Host, User, Password) VALUES('%','uweswiki',PASSWORD('uweswiki'));
  • installation via first call http://localhost/mediawiki
    • Admin username: WikiSysop halloo
    • Database name: mediawiki
    • DB user: wikiuser
    • DB password: wikiuser
  • Copy from Laptop to New Home PC via CopyUwesWikiTo192.168.178.202.bat

Prevent some daemons like apache don' start

root enabled

sudo passwd root
Password: <dein User Passwort> (halloo)
New password: halloo
Re-enter new password: halloo

Enable remote Shutdown

  • sudo visudo
    • add uwe ALL = NOPASSWD: /etc/MyShutdown.sh to prevent passwort Abfrage
    • add apache user www-data ALL = NOPASSWD: /etc/MyShutdown.sh to prevent passwort Abfrage
  • create /etc/MyShutdown.sh
  • create /var/www/Shutdown.php

Enable remote Access

Disable Screen Saver while watching TV

see http://linuxundich.de/de/ubuntu/dem-bildschirmschoner-eine-auszeit-gonnen/#more-6849

  • sudo add-apt-repository ppa:caffeine-developers/ppa
  • sudo apt-get update && sudo apt-get install caffeine
  • Applications->Accessories->Caffeine add Caffeine Cup Icon to Panel
  • Click to Cup->Enable/Disable Screensaver