Difference between pages "Package:Apache" and "Uvesafb"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
{{Ebuild
== ''How to'' : Framebuffer: Userspace VESA VGA graphics support ==
|Summary=The Apache Web Server
Uvesafb is an improved framebuffer driver for Linux systems with some enhancements compared to vesa. Uvesafb can allow you to get a full-resolution console, even if you have installed a graphics driver that does not support full-resolution consoles. Examples of drivers like these: [[Package:AMD_Catalyst_Video_Drivers| ati-drivers]] and NVidia-drivers.
|CatPkg=www-servers/apache
|Maintainer=polynomial-c@gentoo.org
|Homepage=http://httpd.apache.org/
}}
apache is a powerful web server. apache serves html/css/cgi/pl out of the box, and other languages/frameworks via extensions.
 
== USE Flags ==
TODO
 
== Install ==
<console>###i## emerge apache</console>


== Configuration ==
== Kernel configuration ==
=== System ===
Before we emerge the required packages for uvesafb functionality, we have to configure the kernel properly.
Many packages have apache2 use flags, and require them to be supported by apacheSetting a system wide apache2 use flag is a good idea.
{{Kernelop|title= |desc=
Device Drivers --->
    <*> Connector - unified userspace <-> kernelspace linker --->


{{file|name=/etc/portage/make.conf|desc=set system wide apache2 useflag|body=
    Graphics support --->
USE="apache2 ..........."
        Frame buffer devices --->
        [*] Support for frame buffer devices  --->
            [*] Enable firmware EDID
            <*> Userspace VESA VGA graphics support
}}
}}


