How to Setup Dell E228WFP on Ubuntu 7.04

General News, ubuntu 6 Comments »

Ubuntu - Install php5, mysql, apache2, ssl, pdo & pdo_mysql

 

Preamble to setting up my Dell E228WFP monitor with ubuntu

I recently bought a Dell Inspiration 530. When selecting my computer i choose ubuntu instead of windows, and also choose the 22 inch wide DELL E228WFP monitor.

Naturally, as with all things linux, the monitor working ‘out the box’ was just an idealistic dream i held on to while i was waiting for the pc to arrive.

Anyways, the Dell Inspiration 530 arrived with my Dell E228WFP Monitor and ubuntu was preinstalled. Lovely. However the monitor only went up toe 1024×786 resolution.

After spending a few hours researching, and trying various things, i finally found a solution on ubuntu forums which sorted out the monitor, and finally the E228WFP displayed a resolution of 1680×1050 which looks absoloutly gorgous !

 

Configuring the E228WFP for ubuntu

Firstly, backup your existing xorg.conf, we do this so that if somthing goes wrong on your next reboot and it puts you on the terminal (should be able to understand what happened from the error log) you can restore from this file if nessesary

Backup existing file

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Next you want to edit the file and put in the following details.. starting at “Section Monitor”..

The xorg.conf from the original dell installation (Straight from factory box) This is unmodified and will not fix the monitor

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/fonts/X11/misc"
	FontPath	"/usr/share/fonts/X11/cyrillic"
	FontPath	"/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/Type1"
	FontPath	"/usr/share/fonts/X11/100dpi"
	FontPath	"/usr/share/fonts/X11/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"gb"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"stylus"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"eraser"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"eraser"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"cursor"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"cursor"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "Device"
	Identifier	"nVidia Corporation NVIDIA Default Card"
	Driver		"nv"
	BusID		"PCI:1:0:0"
EndSection

Section "Monitor"
	Identifier	"Generic Monitor"
	Option		"DPMS"
	HorizSync	28-51
	VertRefresh	43-60
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"nVidia Corporation NVIDIA Default Card"
	Monitor		"Generic Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus"	"SendCoreEvents"
	InputDevice     "cursor"	"SendCoreEvents"
	InputDevice     "eraser"	"SendCoreEvents"
EndSection

Section "DRI"
	Mode	0666
EndSection

 

The xorg.conf TO GET THE MONITOR WORKING ON 1680×1050 from the original dell installation (Straight from factory box)

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/fonts/X11/misc"
	FontPath	"/usr/share/fonts/X11/cyrillic"
	FontPath	"/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/Type1"
	FontPath	"/usr/share/fonts/X11/100dpi"
	FontPath	"/usr/share/fonts/X11/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"gb"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"stylus"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"eraser"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"eraser"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"cursor"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"cursor"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "Device"
	Identifier	"nVidia Corporation NVIDIA Default Card"
	Driver		"nv"
	BusID		"PCI:1:0:0"
EndSection

Section "Monitor"
	Identifier	"Generic Monitor"
	UseModes 	"Modes[0]”
	Option		“DPMS”
	HorizSync	30-68
	VertRefresh	50-160
EndSection

Section “Modes”
	Identifier	“Modes[0]”
	Modeline “1680×1050″ 79.6 1152 1192 1288 1472 864 864 866 896 +hsync +vsync
EndSection

Section “Screen”
	Identifier	“Default Screen”
	Device		“nVidia Corporation NVIDIA Default Card”
	Monitor		“Generic Monitor”
	DefaultDepth	24
	SubSection “Display”
		Depth		1
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		4
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		8
		Modes		“1680X1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		15
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		16
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		24
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
EndSection

Section “ServerLayout”
	Identifier	“Default Layout”
	Screen		“Default Screen”
	InputDevice	“Generic Keyboard”
	InputDevice	“Configured Mouse”
	InputDevice     “stylus”	“SendCoreEvents”
	InputDevice     “cursor”	“SendCoreEvents”
	InputDevice     “eraser”	“SendCoreEvents”
EndSection

Section “DRI”
	Mode	0666
EndSection

 

If you have reinstalled ubuntu from the cd provided 7.04, as i did then you might want to try this xorg.conf

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/fonts/X11/misc"
	FontPath	"/usr/share/fonts/X11/cyrillic"
	FontPath	"/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/Type1"
	FontPath	"/usr/share/fonts/X11/100dpi"
	FontPath	"/usr/share/fonts/X11/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"gb"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"stylus"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"eraser"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"eraser"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"cursor"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"cursor"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "Device"
	Identifier	"nVidia Corporation NVIDIA Default Card"
	Driver		"nv"
	BusID		"PCI:1:0:0"
EndSection

Section "Monitor"
	Identifier	"DELL E228WFP"
	Option		"DPMS"
EndSection

Section "Modes"
	Identifier	"Modes[0]”
	Modeline “1680×1050″ 79.6 1152 1192 1288 1472 864 864 866 896 +hsync +vsync
EndSection

Section “Screen”
	Identifier	“Default Screen”
	Device		“nVidia Corporation NVIDIA Default Card”
	Monitor		“DELL E228WFP”
	DefaultDepth	24
	SubSection “Display”
		Depth		1
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		4
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		8
		Modes		“1680X1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		15
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		16
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
	SubSection “Display”
		Depth		24
		Modes		“1680×1050″ “1024×768″ “800×600″ “640×480″
	EndSubSection
EndSection

