Online



Digital InSight...visit us  Digital Publishing for  InSight News 
Owasp Testing Guide v3 Apache Open Source Application Server
Additional Information:
ebook_NGFW Network Performance Firewall Security

Fedora 13 Linux Install (500GB HDD: min. req. 50mb for setup 10mb for Linux)

This particular Fedora 13 Linux 13.42 installation includes Apache 2.4.7 as your applications sever while the entire process of setting up your Linux and Apache application server's estimated time is approximately 10 minutes for the linux walk through configuring your settings and 5-10 minutes while the files are saved to your hard disk. Apache's installation is simple and takes about 5 minutes to install and set up. The estimated times are based on having downloaded your necessary applications(i.e. Linux Version, Apache 2.4.7) prior to starting the instalation process and may vary depending on your particular configuration.

It is very important to document all your information with reference to password phrase, passwords (i.e. administrators root, users (1), Boot Loader password, and Wallet password). You will need them through out administration and may be critical in the outcome for system rescue or accessing directories and permissions once you logon. Creating a custom layout or modifying the default layout of the partions seems to be confusing for most beginners so it is important to not over complicate this part of the installation. It is good advice to select automatic partioning options and select the Review box then click next. In the ideal world this may work though you may get a promp stating it can not complete this task. The only other option is to choose creating the custom option whereas you will be asked to select a mounting point for your Fedors installation which is done by defining mount points for one or more disk partions where Fedora is installed. Remember... keep it simple! When you select the custom option you will enter a screen with several tabs available. You can look through them to familarize yourself although the second tab form your left will display the BIOS (Basic Input Output System) which you have to select to continue. If you have not planned how to set up your partitions at a bare minimum, you will need an approximately-sized root partition, and usually a swap partition appropriate to the mount of RAM you have on your system.

WARNING If your 64-bit x86 system uses UEFI instead of  BIOS, you will need to manually create a  /boot partition. This partition must have an ext3(journaling) file system. If you choose to partition automatically , your system will not boot.

Naming Convention For System On Network: "Recommended"

server1.(your domain)

Select Create Custom Layout.

This will forward you to the partioning screen which contains two panes. The top pane contains graphical representation of the hard drive, logical volume, or RAID device selected in the lower pane.
Above the graphical representation of the device, you can view the name of the drive (such asa /dev/sda or Log vo100) its size (in MB) and its model detected by the installation program (if you were able to have automatic partitioning completed).

IMPORTANT - non EFI X86 systems need a BIOS boot partition. If you re creating a custom partition layout on a non-EFI x86 system it is strongly advised to create seperate, 1MB BIOS boot partition. This will be used by the GRUB boot loader for storage.

The Create Storage dialog allows you to create new storage partions, logical volumes, and software RAIDs. Anconda presents options as available or unavailable depending on the storage already present on the suystem or configured to transfer to the system. Options are grouped under Create Partition, Create Softwre RAID, and Create LVM

Create Partition

Standard Partition - create a standard partition in unallocated space.

Create Software RAID

RAID Partition - create a partition in unallocated space to form part of a software RAID device. To form a software RAID device, two or more RAID partitions must be available on the system.
RAID Device - combine two or more RAID partitions into a software RAID device. When you choose this oiption you can specify the type of RAID device to create (the RAID Levewl). This option is only available when two or more RAID partitions are available on the system.

Create LVM Logical Volume

LVM Physical Volume - create a physical volumein a unallocated space. LVM Volume Group - create a volume group from one or more physical volumes. This option is only available when at least one physical volume is available on the system.
LVM Logical Volume - create a logical volume on a volume group. This option is only available when at least one volume group is available on the system.

Using your mouse, click once to highlight a particular field in the graphical display. Double-click to edit an existing partition or to create a partition out of existing free space. The lower pane contains a list of all the drives, logical volumes, and RAID devices to be used during the installation, as specified earlier in the installation process - process. Devices are grouped by type. Click on the small triangles to the left of each device to view or hide devices of the type.

IMPORTANT: You need to leave enough unallocated space to be able to load the graphical screen to complete the installation (approximately 128MB unallocated space). Otherwise you will have to repeat the entire installation process.

Create Storage

SELECT: Create Partition-Standard Partition

sda1 ext3
Size 100,000 (Fixed Size)
(x) Forced to be primary partition.
(x) Encrypt.

sda2 ext3
Size 100,000 (Fixed Size)
(x) Forced to be primary partition.
(x) Encrypt.

Mount Point / ext3
Size 20,000 (Fixed Size)
(x) Encrypt.

/boot ext3
Size 10,000

Physical Volume (LVM) Size 10,000 (Fixed Size) (x) Encrypt.

LVM Croup vg-server
Physical Extent 128MB Size 9984

LVM Logical Volume vg_server1,br/> File System Type swap
Size 1000 (x) Encrypt.


