HomePCNew

From Wiki RB4
Revision as of 20:43, 28 June 2022 by UweHeuer (talk | contribs) (→‎Ubuntu 16.04 LTS 64-bit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

General[edit]

  • MAC 00:19:66:fb:66:80

Hardware[edit]

  • /dev/sda: ext4, 500GB
  • /dev/sdb: ext4, 500GB
  • NVIDIA GeForce 9800 GT
  • TerraTec Cinergy 1200 DVB-S

Monitors[edit]

  • Medion MD 20122 1680x1050
  • SAMTRON 1280x1024

Windows XP[edit]

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[edit]

Ubuntu 16.04 LTS 64-bit[edit]

  • IP 192.168.178.202
  • User
    • uwe: Tiger059@@
  • NVIDIA setup according to here
sudo apt-get install nvidia-340
sudo apt-get install ubuntu-desktop // because grafical logon was not possible
  • nemo = Dateien

Configuration[edit]

Update Packages[edit]
sudo apt-get upgrade
Logging[edit]
  • for description of standard logging see here in particular
 /var/log/syslog
Enable Shutdown via PHP Script[edit]
  • implemented according to variant 1 of here
sudo chmod +s /sbin/shutdown
copy shutdown.php /var/www/html/

Startup and Shutdown EMail Scripts[edit]

  • Ubuntu 16.04 uses systemd (not init.d anymore, there rcN.d logic does not work anymore)
cd /home/uwe/
sudo nano SendMailAtStartup.sh
chmod 777 SendMailAtStartup.sh
sudo nano SendMailAtShutdown.sh
chmod 777 SendMailAtShutdown.sh
/lib/systemd/system$ sudo nano sendmailatsystemevent.service
systemd-analyze verify /lib/systemd/system/sendmailatsystemevent.service
sudo systemctl enable sendmailatsystemevent.service
  • if changes to the service file run
systemctl daemon-reload
  • logging goes to /var/log/syslog via logger command

Asunder[edit]

  • for CD ripping

Git[edit]

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
git --version // prints version 2.23.0

Lamp[edit]

sudo apt-get install apache2 libapache2-mod-php7.0 php7.0 php7.0-mysql mysql-server
MySQL root pwd: Halloo0@1
/var/www/html contains html files

OwnCloud Client[edit]

  • installed according to here for Ubuntu 16.04
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/isv:ownCloud:desktop.list"
sudo apt-get update
sudo apt-get install owncloud-client
  • first call asked for configuration info
server: https://uweheuer.goip.de/owncloud/
user: uwe.heuer@gmail.com
pwd: Halloo0x1
  • change access rights
sudo chmod a+rwx /var/www/html/
  • local folder is /home/uwe/ownCloud

Putty[edit]

  • installation according to here

RDP[edit]

  • to connect to remote Windows 10 computer like Thimo PC DESKTOP-O3116A0 use Ubuntu search for RDP
  • select Remmina client
  • enter computer name and use 'Connect!'

Rhythmbox[edit]

  • easy CD ripping
    • insert CD
    • start rhythmbox
    • select eject, goes to /Uwe/Music/<Band>/<Album>/

Samba[edit]

  • share 'shareroot' for 'uwe' and 'Tiger059xx' according to here

sshfs[edit]

  • sudo apt install sshfs
sshfs root@192.168.178.35:/ ~/raspberry_root

Ssmtp[edit]

  • installation according to here
sudo apt-get install ssmtp
sudo apt-get install mailutils
sudo nano /etc/ssmtp/ssmtp.conf // add googlemail account
echo "Hello world email body" | mail -s "Test Subject" recipientname@domain.com // test

TV[edit]

sudo apt-get install nvidia-current libvdpau1
sudo apt-get install kaffeine libxine2-plugins libxine2-ffmpeg language-pack-kde-de
Set Proxy[edit]
  • Firefox -> Preferences -> Network Settings -> 178.188.209.242 55907 to watch Austrian TV streams
TVHeadEnd[edit]
  • installation according to here and different other sources (good german description.
  • because scanning errors changed from STABLE to UNSTABLE repository in /etc/apt/sources.list.d/tvheadend.list and then
sudo apt-get install tvheadend
  • uninstall by
sudo apt-get purge tvheadend
  • start-up on/off by
sudo systemctl enable tvheadend
sudo systemctl disable tvheadend
  • because of scanning errors changing /usr/share/tvheadend/data/dvb-scan/dvb-s/ Astra-19.2E (copied orginal version to /tmp)
  • http://192.168.178.202:9981
  • user is hts without password
  • stop by
sudo service tvheadend stop
  • export channels by
http://192.168.178.202:9981/playlist

Folder for recordings is /home/hts.

Test[edit]
scan /usr/share/dvb/dvb-s/

Ubuntu 15.04 64-bit[edit]

  • User:
    • uwe Tiger059xx
    • root Tiger059xx
    • Jakob JakobJakob
  • Hostname: Ubuntu-64bit
  • MAC 00:19:66:FB:66:80 (eth0)
  • Systemeinstellungen -> Anwendungen & Aktualisierungen -> Zusätzliche Treiber -> NVIDIA binary driver 34076 (Proprietär, getestet)
  • Systemeinstellungen -> Darstellung -> Größe der Startersymbole
  • Systemeinstellungen -> Anzeigegeräte -> Klebrige Ränder -> AUS
  • Systemeinstellungen -> Darstellung -> Zeige die Menüs für ein Fenster in der Titelleiste des Fensters
  • Systemeinstellungen -> Netzwerk -> Kabelgebunden -> IPv4-Einstellungen
Methode Manual
Adresse 192.168.178.202
Netzm192aske 255.255.255.0
Gateway 192.168.178.1
DNS servers 192.18.178.1
  • mount second disc and embedded partition with old Linux
cd /media
sudo mkdir SecondDisc
sudo mkdir OldLinux
  • add to /etc/fstab
UUID=359bbc09-4b74-4f63-9c93-bd85c9b10099 /media/SecondDisc ext4 defaults 0 2
UUID=b161613a-ba98-42f6-ba2a-bee03a536bcb /media/OldLinux ext4 defaults 0 2
sudo mount -a

Partitions[edit]

  • /dev/sda1: ext4, f41fca42-05d7-4036-88ca-74fbe342e5f0, for Ubuntu 15.04
  • /dev/sda2: Container for logical partions, 400GB
  • /dev/sda5: ext4, 389GB, b161613a-ba98-42f6-ba2a-bee03a536bcb
  • /dev/sda6: Linux swap, 10 GB, 6a318dc7-70e4-404d-b5b6-bafd13eda247
  • /dev/sdb1: ext4, 359bbc09-4b74-4f63-9c93-bd85c9b10099, 500GB

Apache[edit]

  • Ubuntu Software-Center -> Apache HTTP Server
  • normal pages go to /var/www/html
Configuration[edit]
Enable SSL[edit]
  • according to here
    • create private key:
sudo -i
openssl genrsa -out /etc/ssl/private/apache.key 2048
    • create a certificate
openssl req -new -x509 -key /etc/ssl/private/apache.key -days 365 -sha256 -out /etc/ssl/certs/apache.crt
exit
    • check if apache is listening at port 443 as configured in /etc/apache2/ports.conf
    • activate ssl module
sudo a2enmod ssl
sudo service apache2 force-reload
    • edited /etc/apache2/sites-available/default-ssl.conf to use the new key and certificate
    • activate it by
sudo a2ensite ssl.conf
sudo service apache2 force-reload

Caffeine[edit]

  • prevent screen saver while watching TV by
Version 2.8[edit]
  • currently not used
  • has no configuration dialog anymore and disables screensaver if an application is running in full screen mode
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine
  • start Caffeine and Caffeine Indictor via Unity start menu (Dash)
2.5[edit]


Cairo Dock[edit]

  • install by
sudo apt-get install cairo-dock cairo-dock-plug-ins

Classic Menu Indicator[edit]

  • install classic menu indicator
sudo apt-add-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install classicmenu-indicator
  • start it via search in Unity start menu (Dash) and enter the name

Enable remote Access To Desktop[edit]

  • in Dash search for 'Arbeitsfläche' and select 'Freigabe der Arbeitsfläche'
  • select 'Anderen Benutzern erlauben ...' anzuzeigen and zu steuern
  • select password 'halloo'
  • select UPnP router
  • use VNC client with port 5900

Enable remote Shutdown[edit]

  • 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 and make it executable
  • create /var/www/Shutdown.php

Fritzbox[edit]

Gnome System Tools[edit]

  • installation by
apt-get install gnome-system-tools

Java[edit]

  • Ubuntu Software-Center -> Bearbeiten -> Software Paket-Quellen -> Andere Software -> Hinzufügen -> ppa:webupd8team/java
  • Ubuntu Software-Center schliessen
  • sudo apt-get install oracle-java8-installer
java -version gives 1.8.0_66
  • add in java console
/usr/lib/jvm/java-8-oracle/bin/jcontrol
  • Sicherheit -> Ausnahmeliste
http://localhost/uweheuer/
http://www.uweheuer.de/uweheuer/
http://euve33303.vserver.de/uweheuer/
  • and 'Erweitert -> Konsole anzeigen' anwählen
  • java console
/usr/lib/jvm/java-8-oracle/bin/jcontrol
  • enable clipboard and encryption by editing /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy with this
  • copy a backup to /backup/my.java.policy
  • set /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy like above to avoid security exceptions and enable cut&copy in uweheuer applet

JBoss[edit]

  • download installer version of JBoss EAP from www.jboss.org
  • start installer by
sudo java -jar jboss-eap-6.4.0-installer.jar
  • to /root/EAP-6.4.0
  • with user admin and password Halloo0@1
  • check can be done http://localhost:8080
  • create autostart daemon according to here by copying /etc/init.d/jboss7 from old installation and adjust path, then register by
sudo chmod 755 /etc/init.d/jboss7
sudo update-rc.d jboss7 defaults // log goes to /var/log/uwes.log
  • enable remote access according to here via Admin Console -> Configuration -> General * Configuration -> Interfaces
  • make directory accessible for everyone by in root directory
sudo chmod 777 root
  • add ProxyPass entry for JBoss console in /etc/apache2/sites-enabled/default-ssl.conf (and decommented in 000-default.conf)
ProxyPass /uweheuer ajp://localhost:8009/uweheuer
ProxyPassReverse /uweheuer http://localhost/uweheuer
ProxyPass /jboss7-console http://localhost:9990/console
ProxyPassReverse /jboss7-console http://localhost:9990/console
  • add to /etc/apache2/sites-enabled/000-default.conf
Redirect permanent /uweheuer https://192.168.178.202/uweheuer
  • sudo a2enmod proxy_ajp (creates /etc/apache2/mods-enabled/proxy.conf und proxy_ajp.conf)
  • edit /etc/apache2/mods-enabled/proxy.conf (Deny from all to Allow from all)
  • add the following entries in JBoss admin console -> Configuration -> Web -> Servlet/HTTP -> Connectors -> Add
Name: ajp
SocketBinding: ajp
Protocol: AJP/1.3
Scheme: http
Enabled: true
  • service apache2 restart

Kaffeine[edit]

  • Installation according to here
  • Fernsehen -> Configure Television -> Ordner setzen

MiniDLAN[edit]

apt-get minidlna
  • will include autostart service
  • edit /etc/minidlna.conf
media_dir=V,/media/SecondDisc/Movies // for video folder
friendly_name=Ubuntu MiniDLNA // for clients
inotify=yes // to autodetect new files
  • and restart service by
service minidlna restart
  • log file goes to /var/log/minidlna.log

Mediawiki[edit]

  • copy /var/lib/mediawiki/ from Ubuntu 14.04 to new /var/lib/mediawiki/ (all configurations are stored in /var/lib/mediawiki/LocalSettings.php)
  • call batch on HP Laptop CopyMediaWikiTo192.168.178.202.bat

MyProgs[edit]

  • see /myprogs/
  • DisAndEnableUweHeuer.bat for UweHeuer App

MySQL[edit]

  • Ubuntu Software-Center -> MySQL Server
  • mysql --user=root works
  • decommend bind-address in /etc/mysql/mysql.conf.d/mysqld.cnf
  • change root password by
mysql --user=root
UPDATE mysql.user SET Password = PASSWORD("root") WHERE user = "root";
FLUSH PRIVILEGES;
  • to avoid login conflicts for different root user, delete all root user except the one with host = %

Nemo[edit]

  • install Nemo via Ubuntu Software-Center
  • top element in left icon bar
  • set Nemo as default by editing /usr/share/applications/nemo.desktop and extend exec command to
Exec=gksudo -k -u root nemo
xdg-mine default nemo.desktop inode/directory application/x-gnome-saved-search
  • set Nemo as start as root by
  • set default view by Bearbeiten -> Einstellungen -> Ansichten -> Select Listenansicht
  • set split view by Bearbeiten -> Einstellungen -> Verhalten -> Immer in Zweispaltenansicht starten
Operation[edit]
  • F3 creates split screen
  • SSH: Menu->Datei->Mit Server verbinden ...->Select SSH

OpenSSH[edit]

  • to enable login via SSH
apt-get install openssh-server
  • check if ssh is running by
sudo netstat -tuplen | grep 22
  • login e.g. by WinSCP with uwe and halloo
  • to enable root login give root a password by
sudo passwd root
  • in /etc/ssh/sshd_config change
PermitRootLogin yes
  • restart ssh service
service ssh restart

PHP[edit]

  • Ubuntu Software-Center -> PHP5

PHPMyAdmin[edit]

  • Ubuntu Software-Center -> phpmyadmin
  • add to /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf
  • /etc/init.d/apache2 reload
  • sudo dpkg-reconfigure phpmyadmin
DB-User: root
DP-PWD: root
PHPMyAdmin DB Name: phpmyadmin
  • decommend line with AllowNoPassword in /etc/phpmyadmin/config.inc.php

Postfix[edit]

  • installation according to here
sudo apt-get install postfix libsasl2-modules bsd-mailx 
ubuntu-64bit.uweheuer
[smtp.gmail.com]:587
uwe.heuer@gmx.de
ubuntu-64bit, localhost.localdomain, localhost
::ffff:127.0.0.0]/104 [::1]/128
+
alle
  • goes to /etc/postfix/main.cf
  • add to it
smtp_sasl_auth_enable = yes
# noplaintext weglassen, wenn Passwörter im Klartext übertragen werden müssen:
# (nicht empfohlen, nur wenn's anders nicht funktioniert)
smtp_sasl_security_options = noplaintext noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
  • create /etc/postfix/sasl_password by
sudo touch /etc/postfix/sasl_password
  • and add to it
[smtp.gmail.com]:587 uwe.heuer@gmail.com:Halloo0@1
  • secure it by
sudo chmod 600 /etc/postfix/sasl_password 
  • and create db
sudo postmap hash:/etc/postfix/sasl_password 
  • and restart postfix
sudo /etc/init.d/postfix restart
  • add correct sender address by adding /etc/postfix/main.cf
sender_canonical_maps = hash:/etc/postfix/sender_canonical
  • create db by
postmap /etc/postfix/sender_canonical
  • and restart postfix
  • add to /etc/postfix/main.cf
smtp_tls_security_level = may
  • restart postfix
  • test it by
mail -s "testbetreff" uwe.heuer@gmx.de < /tmp/testmail.txt
  • create /etc/init.d/SendMailAtStartup and chmod +x SendMailAtStartup
  • /etc/init.d/sudo update-rc.d SendMailAtStartup start 20 2 3 4 5 .
  • /etc/init.d/sudo update-rc.d SendMailAtShutdown 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

Putty[edit]

  • installed via Ubuntu Software-Center

Samba[edit]

  • configuration of shares via Samba (use general ubuntu search with 'Samba' to get the configuration app)
  • the configuration goes to /etc/samba/smb.conf
  • Share name is UBUNTU64_ROOT, users are (see Einstellungen -> Samba-Benutzer) are 'root' and 'uwe' (! case-sensitive!) with pwd 'Kose059XX'
  • to workaround the general error of sharing the root directory (see here) added to /etc/samba/smb.conf
# 2017_11_04 UH begin: added to workaround for root sharing
   wide links = yes
   unix extensions = no
# 2017_11_04 UH end:
  • the old workaround to share the backup directory via UBUNTU64_BACKUP share is not needed anymore
  • restart of samba server can be done by
sudo /etc/init.d/smbd restart
  • or
sudo service smbd restart

Spotify[edit]

UweHeuer[edit]

  • create DB table mysql505 in mysql client with
CREATE DATABASE mysql505;
  • copy data by
C:\Uwes\Batches>CopyMySQL505To192.168.178.202.bat
  • create sub directory 'uweheuer' in JBoss data directory
  • add ProxyPass entry in /etc/apache2/sites-enabled/000-default.conf
  • sudo a2enmod proxy_ajp (creates /etc/apache2/mods-enabled/proxy.conf und proxy_ajp.conf)
  • edit /etc/apache2/mods-enabled/proxy.conf (Deny from all to Allow from all)
  • service apache2 restart
  • deploy mysql-connector-java-5.1.36.jar via JBoss Admin Console -> Deployments
  • add Datasources via JBoss -> Admin Console -> Configuration -> Connector -> Datasources -> Add
Name: MySQLDS
JNDI: java:jboss/datasources/MySQLDS
Driver: mysql-connector-java-5.1.36.jarcom.mysql.jdbc.Driver_5_1
Connection URL: jdbc:mysql://localhost/mysql505?autoReconnect=true
User: root
Password: root
Name: UwesWikiDS
JNDI: java:jboss/datasources/UwesWikiDS
Driver: mysql-connector-java-5.1.36.jarcom.mysql.jdbc.Driver_5_1
Connection URL: jdbc:mysql://localhost/mediawiki
User: root
Password: root
  • disable datasource MySQLDS and set Validation
Valid Connection Checker: org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker
Check Valid Sql:
Background Validation: true
Validation Millis: 36000
Exception Sorter: org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter
  • deployed via Eclipse ant target 'deploy_home'
  • data files in .../standalone/data/uweheuer
    • abc.tmp
    • Configuration.properties
  • copy C:\Uwes\Batches\DisAndEnableUweHeuer.bat to /myprogs which is called from the management service

VLC[edit]

  • install by
sudo apt-get install vlc
  • to avoid teletext decoder error message install VBI teletext plugin for VLC

Wake up on LAN (WOL)[edit]

  • 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"

WinSCP[edit]

  • download and extracted WinSCP to /myprogs/winscp/
  • in shell do
sudo su
wine WinSCP.exe // there will be errors but it will start eventually

Upgrade to 14.04 via 12 (obsolete)[edit]

  • 32 bit version (see uname -a)
  • mysql passwort 'root'
  • to enable minimizing windows by launcher
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true
  • !!! not used anymore because new unity works well !!! Extensions:
    • Dash to Dock
    • Taskbar
  • Grafikarte
/usr/lib/nux/unity_support_test -p
... 304.125
sudo software-properties-gtk
  • reinstall unity-control-center
  • decomment bind-address in /etc/mysql/mysql.cnf to have local and remote access and restart mysql by
sudo /etc/init.d/mysql restart
  • remote access
    • Windows remote desktop
      • sesman-Xvnc
      • uwe
      • halloo
      • -1 or if reconnect port number of first connect

Older Ubuntu Versions[edit]

User[edit]

  • uwe halloo

My Scripts[edit]

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

Firefox[edit]

Fritzbox[edit]

  • configured according to http://dominicpratt.de/fritz-nas-unter-debianubuntu-einbinden/
  • add /etc/fstab with noauto, because network is not yet available while booting and operating fstab
  • mkdir /media/fritzbox
  • create /etc/samba/auth
  • sudo mount -a or sudo mount /media/fritzbox-nas or in root dophin to mount the NAS

KDEWallet[edit]

  • pwd Halloo0@1

Dolphin[edit]

  • in Network add Server4You root directory

Apache[edit]

General configuration information for configuration and operation can be found here

  • sudo apt-get install apache2
  • pages in /var/www/
  • added to /etc/apache2/sites-enabled/000-default proxy configuration to JBoss for uweheuer application
  • 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

Java[edit]

  • download java 7 32-bit for i586 for Linux from oracle website and extract it to /usr/lib/jvm/jdk1.7.0_45
  • set JAVA_HOME in /etc/environment
  • set /usr/lib/jvm/jdk1.7.0_45/jre/lib/security/java.policy to avoid security exceptions and enable cut&copy in uweheuer applet
permission java.awt.AWTPermission "accessClipboard";
permission java.security.AllPermission;	
  • to enable it in Firefox
cd /usr/lib/mozilla/plugins
ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/i386/libnpjp2.so
Upgrade to Java 8[edit]
  • following advice from here:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
java -version // delivers java version "1.8.0_45"
  • java console
/usr/lib/jvm/java-8-oracle/bin/jcontrol
  • enable clipboard and encryption by editing /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy with this
  • set /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy like above to avoid security exceptions and enable cut&copy in uweheuer applet

JBoss 5[edit]

  • 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[edit]

Upgrade to EAP 6.4[edit]
  • copied locally de-zipped version to /usr/share/jboss-eap-6.4/
  • adjusted symbolic link /usr/share/jboss7
  • added remote access according JBoss
  • make add-user.sh executable by chmod a+x add-user.sh
  • add user 'UweHeuer' with 'Halloo0@1'
  • make deployment directory accessible for everyone by chmod ugo+rw deployments/
  • create sub directory 'uweheuer' in data directory for UweHeuer application
JBoss 7[edit]

!!! partly obsolete - see upgrade !!!

  • 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 ajp to connect to http proxy for uweheuer and jboss console
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" enabled="true"/>
  • /usr/share/jboss7/standalone/configuration/standalone.xml.sik is a backup in case of data loss
  • 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[edit]

Mediatomb

MySQL[edit]

  • 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[edit]

  • 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

Gitlab[edit]

  • Installation of GitLab according to here
  • but errors

Postfix[edit]

  • Installationsanleitung nicht mehr bekannt (vermutlich http://wiki.ubuntuusers.de/Postfix) and additionally for send via gmail this
  • 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[edit]

    • 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[edit]

  • 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[edit]

  • copy content of mediawiki-1.25.1.tar.gz to /var/lib/mediawiki
  • installation via first call http://localhost/mediawiki
    • Admin username: WikiSysop halloo
    • Database name: mediawiki
    • DB user: root
    • DB password: root
  • all settings are stored in \var\lib\mediawiki\LocalSettings.php
  • copy from Laptop to New Home PC via CopyUwesWikiTo192.168.178.202.bat
  • Apache configuration is stored in /etc/mediawiki/

Prevent some daemons like apache don' start[edit]

root enabled[edit]

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

Enable remote Shutdown[edit]

  • 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[edit]

Disable Screen Saver while watching TV[edit]

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

Remove USB Hard disk[edit]

'Safely remove drive' produces errors and won't be fixed (in ubuntu version 12 udisk2 will be used). To see all USB devices:

lsusb
mount
sudo fdisk -l

So use:

  • hdparm -Y /dev/sdg
  • sudo umount -l /dev/sdg
  • eject /dev/sdg