Xorg and Ati Mobility Radeon 7500 on Thinkpad T30

# Put in the appropriate USE vars for Thinkpad T30
nano -w /etc/make.conf
=c=
INPUT_DEVICES=”keyboard mouse synaptics”
VIDEO_CARDS=”radeon”

USE=”bitmap-fonts truetype-fonts type1-fonts”
=c=

echo ‘>=x11-base/x11-drm-20050502 ~x86’ >> /etc/portage/package.keywords
echo ‘media-libs/freetype -bindist’ >> /etc/portage/package.use

emerge -avDt x11-drm xorg-x11 xf86-video-ati

cat /etc/X11/xorg.conf
=c=
# ———– [ ServerLayout section ] —————- #
Section “ServerLayout”
Identifier “Default”
Screen “LCD”
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
InputDevice “Touchpad” “SendCoreEvents”
EndSection

# ———– [ Files ] ——————————- #
Section “Files”
RgbPath “/usr/share/X11/rgb”
ModulePath “/usr/lib/xorg/modules”
FontPath “/usr/share/fonts/misc:unscaled”
FontPath “/usr/share/fonts/corefonts”
FontPath “/usr/share/fonts/freefonts”
FontPath “/usr/share/fonts/sharefonts”
FontPath “/usr/share/fonts/TTF”
FontPath “/usr/share/fonts/Type1”
FontPath “/usr/share/fonts/artwiz-aleczapka-en:unscaled”
FontPath “/usr/share/fonts/terminus”
FontPath “/usr/share/fonts/ttf-bitstream-vera”
FontPath “/usr/share/fonts/unifont”
FontPath “/usr/share/fonts/local”
FontPath “/usr/share/fonts/cyrillic”
FontPath “/usr/share/fonts/100dpi:unscaled”
FontPath “/usr/share/fonts/75dpi:unscaled”
EndSection

# ———– [ Server flags ] ———————— #
Section “ServerFlags”
Option “DefaultServerLayout” “Default”
Option “allowmouseopenfail”
EndSection

# ———– [ Modules ] —————————– #
Section “Module”
Load “dbe”
Load “dri”
Load “extmod”
Load “freetype”
Load “type1”
Load “glx”
Load “record”
Load “synaptics”
Load “xtrap”
EndSection

# ———– [ Input devices ] ———————– #
Section “InputDevice”
Identifier “Keyboard0”
Driver “kbd”
Option “CoreKeyboard”
Option “XkbModel” “pc105”
Option “XkbLayout” “us”
Option “AutoRepeat” “250 30”
EndSection

Section “InputDevice”
Identifier “Mouse0”
Driver “mouse”
Option “CorePointer”
Option “Device” “/dev/input/mice”
Option “Protocol” “ExplorerPS/2”
Option “ZAxisMapping” “4 5”
Option “Emulate3Buttons” “true”
EndSection

Section “InputDevice”
Identifier “Touchpad”
Driver “synaptics”
Option “SendCoreEvents” “true”
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
Option “SHMConfig” “on”
Option “LeftEdge” “1500”
Option “RightEdge” “5500”
Option “TopEdge” “1400”
Option “BottomEdge” “4500”
Option “FingerLow” “20”
Option “FingerHigh” “40”
Option “MaxTapTime” “180”
Option “MaxTapMove” “220”
Option “MaxDoubleTapTime” “220”
Option “VertScrollDelta” “100”
Option “HorizScrollDelta” “100”
Option “EdgeMotionSpeed” “40”
Option “MinSpeed” “0.12”
Option “MaxSpeed” “0.12”
Option “AccelFactor” “0.0010”
Option “UpDownScrolling” “1”
Option “RTCornerButton” “0”
Option “RBCornerButton” “0”
Option “LTCornerButton” “0”
Option “LBCornerButton” “0”
Option “TapButton1” “0”
Option “TapButton2” “2”
Option “TapButton3” “0”
Option “EmulateMidButtonTime” “75”
Option “PalmDetect” “1”
EndSection

# ———– [ Graphics device ] ——————— #
Section “Device”
Identifier “Radeon 7500M”
VendorName “ATI Technologies Inc”
BoardName “Radeon Mobility M7 LW”
Driver “ati”
Option “SWcursor” “off”
Option “NoAccel” “off”
Option “Dac6Bit” “off”
Option “UseFBDev” “off”
Option “AGPMode” “4”
Option “AGPFastWrite” “off”
Option “BusType” “AGP”
Option “DDCMode” “on”
Option “DisplayPriority” “BIOS”
Option “MonitorLayout” “LVDS”
Option “EnablePageFlip” “on”
Option “RenderAccel” “on”
#Option “backingstore” “true”
Option “SubPixelOrder” “RGB”
BusID “PCI:1:0:0”
Screen 0
EndSection