Section “ServerLayout”
	Identifier	“Default Layout”
	Screen		“Default Screen”
	InputDevice	“Generic Keyboard”
	InputDevice	“Configured Mouse”
	InputDevice     “stylus”	“SendCoreEvents”
	InputDevice     “cursor”	“SendCoreEvents”
	InputDevice     “eraser”	“SendCoreEvents”
EndSection

Section “DRI”
	Mode	0666
EndSection

 

The end

I hope this has been helpfull to many people out there. I hope it has saved people endless hours looking at different sites for different aspects of this tutorial.

Please be sure to leave some comments :)

Ubuntu - Install php5, mysql, apache2, ssl, pdo & pdo_mysql

General News, ubuntu 27 Comments »

Ubuntu - Install php5, mysql, apache2, ssl, pdo & pdo_mysql

I recently tried SUSE enterprise 10 and although i found the GUI absoloutly excellent, wireless support and sound card support was such an effort to get working, i have come back to good ol’ ubuntu. The classic linux distro where stuff seems to ‘just work’.

The following is meant to be a tutorial for setting up a basic webserver on your ubuntu desktop.

Installation instructions / How to setup PHP5, Mysql, Apache2, SSL, Mod_rewrite, pdo and pdo_mysql

Overview / Index

The reason i have put this together, is so people don’t have to search for multiple things, and can find all the essentials here

I am running Ubuntu 7.10 and fresh installation (about 10 mins ago).

I am going to setup Apache2, PHP5, MySQL, SSL, PDO loading the PDO_MySQL driver. This document is ment to help people who struggle with any of these and provide a bit more of a ‘one stop shop’ to anyone trying to set these services up.

 

Step 1 > Apache2

ntom@localhost:~$ sudo apt-get install apache2

Incase you need to, you can find how to add extra repositories here

 

Step 2 > MySQL 5

ntom@localhost:~$ sudo apt-get install mysql-server libmysqlclient15-dev

 

Step 3 > PHP5

ntom@localhost:~$ sudo apt-get install php5 php5-common libapache2-mod-php5 php5-gd php5-dev curl libcurl3 libcurl3-dev php5-curl

 

Step 4 > PHPMyAdmin

ntom@localhost:~$ sudo aptitude install phpmyadmin

At this point, you should be able to go to http://localhost/ and see your webserver is now up and running.
You should also now see a folder called ‘phpmyadmin‘ which if you click on, and enter ‘root’ as the username, leave the password blank, and login, will give you access to your mysql db’s.

 

Step 5 > SSL certificate for Apache2

ntom@localhost:~$ sudo apache2-ssl-certificate

If you get back that it can’t find apache2-ssl-certificate .. then not to worry, this is a known bug, and please read my comment at the bottom.. direct link to the comment click here

Answer the questions

ntom@localhost:~$ sudo a2enmod ssl

This enables the ssl mod for apache2

ntom@localhost:~$ echo "Listen 443" | sudo tee -a /etc/apache2/ports.conf

 

ntom@localhost:~$ sudo ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl 

 

ntom@localhost:~$ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl

To understand more about sites-enabled, sites-available click here

ntom@localhost:~$ sudo gedit /etc/apache2/sites-available/ssl

Select All (crt+a), delete, then paste in this:

NameVirtualHost *:443

<virtualhost *:443>
        ServerAdmin webmaster@localhost

        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/apache.pem

        DocumentRoot /var/www/
        <directory />
                Options FollowSymLinks
                AllowOverride None
        </directory>

        <directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # Commented out for Ubuntu
                #RedirectMatch ^/$ /apache2-default/
        </directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </directory>

</virtualhost>

Then we need to change the default file, so…

ntom@localhost:~$ sudo gedit /etc/apache2/sites-available/default

and make sure the following lines say this:

NameVirtualHost *:80
<virtualhost *:80>

&nbsp

You may also want to enable mod_rewrite.. todo so, follow the following steps:

ntom@localhost:~$ sudo a2enmod rewrite

 

You will also need to edit sites-available default, and ssl:

sudo gedit /etc/apache2/sites-available/default

And the same again for the ssl file.
Here you will need to change the section which says ‘AllowOverride None’ to:

AllowOverride All

 

Now restart apache

ntom@localhost~: sudo apache2 -k restart

 

Step 6 > PDO & PDO_MySql

First, we need to install PEAR, so…

sudo apt-get install php-pear

 

If you get anything about warning, ‘phpize’, this means you need php-dev, or if your using sypantic package manager, ‘php5-dev’.

sudo pecl install pdo

This installs pdo.

The next thing you want todo is install the pdo_mysql drivers. Do this by doing the following:

sudo pecl install pdo_mysql

If however you get a error somthing along the lines of:

checking for MySQL support for PDO... yes, shared
checking for mysql_config... not found
configure: error: Cannot find MySQL header files under
ERROR: `/tmp/tmpRiQ5ax/PDO_MYSQL-1.0.2/configure' failed

Then you should download and install the following packages:

sudo apt-get install libmysqlclient15-dev

and then try to re-install pdo_mysql.

Once this is finished and sucessful (it was for me), its best to then run the following code:

sudo updatedb
sudo gedit /etc/php5/apache2/php.ini

Inside the php.ini, at the bottom, add the following lines:

extension=pdo.so
extension=pdo_mysql.so

 

The end

I hope this has been helpfull to many people out there. I hope it has saved people endless hours looking at different sites for different aspects of this tutorial.

Please be sure to leave some comments :)

WP Theme & Icons by N.Design Studio & Shamefully P0wered by WordPress
Entries RSS Comments RSS Log in