RedirectMatch ^/$ /mythweb/
And restart Apache:
# /etc/init.d/apache2 reload
My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.
RedirectMatch ^/$ /mythweb/
# /etc/init.d/apache2 reload
# apt-get install ddclient
I went ahead and entered configuration for DynDNS during the install when prompted.
# vi /etc/ddclient.conf
# cat ddclient.conf# Configuration file for ddclient
#
# /etc/ddclient.conf
pid=/var/run/ddclient.pid
ssl=yes
protocol=dyndns2
use=web
server=members.dyndns.org
login=dyndns-login
password=dyndns-password
my-addr.dyndns.org
##
## OpenDNS.com account-configuration
##
use=web, web=whatismyip.org
server=updates.opendns.com
protocol=dyndns2
login=opendns-login
password=opendns-password
OpenDNS-Network-Label
# chmod 600 /etc/ddclient.conf
# vi /etc/cron.daily/ddclient
# cat /etc/cron.daily/ddclient#!/bin/sh
/usr/sbin/ddclient -syslog
# chmod +x /etc/cron.daily/ddclient
apt-get install samba
--------- IMPORTANT INFORMATION FOR XINETD USERS ----------
The following line will be added to your /etc/inetd.conf file:
## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd
If you are indeed using xinetd, you will have to convert the
above into /etc/xinetd.conf format, and add it manually. See
/usr/share/doc/xinetd/README.Debian for more information.
-----------------------------------------------------------
[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server.
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
# This option controls how nsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[tmp]
comment = tmp
path = /tmp
valid users = username
writable = yes
create mask = 0644
directory mask = 0755
# testparm -s
Load smb config files from /etc/samba/smb.conf
Processing section "[music]"
Loaded services file OK.
...
# /etc/init.d/samba reload
* Reloading /etc/samba/smb.conf smbd only
...done.
smbpasswd -a username
[ -x /etc/init.d/mythtv-status ] && /etc/init.d/mythtv-status reload > /dev/null
# mythtv-status > /dev/null
No config found; attempting to find mythbackend via UPnP.
# perl -e "require MythTV"
No config found; attempting to find mythbackend via UPnP.
No backends found. Please copy /root/.mythtv/config.xml from a working MythTV installation instead.
Compilation failed in require at -e line 1.
CRON[11591]: User account has expired
# grep root /etc/shadow
root:!:14145:0:99999:7::1:
/dev/vmmon[12315]: host clock rate change request 26 -> 30
# cat /proc/cpuinfo | grep "MHz"
cpu MHz : 2400.000
# vi /etc/vmware/config
# tail -3 /etc/vmware/config
host.cpukHz = 2400000
host.noTSC = TRUE
ptsc.noTSC = TRUE
host.useFastClock = FALSE
# htdigest /etc/mythtv/mythweb-digest MythTV mythtv
Adding user mythtv in realm MythTV
New password:
Re-type new password:
$ vi ~/.xsessionrcUpdated Oct 24, 2008: I later also disabled the gnome-screensaver
$ cat ~/.xsessionrc
xset s noblank
xset s off
xset -dpms
Now restart desktop so changes take effect
$ sudo /etc/init.d/gdm restart
# irw
00000000000017a9 00 Blue Hauppauge_350
00000000000017a9 01 Blue Hauppauge_350
00000000000017a9 02 Blue Hauppauge_350
00000000000017bb 00 Go Hauppauge_350
00000000000017bb 01 Go Hauppauge_350
00000000000017bb 02 Go Hauppauge_350
$ cd ~/.lirc
$ cp mythtv mythtv.orig
$ vi mythtv
$ diff -c mythtv.orig mythtv
*** mythtv.orig 2008-09-24 21:05:35.000000000 -0500
--- mythtv 2008-09-24 21:39:34.000000000 -0500
***************
*** 733,738 ****
--- 733,774 ----
begin
remote = Hauppauge_350
prog = mythtv
+ button = Blue
+ config = d
+ repeat = 0
+ delay = 0
+ end
+
+ begin
+ remote = Hauppauge_350
+ prog = mythtv
+ button = Videos
+ config = r
+ repeat = 0
+ delay = 0
+ end
+
+ begin
+ remote = Hauppauge_350
+ prog = mythtv
+ button = TV
+ config = l
+ repeat = 0
+ delay = 0
+ end
+
+ begin
+ remote = Hauppauge_350
+ prog = mythtv
+ button = RED
+ config = m
+ repeat = 0
+ delay = 0
+ end
+
+ begin
+ remote = Hauppauge_350
+ prog = mythtv
button = 7
config = 7
repeat = 0
sudo /etc/init.d/lirc restart
2008-09-22 21:52:33.292 TFW, Error: Opening file '/mnt/data/mythtv/1002_20080922215232.mpg'.
eno: Permission denied (13)
# chown mythtv:mythtv /mnt/data/mythtv/
apt-get install screen cvs
# cd /tmp
# wget http://www.cirt.net/nikto/nikto-current.tar.gz
# tar xvfz nikto-current.tar.gz
# mv nikto /usr/local/nikto-2.03
# /usr/local/nikto-2.03/nikto.pl -h web-server
- Nikto v2.03/2.04
---------------------------------------------------------------------------
+ Target IP: 192.168.1.11
+ Target Hostname: web-server
+ Target Port: 80
+ Start Time: 2008-09-15 16:58:59
---------------------------------------------------------------------------
+ Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
- Root page / redirects to: /wiki/
+ Apache/2.2.8 appears to be outdated (current is at least Apache/2.2.9). Apache 1.3.39 and 2.0.61 are also current.
+ PHP/5.2.4-2ubuntu5.3 appears to be outdated (current is at least 5.2.6RC4)
+ mod_ssl/2.2.8 appears to be outdated (current is at least 2.8.31) (may depend on server version)
+ mod_ssl/2.2.8 OpenSSL/0.9.8g - mod_ssl 2.8.7 and lower are vulnerable to a remote buffer overflow which may allow a remote shell (difficult to exploit). http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-0082.
+ OSVDB-3268: GET /icons/ : Directory indexing is enabled: /icons
+ OSVDB-3233: GET /icons/README : Apache default file found.
+ 3577 items checked: 6 item(s) reported on remote host
+ End Time: 2008-09-15 17:00:48 (109 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
Test Options: -h web-server
---------------------------------------------------------------------------
None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes]
Using compiler "/usr/bin/gcc". Use environment variable CC to override.
Your kernel was built with "gcc" version "4.2.3", while you are trying to use
"/usr/bin/gcc" version "4.2.4". This configuration is not recommended and
VMware Server may crash if you'll continue. Please try to use exactly same
compiler as one used for building your kernel. Do you want to go with compiler
"/usr/bin/gcc" version "4.2.4" anyway? [no]
# dpkg -i /var/cache/apt/archives/gcc_4%3a4.2.3-1ubuntu6_i386.deb
(Reading database ... 188652 files and directories currently installed.)
Preparing to replace gcc 4:4.2.3-1ubuntu6 (using .../gcc_4%3a4.2.3-1ubuntu6_i386.deb) ...
Removing old gcc doc directory.
Unpacking replacement gcc ...
Setting up gcc (4:4.2.3-1ubuntu6) ...
root@casey:/tmp/vmware-server-distrib# ls -l /usr/bin/gcc*
lrwxrwxrwx 1 root root 7 2008-09-14 16:28 /usr/bin/gcc -> gcc-4.2
-rwxr-xr-x 1 root root 206692 2008-03-11 04:37 /usr/bin/gcc-4.1
-rwxr-xr-x 1 root root 193372 2008-09-10 14:14 /usr/bin/gcc-4.2
-rwxr-xr-x 1 root root 16312 2008-03-11 04:32 /usr/bin/gccbug-4.1
-rwxr-xr-x 1 root root 2018 2007-06-04 19:59 /usr/bin/gccmakedep
root@casey:/tmp/vmware-server-distrib# gcc --version
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu1)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# /usr/bin/vmware
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
# cd /usr/lib/vmware/lib
# mkdir bak
# mv libgcc_s.so.1/libgcc_s.so.1 bak
# a2enmod proxy proxy_http
# vi /etc/apache2/sites-available/webcam-proxy
# cat /etc/apache2/sites-available/webcam-proxy
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /webcam http://192.168.1.253/
# a2ensite webcam-proxy
# /etc/init.d/apache2 reload
tools.syncTime = "TRUE"
# apt-get install ntp-simple
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ntp-simple is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
ntp
E: Package ntp-simple has no installation candidate
# apt-get install ntp
# vi /etc/ntp.conf
# grep ^server /etc/ntp.conf
server ntp.ubuntu.com
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org
# grep bind /etc/mysql/my.cnf
bind-address = 0.0.0.0
# /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
# mysql --user=root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 163
Server version: 5.0.51a-3ubuntu5.2 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> grant all privileges on mythconverg.* to mythweb@192.168.1.11 identified by 'XXXXXXXX';
Query OK, 0 rows affected (0.06 sec)
mysql> select host,user from user;
+--------------+------------------+
| host | user |
+--------------+------------------+
| 192.168.1.11 | mythweb |
| casey | root |
| localhost | debian-sys-maint |
| localhost | mythtv |
| localhost | root |
+--------------+------------------+
5 rows in set (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.04 sec)
mysql> update settings set data='192.168.1.10' where value='MasterServerIP';
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select data from settings where value='MasterServerIP';
+--------------+
| data |
+--------------+
| 192.168.1.10 |
+--------------+
1 row in set (0.00 sec
# apt-get install mythweb
# cd /etc/apache2/sites-available/
# vi mythweb.conf
# grep db_ mythweb.conf
setenv db_server "192.168.1.10"
setenv db_name "mythconverg"
setenv db_login "mythweb"
setenv db_password "XXXXXXXX"
# apache2ctl restart