# ———– [ Monitor section ] ——————— #
Section “Monitor”
Identifier “T30LCD”
DisplaySize 370.4 277.8 # Real size. Will give 125 dpi
Option “dpms”
EndSection

# ———– [ Screen section ] ———————- #
Section “Screen”
Identifier “LCD”
Device “Radeon 7500M”
Monitor “T30LCD”
DefaultDepth 24
SubSection “Display”
Viewport 0 0
Depth 1
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 4
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 8
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 15
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 16
EndSubSection
SubSection “Display”
Viewport 0 0
Depth 24
EndSubSection
EndSection

# ———– [ xorg-x11-6.8+] ———————— #
Section “Extensions”
Option “Composite” “Enable”
EndSection

# ———– [ Misc ] ——————————– #
Section “DRI”
# Group 0
Mode 0666
EndSection

# end of XF86Config
=c=

Reference:
http://forums.gentoo.org/viewtopic-p-2137276.html#2137276
http://forums.gentoo.org/viewtopic-t-244949-postdays-0-postorder-asc-start-25.html
http://gentoo-wiki.com/HOWTO_TV-Out#ATI-opensource-driver

dispatch-conf rather that etc-update

nano -w /etc/dispatch-conf.conf
==
merge=”vimdiff -c ‘saveas %s’ -c next -c ‘setlocal nomodifiable readonly’ -c prev %s %s”
==
=n=
Note: The left pane will hold the original config file saved as the merge output, so make changes in the left pane and save that pane. To help you remember the right hand pane (containing the new config file) will be marked unmodifiable and read-only.
=n=

emerge rcs
=n=
this tells dispatch-conf to save a history of any changes to your config files in an RCS repository
=n=

emerge world with pam shadow conflict

emerge sync
USE=”-pam” emerge -v util-linux
emerge –buildpkgonly –nodeps shadow && emerge -C pam-login && emerge –usepkgonly shadow
etc-update
=o=
Scanning Configuration files…
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/pam.d/login
/etc/pam.d/._cfg0000_login
2) /etc/login.defs
/etc/._cfg0000_login.defs
3) /etc/securetty
/etc/._cfg0000_securetty
Please select a file to edit by entering the corresponding number.
(don’t use -3 or -5 if you’re unsure what to do)
(-1 to exit) (-3 to auto merge all remaining files)
(-5 to auto-merge AND not use ‘mv -i’):
=o=
emerge -1 shadow
USE=”mode-force symlink mysql” emerge -puavDN world
emerge –depclean
emerge gentoolkit
revdep-rebuild

Shorewall Firewall on Gentoo 2006.0

nano -w /etc/portage/package.keywords
==
net-firewall/iptables
net-firewall/shorewall
sys-kernel/genkernel
==

emerge -pv shorewall
emerge shorewall
==

NAT: Not available
Packet Mangling: Not available
Multi-port Match: Not available
Connection Tracking Match: Not available
Packet Type Match: Not available
Policy Match: Not available
Physdev Match: Not available
IP range Match: Not available
Recent Match: Not available
Owner Match: Not available
Ipset Match: Not available
CONNMARK Target: Not available
Connmark Match: Not available
Raw Table: Not available
CLASSIFY Target: Not available

==
http://gentoo-wiki.com/HOWTO_Iptables_for_newbies
http://www.gentoo.org/proj/en/infrastructure/firewall/server-firewall.xml
http://www.gentoo.org/doc/en/genkernel.xml
http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually
genkernel –menuconfig all
==
Device Drivers —>
Networking Support —>
Networking Options —>
<*> PF_KEY sockets
<*> IP: AH transformations
<*> IP: ESP transformations
<*> IP: IPComp transformations
<*> IP: tunnel transformations
<*> IPsec user configuration interface
Network Packet Filtering —>
IP: Netfilter Configuration —>
<*> IPsec policy match support
==
==
[*] QoS and/or fair queueing
[*] HBQ
==
=n=
You could also specify pf_key, ah?, esp?, ipcomp and xfrm_user as modules (M) but then you would have to load them at boot time by including them in /etc/modules.autoload.d/kernel-.
=n=
nano -w /etc/modules.autoload.d/kernel-2.6
or
echo “ip_tables” >> /etc/modules.autoload.d/kernel-2.6 && modules-update

