<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
<channel>
<title>Apache</title>
<link>http://www.computersight.com/tags/Apache</link>
<description>New posts about Apache</description>
<item>
<title>How To: Set Up a Linux Based Server Using Ubuntu</title>
<link>http://www.computersight.com/Operating-Systems/Ubuntu/How-To-Set-Up-a-Linux-Based-Server-Using-Ubuntu.389931</link>
<description>
<![CDATA[<p>If you use this tutorial, you will not have to pay someone else for website hosting. However, you will still have to purchase a domain name (.com, .net, .org, or a different Top-Level Domain). You will also have to have your own connection to the internet, with a static IP. This article does NOT cover setting up the port forwarding on your router if you have one, just the set up of the actual server.</p>
<h3>Getting Ready</h3>
<p>First off, you will need a computer that you do not use for anything else, including surfing the Internet. If you do not have one, you can purchase any brand name computer, or, if you prefer, build one your self. You will also need a broadband internet connection, preferably with a high upload speed.</p>
<p>If you do not have a static IP, or if you do not know if you have a static IP, call your Internet provider. Make sure you write down the static IP, as you will need it later.</p>
<p>You will need to download Ubuntu from the Ubuntu website, and burn it to a CD. This is not the same as burning a music or general data CD. You will want to use your burning program's "Burn from image" feature (the image is a .iso image). If your burning program does not have this feature, you can usually find freeware that does. Make DOUBLE sure that&amp;nbsp; you download the SERVER EDITION of Ubuntu.</p>
<h3>Installing Ubuntu</h3>
<p>Insert the CD you burned into your CD-ROM or DVD drive, and boot your computer. Some computers will automatically boot from the CD so you can install. For the computers that do not automatically boot from the CD, there will usually be a screen that comes up saying something along the lines of "Press any key to boot from CD or DVD...". This usually gives you a limited amount of time to press any key. Press any key and it will boot from the CD.</p>
<p>After you have booted from the CD, choose the install option. This is a fairly easy step-by-step process. One of the screens will ask you what type of server you wish to install. Choose HTTP or LAMP server (LAMP stands for "<strong>L</strong>inux, <strong>A</strong>pache, <strong>M</strong>ySQL, <strong>P</strong>HP server"). After the installation is finished, it will ask you to remove the CD or DVD and restart the computer.</p>
<h3>Setting Everything Up</h3>
<p>After you have rebooted your computer, you will notice that the operating system successfully installed, but there is no user interface, just a command prombt-like interface. This is called the "Linux Terminal". Ubuntu Server Edition does not come with a desktop interface installed by default. First, type in your user name and password that you created during installation.</p>
<p>If you are not experienced with the Linux Terminal, you may want to install a desktop evironment. To install the Gnome Desktop environment, type the following into the Terminal:</p>
<blockquote>
<p>$ sudo su</p>
<p>[The password you created durring installation]</p>
<p>$ apt-get install gnome-desktop</p>
</blockquote>
<p>Or, if you perfer the KDE Desktop evironment, type the following:</p>
<blockquote>
<p>$ sudo su</p>
<p>[The password you created during the installation]</p>
<p>$ apt-get install kde-desktop</p>
</blockquote>
<p>Please keep in mind that you do NOT type the $ symbols when typing commands. Those are there to let readers of this article know that it is a new command.</p>
<p>After the desktop environment has finished installing, you server is ready to use. The directory you will put your website in is the '/var/www' directory. This can be changed, but changing it involves editing the Apache configuration files. I do not recommend doing this if you are not familiar with those files. I will do another tutorial next week on how to use WordPress with this type of Ubuntu installation.</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FUbuntu%2FHow-To-Set-Up-a-Linux-Based-Server-Using-Ubuntu.389931"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FUbuntu%2FHow-To-Set-Up-a-Linux-Based-Server-Using-Ubuntu.389931" border="0"/></a>]]></description>
<pubDate>Wed, 10 Dec 2008 06:22:24 PST</pubDate></item>
<item>
<title>Lets Learn C : Printing Strings on to the Screen</title>
<link>http://www.computersight.com/Programming/Lets-Learn-C--Printing-Strings-on-to-the-Screen.225265</link>
<description>
<![CDATA[<p>Here is the first article of my tutorial set. I aim to teach you the basics of C. In this first lesson, I am going to teach you how to output a series of strings on to terminal screen of C program.</p>
<p>Virtually every program code has inputs and outputs. Before compiling a source code, programs generally request an input from the user and then output it to the screen after compiling if the program is well designed and there is no error inside it. Usually, as the program becomes more complicated, error possibility increases. A good software expert easily realizes where the code has faults and corrects it. Since our first code will be very small and very simple, we will not face with any error.</p>
<p>Before starting to write code, we initially have a compiler which is going to evaluate our code. I use Dev C for this. There are many other compilers which run on different platforms like Unix, Linux and Windows.</p>
<p>In this project, we will output the names of  the subprograms of Triond on to C terminal screen. This is the simplest algorithm since there is no input in this example. Let's start writing our code step by step.</p>
<p>Step 1: Open the File from the menu bar of C software and save as the blank page Project1. This yields a file with an extension of cpp.</p>
<p>Step 2: Describe the name and aim of the programs. To do so, we use comments. Comments are ignored by the compiler. For commenting, we use some special scripts like double slash  or  slash-asterisk character .</p>
<p>If we use a single line comment, double slash is enough. However, if our comment is placed more than one line, we use double slash for each line or take the commented part between  slash-asterisk and asterisk-slash characters .</p>
<p>Step 3:  C needs library files which define what the input and output functions are and what they do when they are used in a code. Iostream is the library file of input and output function.</p>
<p>Before the name of library files, we use a special character,  preprocessor directive character. Include is used before the name of every library file and such file names are placed mathematical comparison characters.</p>
<p>Step 4:  Every C code uses functions. The default function is main. Main function is the first function compiled by the programs. This function usually calls other functions. Before the name of function, we specify which type of output our code returns. In our program, we think that it returns to integer and use int. After the function name, we use parantheses. In this example, there will be nothing between parantheses but in more complicated programs, there may be parameter names and it's types or definitions. We place our statements between left brace  and  right brace.</p>
<p>Step 5:  To print on to the screen,we use cout function. We simply place our string inside  double quote  characters. Every statement inside the functions ends with a special semicolon character.</p>
<p>Step 6:  To check the validity, we use return function.In this simple example, it returns to 0.</p>
<p><a href="http://clesson1.blogspot.com/" target="_blank">Click here for the code</a></p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FLets-Learn-C--Printing-Strings-on-to-the-Screen.225265"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FLets-Learn-C--Printing-Strings-on-to-the-Screen.225265" border="0"/></a>]]></description>
<pubDate>Sun, 24 Aug 2008 10:02:41 PST</pubDate></item>
<item>
<title>Mac OS X: A Web Developer's Dream</title>
<link>http://www.computersight.com/Operating-Systems/Mac-OS/Mac-OS-X-A-Web-Developers-Dream.186115</link>
<description>
<![CDATA[<p>Web developers often shy away from Mac OS X, because they believe that it is very unsuitable in terms of web development; this is very untrue, and in this article I will talk about Mac OS X and web development, sorting out truth from fiction.</p>
<h3>Myth #1</h3>
<p>You can't do any real web development on Mac OS X, including server scripts such as PHP.</p>
<h4>The Truth</h4>
<p>You can do the same amount of web development on Mac OS X as you can on any Windows machine; in fact, I have found Mac OS X even easier to set up server scripts. Recently I decided to set up PHP on my Mac at home to find out that Mac OS X Leopard actually comes with Apache2 and PHP5 already installed onto it! All it takes is a few configuration steps to set up PHP5 to work on your computer.</p>
<h3>Myth #2</h3>
<p>It is much harder to set up the use of web development languages on Mac OS X than it is on Windows.</p>
<h4>The Truth</h4>
<p>I have actually found it easier to set up different web development languages on my Mac than on my friends Windows computer. A few days after I set up Apache2, PHP5 and MySQL on my Mac I helped a friend do it on his Windows computer. It took at least 3 more hours to get all of them installed on his computer than on mine, and even longer to get MySQL to work because the default configuration file for MySQL on Windows does not have everything needed for it to work.</p>
<h3>Myth #3</h3>
<p>You might be able to do web development on Mac, but you can't get much further than the things you can do with iWeb.</p>
<h4>The Truth</h4>
<p>You can do the same scripting on a Mac as you can do on a Windows machine. Saying that you are confined to iWeb is like saying you are confined to Frontpage on Windows.</p>
<p>There are many more myths regarding Mac OS X and web development, but I think that this will help some of you realize that Mac OS X is just as good for web development as Windows is. In the end, the scripting of languages is the same on both machines because the languages do not change depending on operating systems; the only difference I can find is setting up those scripting languages, which I have found to be much easier on Mac OS X than on Windows.</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FMac-OS%2FMac-OS-X-A-Web-Developers-Dream.186115"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FMac-OS%2FMac-OS-X-A-Web-Developers-Dream.186115" border="0"/></a>]]></description>
<pubDate>Mon, 28 Jul 2008 06:16:49 PST</pubDate></item>
<item>
<title>PHP Tutorial: Printing on the Screen</title>
<link>http://www.computersight.com/Programming/PHP/PHP-Tutorial-Printing-on-the-Screen.112786</link>
<description>
<![CDATA[<p>PHP is a script language commonly used by webmasters to design dynamic websites. Unlike HTML which has static content, PHP has dynamic content because of user interaction. Today, most of the qualified websites are designed by PHP or CGI.</p>
 
<p>PHP scripts embedded into the HTML codes. When someone checks the source code of the page, he doesn't get anything about PHP scripts. He only learns the HTML part of coding. This article is an introduction to PHP scripting language. One can find useful information and have enough knowledge after reading my PHP tutorial series. Without delay, I would like to start my script creation step by step.</p>
 
<p>Before starting, you should know that you have to set up PHP installations into your computer. Such installations are PHP itself, Phpmyadmin interface, Mysql database and Apache Server. Without these, your scripts are nothing since they are not compiled by your computer.</p>
 
<h3>Step 1:</h3>
 
<p>To write PHP scripts, we need a place. That place is a simple text editor. You are free to choose your text editor. I prefer  to use Notepad. There are other alternatives like Editplus or Elfima. If your operating system is not Windows but Linux, you can place your code into Vi editor or Pico. I have never tried but I think you can use Dreamveawer, Hotdog or Frontpage.</p>
 
<p>In your text editor, open an new file and save it as &amp;ldquo;myfirst.php&amp;rdquo; or &amp;ldquo;myfirst.html&amp;rdquo; . I choose the name of file as &amp;ldquo;myfirst&amp;rdquo; but you are free to choose anything.</p>
 
<h3>Step 2:</h3>
 
<p>I have told you before that PHP scripts are embedded into HTML codes. So, first of all we will write HTML codes. The basic codes are HTML, TITLE, HEAD and BODY. It can be written by lowercase letters as well. This part is not important.</p>
 
<p><img src="http://images.stanzapub.com/readers/computersight/2008/04/22/149028_0.jpg" alt="" /></p>
 
<p><strong>Step 3: </strong>All PHP scripts start with &amp;ldquo;  &amp;rdquo;. Only the part between two  is compiled by server and evaluated as output.To print characters on the screen, standart output functions of PHP are used. Those are &amp;ldquo; print &amp;rdquo; and &amp;ldquo; echo &amp;rdquo;. In some circumstances, &amp;rdquo; printf &amp;rdquo; is used too.</p>
 
<p>The format of printing:</p>
 <ol> 
<li> print  ( &amp;ldquo; your output &amp;rdquo; ) ;</li>
 
<li> print   &amp;ldquo; your output &amp;rdquo;  ;</li>
 
<li> echo &amp;ldquo; your output &amp;rdquo;  ;</li>
 
<li> echo ( &amp;ldquo; your outpu t&amp;rdquo; ) ; </li>
 </ol> 
<p>If you don't use any white space characters, the strings are written without any separation. For example if you write this code;</p>
 
<ul>
<li>Print ( &amp;ldquo; Word1 &amp;rdquo; ) ;</li>
 
<li>Print ( &amp;ldquo; Word2 &amp;rdquo; ) ;</li>
 
</ul>
<p>It will be outputted as Word1Word2.</p>
 
<p>To remove this fault,white space characters are used. In PHP code part, between print functions, we place &amp;lt; br &amp;gt; code.</p>
 
<p>Example: To be more understandable,I will write a simple PHP script. Output will be the name of my favorite Triond writers.</p>
 
<p><img src="http://images.stanzapub.com/readers/computersight/2008/04/22/149028_1.jpg" alt="" /></p>
 
<p>To see the output,<a href="http://learnphp.awardspace.biz/" target="_blank"> Click here.</a></p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FPHP%2FPHP-Tutorial-Printing-on-the-Screen.112786"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FPHP%2FPHP-Tutorial-Printing-on-the-Screen.112786" border="0"/></a>]]></description>
<pubDate>Tue, 22 Apr 2008 06:42:32 PST</pubDate></item>
<item>
<title>How to Install and Setup Bweb</title>
<link>http://www.computersight.com/Operating-Systems/Linux/How-to-Install-and-Setup-Bweb.39773</link>
<description>
<![CDATA[<p>
  I used the outline below to get Bweb running in Gentoo Linux, but it should work for almost any distribution. 
  
</p><p>

You need an Apache web server for this installation since Bweb runs in a web interface. 
  Any web server should do, but this how to is targeted towards apache.

<p><ol><li> First, we need to install the necessary perl modules. In Gentoo you emerge:<br>
<br>
	
emerge dev-perl/GD-Graph3d dev-perl/DBI dev-perl/DBD-mysql <br>dev-perl/HTML-Template dev-perl/Expect dev-perl/Time-modules.<br>
</li>
<br>
<li> Then, download and unpack the bacula-gui source:<br>
	<br>wget http://heanet.dl.sourceforge.net/sourceforge/bacula/bacula-gui-2.0.3.tar.gz
	tar xzvf bacula-gui-2.0.3.tar.gz<br>
</li><br>
<li> Now install Bweb from the source code:
	
<br><br>cd bacula-gui-2.0.3/bweb/<br>	perl Makefile.PL<br>	make install<br>	mkdir -m 755 /path/to/cgi-bin/bweb<br>	install -m 755 -o root -g root  bweb/cgi/*.pl /path/to/cgi-bin/bweb<br>	mkdir -m 755 /etc/bacula<br>	chown root:bacula /etc/bacula<br>	echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' <br>> /etc/bacula/bweb.conf<br>	chown www-data /etc/bacula/bweb.conf<br>	mkdir -p /usr/share/bweb/tpl<br>	install -m 644 -o root -g root  bweb/tpl/*.tpl /usr/share/bweb/tpl<br>	mkdir /path/to/htdocs/bweb<br>	install -m 644 -o root -g root  bweb/html/*.{js,png,css,gif,ico,html} /path/to/htdocs/bweb</br><br>

  
	  <strong>Note</strong>: the best way to test if we have all the dependencies fullfilled for Perl is to:
		cd /path/to/cgi-bin/bweb
		./bweb.pl
	   Should produce output similar to HTML code.)
<br>  <br>
<li>Add a catalog line to our bacula-dir.conf, which will redirect messages to bweb for interpretation. Under the messages directive, type:
	
<br>catalog = all, !skipped, !saved.</br>
</li><br>

<li>Restart bacula:
	<br>/etc/init.d/bacula restart<br>
</li><br>
<li> Ensure that the binary bconsole file can be executed by our web server : 
	<br>which bconsole | xargs chmod 755<br>
	</li><br>
<li> Ensure the configuration files in /etc/bacula/ can are writable by our webserver (apache):
	<br>chown :apache /etc/bacula/*.conf<br>
	chmod 664 /etc/bacula/*.conf<br>
	</li><br>
<li> Finally, we need to set up the initial configuration:
	Visit our new bweb URL - http://server/bweb.
	Browse to 'Configuration' and enter the following details:<br>
		
<br>DBI			DBI:mysql:database=bacula<br>		User		username<br>		Password	password<br>		Email		email@address.com<br>		Graph_font	/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf<br>		Template	/usr/share/bweb/tpl<br>		fv_write_path<br>		Stat_Job	Job<br>		Bconsole	/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf</br><br>

	<li> click "Save"</li></ol></p>
	
<p>Done. You should now have a detailed and interactive GUI to your bacula installation. Email the bacula user mailing list for any 
<a target="_blank" href="http://www.bacula.org">help</a>
.</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FLinux%2FHow-to-Install-and-Setup-Bweb.39773"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FLinux%2FHow-to-Install-and-Setup-Bweb.39773" border="0"/></a>]]></description>
<pubDate>Sun, 22 Jul 2007 06:56:22 PST</pubDate></item>
<item>
<title>Zend Platform Installation Tip with Apache and SELinux</title>
<link>http://www.computersight.com/Operating-Systems/Linux/Zend-Platform-Installation-Tip-with-Apache-and-SELinux.39817</link>
<description>
<![CDATA[<p>I have tried to install Zend Platform 2.2.1 on an apache 2.0.59 and php 5.1.6. When I tried to run &amp;quot;./install&amp;quot;, it kept giving me a bizarre html page containing a message &amp;quot;Zend Optimizer Not Installed&amp;quot;. I figured &amp;quot;well, I must install the Optimizer first probably&amp;quot;. So I installed Zend Optimizer, but that didn't solve the problem. I tried to find info on the Internet regarding this, but whatever I found did not solve my problem (posts such as <a href="http://www.zend.com/forums/index.php?t=msg&amp;goto=4676&amp;S=f26ba1ea4e1cfe492d72a728f9c2269f">this</a> and <a href="http://www.zend.com/forums/index.php?t=rview&amp;th=1431&amp;goto=3723">this</a>). </p>

<p>Well, after a day of trying to figure out what's wrong I found the answer. It has to do with SELinux and it's restrictions on shared modules loading and their context. </p>

<p>I figured this could be a problem, since when compiling, building and installing php 5.1.6, I ran into the following error message: &amp;quot;cannot restore segment prot after reloc: Permission Denied&amp;quot;. </p>

<p>So, the first thing I did was <br>
&amp;gt; <code>chcon –t texrel_shlib_t *.so</code> <br>
In the libs directory of the installation. </p>

<p>Voila! The installer ran! It ran all the way to the end of the installation, only to report that the services failed to install. </p>
<p>So I figured I am on the way to solving this completely, I just need to disable SELinux. I didn't want to use the SELINUX=Disabled in the selinux/config, so what I did was use the setenforce command. </p>

<p>do a getenforce command, and you get current enforcing status <br>
&amp;gt; <code>getenforce</code> <br>
# Enforcing </p>

<p>Now release enforcing: <br>
&amp;gt; <code>setenforce 0</code> <br>
# Permissive </p>

<p>You're on the roll! Go ahead and install Zend Platform. Don't forget to do a setenforce 1 to resume enforcing. </p>

<p>Hope it helps people out there. </p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FLinux%2FZend-Platform-Installation-Tip-with-Apache-and-SELinux.39817"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FOperating-Systems%2FLinux%2FZend-Platform-Installation-Tip-with-Apache-and-SELinux.39817" border="0"/></a>]]></description>
<pubDate>Tue, 26 Jun 2007 06:40:52 PST</pubDate></item>
</channel>
</rss>