Next Screen
Enter passphrase for encription partition(s) (you will be prompt to enter this for each encrypted partition through out logging on or system rescue) This must contain no spaces.(ex. myhouseisbig)
prompt - write changes to disk.(select what applies)
Create Boot Loader Password: xxxxxxxxx
Customize Installation:
( ) Gnome Desktop Enviroment (Desktop GUI)
(x) KDE Software Compilation (plasma cube & C+ Development)
( ) XFCE LightWieght Desktop Enviroment (Desktop Lightweight)

ADDITIONAL INFORMATION: http://docs.fedoraproject.org/en-US/Fedora/16/html/Installation_Guide/s1-diskpartitioning-x86.html

Apache 2.4.7 Installation

Unzip Apache-2.4.7 in /Home/Uploads/ folder. Nearly all configuration options for Apache are set in a large configuration file by default this configuration file is /etc/httpd/conf/httpd.conf. Move the httpd.conf file from the Apache-2.4.7 folder to /etc/httpd/conf/.

Command Line Syntax:

[root@server1 root]# mv /home/username/Downloads/Apachie-2.4.7/httpd.conf /etc/httpd/conf/

Afterwards move the Apache folder to /root/usr/local/.Next you need to turn on Apache HTTP Server. In the Application Launcher Menu go to Administration, schroll down to and select Services. Highlight httpd and click on Start.

php-5.5.9.tar.bz2 Installation

After you download it, unpack it. Move the php folder to /usr/local/apache-2.4.7/. Create a index.php file in /var/www/html/ use your choice of browser in your linux installation Konqueror or FireFox and enter index.php to test your installation. If it does not work you didn't follow the instructions correctly. This may be a matter of the folders not being located in the correct directory as the httpd.conf (Apache Server) needs no configuration in most cases.

True Templating with Smarty Templates
Professional PHP5 WROX ISBN: 0-7645-7282-2

Chapter 13 PG. 267 Smarty Template Installation. Although this book is over ten tears old the syntax for the commands have been modified to work in this version of Linux Fedora 13. As a resource this book will continue to add to your PHP skill set regardless of some changes in technology.

Smarty is unique in that it provides not just simple "dump value" methodology, but also allows loop, conditionals, and the travesing of multidimensional arrays. In a nut shell it replicates all the traditional simple PHP methods used in native PHP templating, without using PHP at all.

Installing Smarty

Installing Smarty is straight forward (manual installation). Downloads: http://www.smarty.net/download Downloads

There are several ways to unpak the compressed files. What is more important is you copy/move them to the correct location. This may require you to make a directory(folder) "Smarty" to move your lib to.
your libraries generally, all you need to do is copy/mv the full contents of the Smarty-1.1.18/lib/ subfolder into /usr/local/lib/php/Smarty/lib/

Check the folder was moved with the mv command by entering the following commands: [root@server1 root]# cd /usr/local/lib/php/Smarty/lib/ (changing directories with "cd" command)
[root@server1 lib]# ls -l (This will list your files in the folder)

Command in BASH:

[root@server1 root]# mkdir /usr/local/lib/php/Smarty
[root@server1 root]# mv /home/username/Downloads/Smarty-3.1.18/lib /usr/local/lib/php/Smarty/
[root@server1 root]# cd /usr/local/lib/php/Smarty/lib/
[root@server1 lib]# ls -l (view your files were moved)
total
debug.tpl
lib
plugins
SmartyBC.class.php
Smarty.class.php
sysplugins


Next you need to hook up your application to use Smarty. Immediately beneath the PHP files that will be using Smarty in your application, this would include creating your site(s) directory ("MySite" folder) and then create your additional directories inside your "mySite" directory(folder). Create your directory(folders)

"mySite" (your site(s) name directory)
Create these directories inside your "mySite" folder:
templates_c
configs
templates
cache

[root@server1]# mkdir /var/www/html/MySite/
[root@server1]# cd /var/www/html/MySite
[root@server1 MySite]# mkdir templates
[root@server1 MySite]# mkdir templates_c
[root@server1 MySite]# mkdir configs
[root@server1 MySite]# mkdir cache

Make your index.php in your MySite folder using Vi (bash editor) to test your site. Alternatively you can move your site's application folders to your MySite folder and use the installer to configure your application.

Mercifully, Smarty is sympathetic to the needs of the real-world projects, for which configuration steps such as these might not be possible, such as when PHP scripts reside in different directories. You can also manually specify where these folders should exist.

Additional Information

Manual http://www.smarty.net/docsv2/en/ Manual Smarty 3.x: PHP 5.2+ (3.1.180)



Digital InSight...visit us Digital Publishing for InSight News
CopyRight (c) 2013 InSightNews.US All Rights Reserved.
Web Site Developed By iNetModel.Com