# ebuild /path/to/iptables.ebuild compile
# ebuild /path/to/iptables.ebuild install
# ebuild /path/to/iptables.ebuild qmerge
shorewall show capabilities
=o=
Policy Match: Available
=o=
You can now define IPsec tunnels within Shorewall’s configuration files in /etc/shorewall/

Tomcat5 Mod_jk Apache2 on Gentoo 2006.0

Java Development Server Install

USE=”-xmms -arts -oss -jpeg -mpeg -motif -mp3 -png” emerge dev-java/sun-jdk

=
* Please download j2sdk-1_4_2_10-linux-i586.bin from:
*

http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.

4.2_10-oth-JPR&SiteId=JSC&TransactionId=noreg
* (SDK 32-bit/64-bit for Windows/Linux/Solaris SPARC 32-bit for Solaris x86,

then select download Linux Self-extracting.
* and move it to /usr/portage/distfiles
=

No JAVA_HOME available! Please set your Java Virtual Machine
No JAVA_HOME available! Please set your Java Virtual Machine
No JAVA_HOME available! Please set your Java Virtual Machine
No JAVA_HOME available! Please set your Java Virtual Machine
THIS SYSTEM VM IS NOT SUFFICIENT, REQUIRED BINARIES WERE NOT FOUND
System Virtual Machine set
You may want to update your enviroment by running:
“/usr/sbin/env-update && source /etc/profile”
>>> Regenerating /etc/ld.so.cache…

* After installing sun-jdk-1.4.2.10 this
* was set as the default JVM to run.
* When finished please run the following so your
* enviroment gets updated.
* /usr/sbin/env-update && source /etc/profile
* Or use java-config program to set your preferred VM

* Some parts of Sun’s JDK require virtual/x11 to be installed.
* Be careful which Java libraries you attempt to use.

java-config –list-available-vms
java-config –set-system-vm sun-jdk-1.4.2.10
/usr/sbin/env-update && source /etc/profile

emerge tomcat
/etc/init.d/tomcat5 start
=s=
* Starting Tomcat …
Using CATALINA_BASE: /opt/tomcat5
Using CATALINA_HOME: /opt/tomcat5
Using CATALINA_TMPDIR: /opt/tomcat5/temp
Using JAVA_HOME: /opt/sun-jdk-1.4.2.10
=s=
rc-update add tomcat5 default

emerge apache (follow gentoo wiki guide)
/etc/init.d/apache2 start
rc-update add apache2 default

nano -w /etc/portage/package.keywords
==
=www-apache/mod_jk-1.2* ~x86
==
emerge -pv mod_jk
emerge mod_jk

nano -w /etc/conf.d/apache2
==
APACHE2_OPTS=”-D JK”
==

nano -w /etc/apache2/modules.d/88_mod_jk.conf
==
JkWorkersFile conf/jk-workers.properties
JkLogFile logs/mod_jk.log
JkLogStampFormat “[%a %b %d %H:%M:%S %Y] ”
JkRequestLogFormat “%w %V %T”
jkAutoAlias /var/lib/tomcat-5/default/webapps/
jkMount /*.jsp ajp13
==

nano -w /etc/apache2/jk-workers.properties

/etc/init.d/apache2 restart && /etc/init.d/tomcat5 restart
/opt/tomcat5/webapps/ROOT/testing $ nano -w index.jsp
==
Hello! The time is now <%= new java.util.Date() %>
==
http://localhost:8080/testing/

MySQL 4.1 in Gentoo 2006.0

nano -w /etc/portage/package.use
==
dev-db/mysql innodb berkdb
==

emerge -1 mysql
=n=
his will emerge the dev-db/mysql ebuild without adding it to the world

namespace. Thus, whenever you type ’emerge –update world’ mysql will not be

updated. This is extremely useful since portage doesn’t support straight,

unattended updates for mysql. Since you will have to manually update mysql

anyway, you may wish to remove it from world so that your auto-update script(s)

don’t fail.
=n=

emerge –config =dev-db/mysql-4.1.20
or
ebuild /var/db/pkg/dev-db/mysql-4.1.20/mysql-4.1.20.ebuild
/etc/init.d/mysql start
mysql_setpermission
mysql> SET PASSWORD FOR ‘root’@’localhost’=PASSWORD(‘password_here’);
mysql_secure_installation
rc-update add mysql default