Simple script to install on Ubuntu 10.04 LTS: Difference between revisions
From NEOSYS Dev Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
#cut and paste everything into a bash script and run it as follows: | #cut and paste everything into a bash script and run it as follows: | ||
#nano installexodus.sh | #nano installexodus.sh | ||
# | #. installexodus.sh | ||
#tested on: | #tested on: | ||
Line 16: | Line 15: | ||
cat /etc/issue | cat /etc/issue | ||
#==== 1. Building and Installing Exodus ==== | |||
#==== | |||
###yum -y install subversion gcc-c++ postgresql-devel | ###yum -y install subversion gcc-c++ postgresql-devel | ||
sudo apt-get -y install subversion g++ postgresql-server-dev* | sudo apt-get -y install subversion g++ postgresql-server-dev* libboost-all-dev | ||
cd ~ | cd ~ | ||
Line 48: | Line 25: | ||
cd ~/exodus | cd ~/exodus | ||
./configure | ./configure | ||
make clean #in case half-built with wrong boost libs | |||
make | make | ||
sudo make install | sudo make install | ||
#==== | #==== 2. Installing Postgres and Configuring it for Exodus ==== | ||
export POSTGRESVER=8.4 | export POSTGRESVER=8.4 | ||
Line 90: | Line 68: | ||
chmod a+xr /tmp/exoduspg.input | chmod a+xr /tmp/exoduspg.input | ||
sudo su postgres -c "/tmp/exoduspg.input" | sudo su postgres -c "/tmp/exoduspg.input" | ||
rm /tmp/exoduspg.input | rm -f /tmp/exoduspg.input | ||
#/etc/init.d/postgresql reload | #/etc/init.d/postgresql reload | ||
sudo /etc/init.d/postgresql-$POSTGRESVER reload | sudo /etc/init.d/postgresql-$POSTGRESVER reload | ||
#==== | |||
#==== 3. Configuring Exodus for Postgres ==== | |||
echo host=127.0.0.1 \ | echo host=127.0.0.1 \ | ||
Line 104: | Line 83: | ||
> ~/.exodus | > ~/.exodus | ||
#==== | |||
#==== 4. Testing Exodus ==== | |||
cd ~ | cd ~ | ||
testsort | testsort | ||
#==== | |||
#==== 5. Programming with Exodus ==== | |||
#you must make some change to hello or actually save it, not just quit | #you must make some change to hello or actually save it, not just quit |
Latest revision as of 01:54, 12 June 2011
#!/bin/bash #=== Building and Installing Exodus on Ubuntu 10.04.2 LTS x64 === #cut and paste everything into a bash script and run it as follows: #nano installexodus.sh #. installexodus.sh #tested on: #Ubuntu 10.04.2 LTS #Linux lucid64 2.6.32-31-server #61-Ubuntu SMP Fri Apr 8 19:44:42 UTC 2011 x86_64 GNU/Linux uname -a cat /etc/issue #==== 1. Building and Installing Exodus ==== ###yum -y install subversion gcc-c++ postgresql-devel sudo apt-get -y install subversion g++ postgresql-server-dev* libboost-all-dev cd ~ svn co HTTPS://exodusdb.googlecode.com/svn/trunk/ exodus cd ~/exodus ./configure make clean #in case half-built with wrong boost libs make sudo make install #==== 2. Installing Postgres and Configuring it for Exodus ==== export POSTGRESVER=8.4 ###yum -y install postgresql-server sudo apt-get -y install postgresql-$POSTGRESVER ###/etc/init.d/postgresql start #/etc/init.d/postgresql-$POSTGRESVER start cat > /tmp/exoduspg.input << EOF #!/bin/bash psql -U postgres -d template1 << EOF2 \connect template1 CREATE OR REPLACE FUNCTION exodus_call(bytea, bytea, bytea, bytea, bytea, int4, int4) RETURNS bytea AS 'pgexodus', 'exodus_call' LANGUAGE C IMMUTABLE; CREATE OR REPLACE FUNCTION exodus_extract_bytea(bytea, int4, int4, int4) RETURNS bytea AS 'pgexodus', 'exodus_extract_bytea' LANGUAGE C IMMUTABLE; CREATE OR REPLACE FUNCTION exodus_extract_text(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'exodus_extract_text' LANGUAGE C IMMUTABLE; CREATE OR REPLACE FUNCTION exodus_extract_sort(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'exodus_extract_sort' LANGUAGE C IMMUTABLE; -- Remaining functions are STRICT therefore never get called with NULLS -- also return NULL if passed zero length strings CREATE OR REPLACE FUNCTION exodus_extract_text2(bytea, int4, int4, int4) RETURNS text AS 'pgexodus', 'exodus_extract_text2' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION exodus_extract_date(bytea, int4, int4, int4) RETURNS date AS 'pgexodus', 'exodus_extract_date' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION exodus_extract_time(bytea, int4, int4, int4) RETURNS time AS 'pgexodus', 'exodus_extract_time' LANGUAGE C IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION exodus_extract_datetime(bytea, int4, int4, int4) RETURNS timestamp AS 'pgexodus', 'exodus_extract_datetime' LANGUAGE C IMMUTABLE STRICT; CREATE ROLE exodus LOGIN PASSWORD 'somesillysecret' CREATEDB CREATEROLE; CREATE DATABASE exodus WITH ENCODING='UTF8' OWNER=exodus; \df exodus* \q EOF2 EOF chmod a+xr /tmp/exoduspg.input sudo su postgres -c "/tmp/exoduspg.input" rm -f /tmp/exoduspg.input #/etc/init.d/postgresql reload sudo /etc/init.d/postgresql-$POSTGRESVER reload #==== 3. Configuring Exodus for Postgres ==== echo host=127.0.0.1 \ port=5432 \ dbname=exodus \ user=exodus \ password=somesillysecret \ > ~/.exodus #==== 4. Testing Exodus ==== cd ~ testsort #==== 5. Programming with Exodus ==== #you must make some change to hello or actually save it, not just quit #edic hello #hello #compile hello