=== Package ===
{{fancynote| Build the kernel (<tt>make</tt>), do not install the kernel and modules (<tt> make install modules_install</tt>). You can choose uvesafb as a module, unlike vesa.}}
Apache's configuration files are broken up and located in several spots.
*<code>/etc/conf.d/apache2</code>
*<code>/etc/apache2/httpd.conf</code>
*<code>/etc/apache2/modules.d/*</code>
*<code>/etc/apache2/vhosts.d/*</code>


conf.d controls the init script, adding things to it such as -D SECURITY & -D PHP5 will enable web application fire-walling & the php scripting language.
== Install required packages ==


httpd.conf controls how the server behaves, at the bottom of the file it has directives to include configuration files ending in .conf in /etc/apache2/modules.d & /etc/apache2/vhosts.d
Emerge {{Package|dev-libs/klibc}}. Klibc has to be compiled against a kernel that includes uvesafb support. This only has to be done once:
<console>
###i## emerge klibc
</console>
{{Package|sys-apps/v86d}} is the userspace helper that runs x86 code in emulated environment. Uvesafb will not work without v86d. Emerge <code>v86d</code>:
<console>
###i## emerge v86d
</console>


== Service ==
== Back to kernel configuration ==
 
Reconfigure the kernel to include <tt>/usr/share/v86d/initramfs</tt> as an initramfs source file:
To start apache immediately:
{{Kernelop
<console>###i## rc-service apache2 start</console>
|title=
 
|desc=
To start apache upon boot:
General Setup--->
<console>###i## rc-update add apache2</console>
    [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
    (/usr/share/v86d/initramfs)    Initramfs source file(s)
}}
Rebuild the kernel: make and install it, install the modules


== mod_rewrite ==
== Bootloader configuration ==
If you compiled uvesafb into the kernel (not as a module), you can configure its behavior by editing the '<tt>params += </tt>' line in <tt>/etc/boot.conf</tt>. Below, some of the more common switches used with uvesafb are explained.
* <tt>video=uvesafb:<screen y-res>x<screen x-res>-<color depth></tt>: Tells the kernel that you want to use the uvesafb driver for console output. Also specifies that you will be using uvesafb at a set x-screen resolution, y screen-resolution, and color depth. Set the first part to the size of your screen (in pixels). For example, if I had a 1920x1080 screen and wanted a color depth of 32, I would add the following: <tt>video=uvesafb:1920x1080-32</tt>


mod_rewrite has a reputation of being difficult to set up. mod_rewrite requires following symlinks & Order allow,deny (apache 2.2) or Require all granted (apache 2.4) is set.  To test functionality of mod_rewrite we will need to make a few files.  
* <tt>mtrr:x</tt>: X represents the number 0 or 3. This option allows you to set up the memory type range registers for uvesafb. Setting x=0 disables mtrr and setting x=3 enables mtrr. x=3 is the default setting for this switch. mtrr:3 is recommended.


{{fancynote|If you want to test this for web applications such as mediawiki adjust the path to /var/www/localhost/htdocs/mediawiki/.htaccess & so on}}
* <tt>ywrap</tt>: Add support for display panning. Recommended.  


{{file|name=/var/www/localhost/htdocs/.htaccess|desc=enable the rewrite engine|body=
{{fancytip| For more information regarding these switches, check out http://www.mjmwired.net/kernel/Documentation/fb/uvesafb.txt}}
RewriteEngine on
RewriteRule ^test.html$ rewrite.html
}}


{{file|name=/var/www/localhost/htdocs/test.html|desc=set system wide apache2 useflag|body=
Now that you have a basic understanding of a few of the different switches, configure your <tt>/etc/boot.conf</tt>:
rewrite is not working
}}


{{file|name=/var/www/localhost/htdocs/rewrite.html|desc=set system wide apache2 useflag|body=
{{file|name=/etc/boot.conf|desc= |body=
rewrite is working
boot {
        generate grub
        default "Funtoo Linux: uvesafb"
        timeout 3
}
  "Funtoo Linux: uvesafb" {
        kernel bzImage[-v]
        params += video=uvesafb:1920x1080-32,mtrr:3,ywrap
}
}}
}}
{{fancynote| Realize that the configuration in the above file will not work on every computer. You must change the resolution (and possibly other switches) to best suite your needs.}}


Then point your browser @ http://127.0.0.1/test.html the text from rewrite.html should be loaded.
After you have finished editing your <tt>/etc/boot.conf</tt>, run the following:
<console>
###i## boot-update
</console>
finally, reboot your computer so that you can test out uvesafb:
<console>
###i## reboot
</console>


{{EbuildFooter}}
[[Category:HOWTO]]

Revision as of 23:35, September 14, 2014

How to : Framebuffer: Userspace VESA VGA graphics support

Uvesafb is an improved framebuffer driver for Linux systems with some enhancements compared to vesa. Uvesafb can allow you to get a full-resolution console, even if you have installed a graphics driver that does not support full-resolution consoles. Examples of drivers like these: ati-drivers and NVidia-drivers.

Kernel configuration

Before we emerge the required packages for uvesafb functionality, we have to configure the kernel properly.

Device Drivers --->
    <*> Connector - unified userspace <-> kernelspace linker  --->

    Graphics support --->
        Frame buffer devices --->
        [*] Support for frame buffer devices  --->
            [*] Enable firmware EDID
            <*> Userspace VESA VGA graphics support
   Note
Build the kernel (make), do not install the kernel and modules ( make install modules_install). You can choose uvesafb as a module, unlike vesa.

Install required packages

Emerge No results. Klibc has to be compiled against a kernel that includes uvesafb support. This only has to be done once:

root # emerge klibc

No results is the userspace helper that runs x86 code in emulated environment. Uvesafb will not work without v86d. Emerge v86d:

root # emerge v86d

Back to kernel configuration

Reconfigure the kernel to include /usr/share/v86d/initramfs as an initramfs source file:

General Setup--->
    [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
    (/usr/share/v86d/initramfs)    Initramfs source file(s)

Rebuild the kernel: make and install it, install the modules

Bootloader configuration

If you compiled uvesafb into the kernel (not as a module), you can configure its behavior by editing the 'params += ' line in /etc/boot.conf. Below, some of the more common switches used with uvesafb are explained.

  • video=uvesafb:<screen y-res>x<screen x-res>-<color depth>: Tells the kernel that you want to use the uvesafb driver for console output. Also specifies that you will be using uvesafb at a set x-screen resolution, y screen-resolution, and color depth. Set the first part to the size of your screen (in pixels). For example, if I had a 1920x1080 screen and wanted a color depth of 32, I would add the following: video=uvesafb:1920x1080-32
  • mtrr:x: X represents the number 0 or 3. This option allows you to set up the memory type range registers for uvesafb. Setting x=0 disables mtrr and setting x=3 enables mtrr. x=3 is the default setting for this switch. mtrr:3 is recommended.
  • ywrap: Add support for display panning. Recommended.
   Tip
For more information regarding these switches, check out http://www.mjmwired.net/kernel/Documentation/fb/uvesafb.txt

Now that you have a basic understanding of a few of the different switches, configure your /etc/boot.conf:

   /etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux: uvesafb" 
        timeout 3 
}
  "Funtoo Linux: uvesafb" { 
        kernel bzImage[-v]
        params += video=uvesafb:1920x1080-32,mtrr:3,ywrap
}
   Note
Realize that the configuration in the above file will not work on every computer. You must change the resolution (and possibly other switches) to best suite your needs.

After you have finished editing your /etc/boot.conf, run the following:

root # boot-update

finally, reboot your computer so that you can test out uvesafb:

root # reboot