<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unix Surgeon &#187; jpgraph</title>
	<atom:link href="http://www.unixsurgeon.com/kb/tag/jpgraph/feed" rel="self" type="application/rss+xml" />
	<link>http://www.unixsurgeon.com/kb</link>
	<description>Linux Hosting Solution, Linux Web Hosting Solution, Learn Linux, How to, Server Management , Web Hosting Solution , Linux Solution , KnowledgeBase , Linux Tutorial</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:42:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to install JpGraph on linux server.</title>
		<link>http://www.unixsurgeon.com/kb/how-to-install-jpgraph.html</link>
		<comments>http://www.unixsurgeon.com/kb/how-to-install-jpgraph.html#comments</comments>
		<pubDate>Sat, 20 Dec 2008 12:48:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[jpgraph]]></category>
		<category><![CDATA[php & jpgraph]]></category>

		<guid isPermaLink="false">http://unixsurgeon.com/?p=5</guid>
		<description><![CDATA[I use JpGraph for some websites I run. It&#8217;s a PHP package that produces good-looking graphs.
Installing JpGraph
We&#8217;re going to need to be able to extract some stuff from some CAB files for starters.
Re-enable the yum Dag repository by setting enabled=1 in /etc/yum.repos.d/Dag.repo or  /etc/yum.repos.d/rhel-debuginfo.repo
Once that&#8217;s done, continue on. First we need to install cabextract, then [...]]]></description>
			<content:encoded><![CDATA[<p>I use JpGraph for some websites I run. It&#8217;s a PHP package that produces good-looking graphs.</p>
<p>Installing JpGraph</p>
<p>We&#8217;re going to need to be able to extract some stuff from some CAB files for starters.<br />
Re-enable the yum Dag repository by setting enabled=1 in /etc/yum.repos.d/Dag.repo or  /etc/yum.repos.d/rhel-debuginfo.repo<br />
Once that&#8217;s done, continue on. First we need to install cabextract, then get some Microsoft TT fonts or TTF fonts. See <a href="http://corefonts.sourceforge.net/" target="_new">http://corefonts.sourceforge.net/</a><br />
for updated instructions on that, otherwise:</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>[root@p-root /]# yum install cabextract<br />
[root@p-root /]# mkdir /usr/src/msttcorefonts<br />
[root@p-root /]# cd /usr/src/msttcorefonts<br />
[root@p-root /]# wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec<br />
[root@p-root /]# rpmbuild -bb msttcorefonts-2.0-1.spec</p>
<p>The fonts should be downloaded from SourceForge and compiled into an RPM. The new RPM will reside under the standard RPM build architecture. Install it:</p>
<p>[root@proot /]# rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm</p>
<p>Now for Jpgraph. Go to <a href="http://www.aditus.nu/jpgraph/jpdownload.php/" target="_new">http://www.aditus.nu/jpgraph/jpdownload.php/</a><br />
and get the download link for the latest version.</p>
<p>[root@proot /]# cd /srv/www<br />
[root@proot /]# wget <a href="http://www.aditus.nu/jpgraph/jpdownload.php/" target="_new">http://www.aditus.nu/jpgraph/jpdownload.php/</a><br />
[root@proot /]# tar zxvf jpgraph-[version].tar.gz<br />
[root@proot /]# ln -s jpgraph-[version]/ jpgraph<br />
[root@proot /]# rm jpgraph-[version].tar.gz</p>
<p>The JpGraph code sits above any website document roots I might have set up. I can include Jpgraph into my web code and use it there, but the code itself is not directly accessible from the web.</p>
<p>Disable the Dag repository again by setting enabled=0 in /etc/yum.repos.d/Dag.repo</p>
<p>Configure JpGraph:)</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7877248176171699";
google_ad_slot = "4635030684";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Edit /srv/www/jpgraph/src/jpg-config.inc.php and set the following line:<br />
DEFINE(&#8221;TTF_DIR&#8221;,&#8221;/usr/share/fonts/msttcorefonts/&#8221;);</p>
<p>Note: If fonts aren&#8217;t appearing in your graphs, make sure that you compiled PHP with the &#8220;-dir&#8221; options pointing to the right lib*.so files (/usr/lib)&#8230;:)</p>
<p>Enjoy linux&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixsurgeon.com/kb/how-to-install-jpgraph.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

