<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
    <channel>
        <title>CUBRID Fedora/Centos Yum Installation Tutorial</title>
        <link>http://www.cubrid.org/?mid=cubrid_yum_repositories</link>
        <description>CUBRID Fedora/Centos Yum Installation Tutorial</description>
        <language>en</language>
        <pubDate>Fri, 16 Sep 2011 07:08:51 -0800</pubDate>
        <lastBuildDate>Mon, 01 Apr 2013 08:18:20 -0800</lastBuildDate>
        <generator>XpressEngine 1.4.4.1</generator>
                        										        <item>
            <title>Installing CUBRID...</title>
            <dc:creator>CUBRID</dc:creator>
            <link>http://www.cubrid.org/cubrid_yum_repositories</link>
            <guid isPermaLink="true">http://www.cubrid.org/cubrid_yum_repositories</guid>
                                    <description><![CDATA[<h1>Installing CUBRID on Fedora or Centos</h1>

<div class="contents-table"></div>
    <p>
       The goal of this tutorial is to explain the steps required in order to install CUBRID using the CUBRID yum repositories. It is intended for users that have Fedora 13 or above, respectively Centos 6 and above, who want to easily install CUBRID from Fedora repos or Centos repos. This article will also show how to run a few simple commands that require root privileges. 
    </p>

<p>

<span style="color:#415D87">
<b>CUBRID 9.1.0 is available since 01.04.2013 for Fedora 13-17 and Centos 6.0 - 6.3.</b></span></p>

<p><span style="color:#415D87"><b></b>
</span>

    </p>

<h2>
       Overview 
    </h2>
    <p>
       CUBRID builds are available on CUBRID yum repositories starting with CUBRID version 8.3.1. Every time a new release is announced, we will be uploading it to CUBRID yum repositories.</p>
<h2>Setup yum to use CUBRID Repository</h2><div>
      <p>
         First of all, we must add the repository settings to yum configuration. To perform this step we prepared an RPM package customized for Fedora and CentOS distributions. RPM installation requires root access, so it must be run either from the root console or by using the <b>sudo</b> or <b>su</b> commands.</p>

<p>The following code will install yum settings for <b>Fedora 17</b> instalation and CUBRID 8.4.1 binaries.<br /></p>
<div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="true" nocontrols="true" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo rpm -ivh http://yumrepository.cubrid.org/cubrid_repo_settings/8.4.1/cubridrepo-8.4.1-1.fc17.noarch.rpm</div>

<ul>
<li>For other operating systems, replace <b>fc17&nbsp;</b>in the url above with fc13, fc14, fc15, fc16 (for other versions of Fedora) or el6, el6.1, el6.2 (for Centos versions).</li>
<li>To install yum settings for other versions of Fedora or Centos use the links from:&nbsp;
<a href="/yum_repository">http://www.cubrid.org/yum_repository</a></li>
</ul>
<p></p>

<p>Using <b>yum search cubrid </b> a user can see a list of available CUBRID packages :</p>
<div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">
cubrid-demodb.i386 : Sample CUBRID database named demodb<br />
cubrid-devel.i386 : Development files for CUBRID database<br />
cubridrepo.noarch : Cubrid Repository Configuration<br />
php-cubrid.i386 : PHP API for CUBRID database<br />
python-cubrid.i386 : Python API for CUBRID database<br />
cubrid.i386 : An open source database highly optimized for Web applications</div>

<p>Since <b>CUBRID 8.4.3</b>, there are only 2 sets of cubrid repositories, one for Fedora 15 and above available at&nbsp;<a href="http://yumrepository.cubrid.org/cubrid_repo_settings/8.4.3/cubridrepo-9.1.0-1.fc15.noarch.rpm" target="_self">Fedora 15+</a>&nbsp;and one for Fedora &lt; 15 (tested against Fedora 13 and Fedora 14) and Centos 6.0 and above (tested up to Centos 6.3) available at <a href="http://yumrepository.cubrid.org/cubrid_repo_settings/8.4.3/cubridrepo-9.1.0-1.el6.noarch.rpm" target="_self">Centos 6.0+</a>.</p>

<div><h2>
           Installing CUBRID 
        </h2>
        <p>
           In order to perform the installation after adding the repository settings, all we need to do is to run <b>yum install ...</b> with root privileges: 
        </p>
        <div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">yum install cubrid</div>
        
        <p>
        
        </p>

<p>
          Remember: After the installation, you must restart your computer in order for the CUBRID PATH variables to be set. If you sign out and sign in again you will obtain a similar effect faster.
        </p>
        <p>
           In case you want to use CUBRID without restarting, every time you open a new terminal window you must type the command: 
        </p>
        <div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">. /etc/profile.d/cubrid.sh</div>
        <p>
           Make sure that there is a space between the<b> point</b> and <b>/etc</b> or the command won’t work properly. This command sets the PATH variables temporarily for that terminal window. They remain set until the terminal window is closed.</p>
        <p>
          <b>Note:</b>&nbsp;If you connect as a different user and the "cubrid" command is not found, then you must run the above ". /etc/profile.d/cubrid.sh"&nbsp;command&nbsp;in order to set the correct environment variables.</p>

<p>
        </p>
        <h2>(Optional) Installing CUBRID Manager (CUBRID 8.4.0 or below)</h2>
        <p>
           Now that we have installed CUBRID, we can install the optional CUBRID Manager Server. This is needed to provide a management interface to CUBRID Manager client application. You can find the packages in the same yum repository as the CUBRID package.</p>
        <p>
        </p>
        <div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">yum install cubrid-manager-server</div>
        <p>
          This will install the CUBRID Manager server which will load on startup alongside cubrid.</p>

<p>Note : In order to be able to connect from a remote machine with CUBRID Manager Client, the firewall settings may need to be changed. Please refer to '<b>system-config-firewall</b>" manual for your distribution and also CUBRID settings for required ports that need to be allowed.</p>

<h2>(Optional) Installing CUBRID sample database</h2>

<p>CUBRID comes with a sample database named demodb. It contains 10 tables with various types of columns. In order to create this table and load its data, starting with CUBRID 8.4.1 you can run:</p>
<div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">
yum install cubrid-demodb
</div>
<p></p>
        <p>
        </p>
        <p>
        </p>
        <h2>CUBRID Service</h2><p>The CUBRID service offers several commands that can be run from the root user or by preceding all commands with "<b>sudo -i</b>" (-i preserves the environment variables).</p>
<p>
</p>

<ul>
<li>Start Server: service cubrid start</li>
<li>Stop Server: service cubrid stop</li>
<li>Restart Server: service cubrid restart<br /></li>
</ul>
<p>Since CUBRID 8.4.1 the service also supports the following commands:</p>
<ul>
<li>View Status: service cubrid status</li>
<li>Create Database: service cubrid createdb dbname [parameters] (more details regarding the parameters can be found here: <a href="../../../../manual/841/en/Database%20Administration-Creating%20Database" title="createdb">createdb command</a>)</li>
<li>Delete Database: service cubrid deletedb dbname (where dbname is the name of the database to be deleted)</li>
<li>Start Database: service cubrid startdb dbname</li>
<li>Stop Database: service cubrid stopdb dbname</li>
<li>Restart Database: service cubrid restartdb dbname</li>
</ul>


<p><b>Note: </b>The above service commands used for CUBRID 8.4.1 are not valid for Fedora 15 and above. If you want to perform administrative commands like the ones above, you must log in as cubrid user using the command "<b>sudo su -s $SHELL cubrid</b>" and then execute all regular cubrid commands such as "cubrid createdb test". This approach also works for Fedora 13-14 and Centos, where the rest of the service commands are just a way to simplify database creation and handling.&nbsp;</p>

<h2>Running CUBRID Commands 
        </h2>
        <p>
           Congratulations! You have successfully installed CUBRID. If you want to run CUBRID commands however, there is one more thing you should take into consideration. CUBRID is installed by default into <b>/usr/share/cubrid&nbsp;</b>folder where the normal user has only read access. The conf files are saved into /etc/cubrid, while the variable files such as logs or databases in /var/cubrid.</p>
        <p>If you want to perform administrative tasks such as all <b>cubrid </b>commands or "<b>csql -S</b>" (standalone mode), you must first log in as cubrid user using the command:</p>
        <div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">sudo su -s $SHELL cubrid</div>

        <p><b>Note:</b> The CUBRID init.d service script is by default installed into /etc/init.d/cubrid. CUBRID is set to auto-start. Use chkconfig command to change the default&nbsp;behavior. On Fedora 15+ the cubrid.service file is used to handle the service.</p>

<p>Since CUBRID 8.4.1 any error regarding service commands will be saved to <b>/var/cubrid/tmp/service.cubrid</b>.</p>
<h2>Installing PHP API 
        </h2>
        <p>
           In case you want to access CUBRID databases from within the php code, then you can install <b>php-cubrid</b>&nbsp;package:</p>

<div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">yum install php-cubrid</div>

<p>
          This will automatically install dependent php packages.
        </p>

<p>
           Note that after installation your web server must be restarted for php to reload the modules: 
        </p>
        <p>
        </p>
        <div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">service httpd restart</div>

<p>
        </p>

<h2>Installing Python API</h2>

<p>In case you want to access CUBRID databases from within the python code, then you can install <b>python-cubrid&nbsp;</b>package:</p>

<div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">yum install python-cubrid</div>

<p>
          This will automatically install dependent python packages.
        </p>
        <h2>
           Uninstalling CUBRID 
        </h2>
        <p>
           If you want to uninstall CUBRID, the procedure is almost identical to the one for the installation. You only need to run: 
        </p>
        <div editor_component="code_highlighter" code_type="Bash" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="border: #666666 1px dotted; border-left: #22aaee 5px solid; padding: 5px; background: #FAFAFA url(/modules/editor/components/code_highlighter/code.png) no-repeat top right;">yum erase cubrid</div>

<p>
        
        <b></b></p>

<p>Your system will uninstall CUBRID as shown below. Note that yum will erase dependencies as well.</p>

        <h2>
           Summary 
        </h2>
        <p>
           This concludes the tutorial for installing CUBRID on Fedora and CentOS from CUBRID yumrepository. We hope that you found this tutorial useful and that it helped you understand how to install, run and remove CUBRID. Let us know your feedback and remember to periodically check CUBRID Tutorials at&nbsp;<a href="/tutorials" target="_self">http://www.cubrid.org/tutorials</a>&nbsp;for more tutorials and resources. <br /></p>

<h2>Getting Help</h2>

<p>If you have any questions, you can post them in our <a href="../../../../questions" target="_self">Q&amp;A site</a> or you can post a comment on our <a href="../../../../forum" target="_self">forum</a>.</p>
      
    
    
    </div>

</div>]]></description>
                        <pubDate>Fri, 16 Sep 2011 06:18:23 -0800</pubDate>
                        <category>install cubrid</category>
                        <category>fedora</category>
                        <category>centos</category>
                        <category>yum</category>
                        <category>linux</category>
                        <category>packaging</category>
                                </item>
            </channel>
</rss>
