Installation gflags on Ubuntu 14.04
On Ubuntu or Debian machine You can get related packages doing something like this:
$ apt-cache search gflags
Output on my machine (Ubuntu 14.04):
libgflags-dev - commandline flags module for C++ (development files)
libgflags-doc - documentation of gflags
libgflags2 - commandline flags module for C++ (shared library)
python-gflags - Python implementation of the Google command line flags module
python-google-apputils - Google Application Utilities for Python
So, I presume You could install it using it's full name like this:
$ sudo apt-get install libgflags2 libgflags-dev
original source: https://askubuntu.com/questions/312173/installing-gflags-12-04
'Dababase' 카테고리의 다른 글
rocksdb error (0) | 2016.03.03 |
---|---|
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
port forwarding (0) | 2016.02.02 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
rocksdb error
rocksdb put error: IO error: sst: Too many open files
--> /etc/security/limits.conf
root hard nofile 500000
root soft nofile 500000
* hard nofile 500000
* soft nofile 500000
'Dababase' 카테고리의 다른 글
Installation gflags on Ubuntu 14.04 (0) | 2017.05.31 |
---|---|
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
port forwarding (0) | 2016.02.02 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
postgresql 9.3 on SpecVirt 작업 일지
---------------------------------------------------------------------------------------------
Error 메시지 - (Reference 1 참조)
---------------------------------------------------------------------------------------------
makeme_dbserver.sh
테이블 생성이 모두 실패.
하지만 끝까지 진행
loaddb_postgres.sh
막판에 read error 3개 발생
하지만 완료
---------------------------------------------------------------------------------------------
특이 사항
---------------------------------------------------------------------------------------------
디비를 새로 생성하고, 기존의 데이터를 반드시 없애야 함. (아니면 디비가 실행이 안됨)
디비를 생성한 계정으로 postgresql-9.3 을 실행해야만 함.
initdb: 한번 디비의 데이터가 생성된 경우(/var/lib/pgsql/9.3/data) 반드시 fail이 발생한다. 백업을 다른 곳에 해두고 initdb를 다시 할것
service postgresql-9.3 start 가 그래도 안될 경우,
/usr/pgsql-9.3/bin/postgres -D /dbstore/data 를 해보고 메시지를 살필것.
postgres cannot access the server configuration file "/dbstore/postgresql.conf": No such file or directory
---------------------------------------------------------------------------------------------
Reference 1
---------------------------------------------------------------------------------------------
[root@dbserver1 dbvm_scripts]# ./makeme_dbserver.sh
++ cat /opt/hosts.vms
++ echo JAVA_HOME=/usr/lib/jvm/jre
++ echo 'export JAVA_HOME'
++ POSTGRES_CONFDIR=/etc
++ service postgresql-9.3 initdb
Data directory is not empty!
++ service postgresql-9.3 start [FAILED]
Starting postgresql-9.3 service: [ OK ]
++ service postgresql-9.3 stop
Stopping postgresql-9.3 service: [ OK ]
++ chkconfig postgresql-9.3 on
++ mkdir -p /dbstore
++ mkdir -p /dbstore/data/spects
++ mkdir -p /dbstore/log
++ mv /var/lib/pgsql/9.3/data/pg_clog /dbstore/log
++ mv /var/lib/pgsql/9.3/data/pg_xlog /dbstore/log
++ ln -s /dbstore/log/pg_clog /var/lib/pgsql/9.3/data/pg_clog
++ ln -s /dbstore/log/pg_xlog /var/lib/pgsql/9.3/data/pg_xlog
++ chown -R postgres:postgres /dbstore
++ cp /var/lib/pgsql/9.3/data/pg_hba.conf /var/lib/pgsql/9.3/data/pg_hba.conf.orig
++ cp /var/lib/pgsql/9.3/data/postgresql.conf /var/lib/pgsql/9.3/data/postgresql.conf.orig
++ sed -i s/ident/trust/g /var/lib/pgsql/9.3/data/pg_hba.conf
++ sed -i s/peer/trust/g /var/lib/pgsql/9.3/data/pg_hba.conf
++ cat /opt/dbvm_scripts/files/postgresql93.conf.append
++ echo 'host all all 20.20.20.0/24 trust'
++ echo 'host all all 192.168.100.0/24 trust'
++ echo 500 64000 400 512
++ service postgresql-9.3 start
Starting postgresql-9.3 service: [ OK ]
++ sleep 20
++ cd /opt/SPECjAppServer2004/schema/postgresql/
++ sed -i s/postgres/dbstore/g sql/create_tablespace.sql
++ service postgresql-9.3 stop
Stopping postgresql-9.3 service: [ OK ]
++ sleep 20
++ service postgresql-9.3 start
Starting postgresql-9.3 service: [ OK ]
++ ./buildall.sh
CREATE TABLESPACE
dropdb: database removal failed: ERROR: database "specdb" does not exist
SET
ERROR: table "c_customerinventory" does not exist
CREATE TABLE
CREATE INDEX
ERROR: table "c_customer" does not exist
CREATE TABLE
ERROR: table "c_supplier" does not exist
CREATE TABLE
ERROR: table "c_site" does not exist
CREATE TABLE
ERROR: table "c_parts" does not exist
CREATE TABLE
SET
ERROR: table "m_parts" does not exist
CREATE TABLE
ERROR: table "m_bom" does not exist
CREATE TABLE
ERROR: table "m_workorder" does not exist
CREATE TABLE
ERROR: table "m_largeorder" does not exist
CREATE TABLE
CREATE INDEX
CREATE INDEX
ERROR: table "m_inventory" does not exist
CREATE TABLE
SET
ERROR: table "o_orders" does not exist
CREATE TABLE
CREATE INDEX
ERROR: table "o_orderline" does not exist
CREATE TABLE
ERROR: table "o_item" does not exist
CREATE TABLE
CREATE INDEX
SET
ERROR: table "s_component" does not exist
CREATE TABLE
ERROR: table "s_supp_component" does not exist
CREATE TABLE
ERROR: table "s_supplier" does not exist
CREATE TABLE
ERROR: table "s_site" does not exist
CREATE TABLE
ERROR: table "s_purchase_order" does not exist
CREATE TABLE
ERROR: table "s_purchase_orderline" does not exist
CREATE TABLE
SET
ERROR: table "txn_log_table" does not exist
CREATE TABLE
SET
ERROR: table "u_sequences" does not exist
CREATE TABLE
SET
ALTER TABLE
ERROR: multiple primary keys for table "c_customer" are not allowed
ERROR: multiple primary keys for table "c_customerinventory" are not allowed
ERROR: multiple primary keys for table "c_parts" are not allowed
ERROR: multiple primary keys for table "c_site" are not allowed
ERROR: multiple primary keys for table "c_supplier" are not allowed
ERROR: multiple primary keys for table "m_bom" are not allowed
ERROR: multiple primary keys for table "m_inventory" are not allowed
ERROR: multiple primary keys for table "m_largeorder" are not allowed
ERROR: multiple primary keys for table "m_parts" are not allowed
ERROR: multiple primary keys for table "m_workorder" are not allowed
ERROR: multiple primary keys for table "o_item" are not allowed
ERROR: multiple primary keys for table "o_orderline" are not allowed
ERROR: multiple primary keys for table "o_orders" are not allowed
ERROR: multiple primary keys for table "s_component" are not allowed
ERROR: multiple primary keys for table "s_purchase_order" are not allowed
ERROR: multiple primary keys for table "s_purchase_orderline" are not allowed
ERROR: multiple primary keys for table "s_site" are not allowed
ERROR: multiple primary keys for table "s_supp_component" are not allowed
ERROR: multiple primary keys for table "s_supplier" are not allowed
ERROR: multiple primary keys for table "txn_log_table" are not allowed
ERROR: multiple primary keys for table "u_sequences" are not allowed
ERROR: relation "c_custci_idx" already exists
ERROR: relation "m_lo_cat_idx" already exists
ERROR: relation "m_lo_o_idx" already exists
ERROR: relation "o_icat_idx" already exists
ERROR: relation "o_oc_idx" already exists
REVOKE
REVOKE
GRANT
GRANT
++ echo JAVA_HOME=/usr/lib/jvm/jre
++ echo 'export JAVA_HOME'
++ echo 'PATH=${JAVA_HOME}/bin:$PATH'
++ echo 'export PATH'
++ echo 'java -jar /opt/SPECpoll/pollme.jar -n `hostname`-int -p 8001 > /tmp/pollme.out 2>&1&'
++ /opt/dbvm_scripts/ostune.sh
Reverting to saved sysctl settings: [ OK ]
Calling '/etc/ktune.d/tunedadm.sh stop': [ OK ]
Reverting to cfq elevator: dm-0 dm-1 vda vdb [ OK ]
Stopping tuned: [ OK ]
Switching to profile 'virtual-guest'
Applying deadline elevator: dm-0 dm-1 vda vdb [ OK ]
Applying ktune sysctl settings:
/etc/ktune.d/tunedadm.conf: [ OK ]
Calling '/etc/ktune.d/tunedadm.sh start': [ OK ]
Applying sysctl settings from /etc/sysctl.d/libvirtd
Applying sysctl settings from /etc/sysctl.conf
Starting tuned: [ OK ]
++ set +x
'Dababase' 카테고리의 다른 글
Installation gflags on Ubuntu 14.04 (0) | 2017.05.31 |
---|---|
rocksdb error (0) | 2016.03.03 |
port forwarding (0) | 2016.02.02 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
port forwarding
윈도우 포트 포워딩 아이피타임 http://myplace.iptime.org/?c=inform_menu/4&uid=53
우분투 포트 포워딩 http://redeyesofangel.tistory.com/722
'Dababase' 카테고리의 다른 글
rocksdb error (0) | 2016.03.03 |
---|---|
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
Installing gflags 12.04 (0) | 2015.07.17 |
examplie: test application for rocksdb compile
g++ -g -Wall -Werror -I. -I./include -std=c++11 -DROCKSDB_PLATFORM_POSIX -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_ATOMIC_PRESENT -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=google -DZLIB -DBZIP2 -DHAVE_JEMALLOC -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -c db/db_bench.cc -o db/db_bench.o
g++ db/db_bench.o db/builder.o db/c.o db/column_family.o db/compaction.o db/compaction_picker.o db/db_filesnapshot.o db/dbformat.o db/db_impl.o db/db_impl_debug.o db/db_impl_readonly.o db/db_iter.o db/db_stats_logger.o db/file_indexer.o db/filename.o db/internal_stats.o db/log_reader.o db/log_writer.o db/memtable.o db/memtable_list.o db/merge_helper.o db/merge_operator.o db/repair.o db/table_cache.o db/table_properties_collector.o db/tailing_iter.o db/transaction_log_impl.o db/version_edit.o db/version_set.o db/write_batch.o table/block_based_table_builder.o table/block_based_table_factory.o table/block_based_table_reader.o table/block_builder.o table/block.o table/block_hash_index.o table/filter_block.o table/flush_block_policy.o table/format.o table/iterator.o table/merger.o table/meta_blocks.o table/plain_table_builder.o table/plain_table_factory.o table/plain_table_reader.o table/table_properties.o table/two_level_iterator.o util/arena.o util/auto_roll_logger.o util/blob_store.o util/bloom.o util/build_version.o util/cache.o util/coding.o util/comparator.o util/crc32c.o util/dynamic_bloom.o util/env.o util/env_hdfs.o util/env_posix.o util/filter_policy.o util/hash.o util/hash_cuckoo_rep.o util/hash_linklist_rep.o util/hash_skiplist_rep.o util/histogram.o utilities/backupable/backupable_db.o utilities/geodb/geodb_impl.o utilities/merge_operators/put.o utilities/merge_operators/string_append/stringappend2.o utilities/merge_operators/string_append/stringappend.o utilities/merge_operators/uint64add.o utilities/redis/redis_lists.o utilities/ttl/db_ttl_impl.o util/ldb_cmd.o util/ldb_tool.o util/log_buffer.o util/logging.o util/murmurhash.o util/options.o util/perf_context.o util/skiplistrep.o util/slice.o util/statistics.o util/status.o util/string_util.o util/sync_point.o util/thread_local.o util/vectorrep.o util/xxhash.o port/port_posix.o port/stack_trace.o ./util/testutil.o -o db_bench -lpthread -lrt -lsnappy -lgflags -lz -lbz2
'Dababase' 카테고리의 다른 글
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
---|---|
port forwarding (0) | 2016.02.02 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
Installing gflags 12.04 (0) | 2015.07.17 |
RocksDB Installation on Ubuntu 12.04 (0) | 2015.07.17 |
Rocks DB 설치 on Ubuntu 12.04 LTS
How to install RocksDB on Ubuntu 12.04 LTS
Posted: Tháng Mười Hai 4, 2013 in DatabaseTags: facebook rocksdb, how to install rocksdb on ubuntu, install rocksdb, rocksdb, rocksdb on ubuntu, ubuntu, ubuntu 12.04
If you want to know more information about RocksDB, go to there: http://rocksdb.org/
RockDB requires some new libraries that do not support ubuntu 12.04. I’ll help you install step by step to do it.
1) Install gcc and g++ version 4.8
– Check your gcc and g++ version:
1 | gcc --version |
and
1 | g++ --version |
If gcc and g++ haven’t installed in your OS or their version < 4.7, you must install them by comand lines below:
– Add PPA to your repositories:
1 2 | sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update |
– Unistall the alternative:
1 2 | sudo update-alternatives --remove-all gcc sudo update-alternatives --remove-all g++ |
– Install:
1 2 | sudo apt-get install gcc-4.8 sudo apt-get install g++-4.8 |
– Alternative packages install:
1 2 3 4 | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20 sudo update-alternatives --config gcc sudo update-alternatives --config g++ |
at the end:
1 2 3 | sudo apt-get update sudo apt-get upgrade -y sudo apt-get dist-upgrade |
2) Install the libararies:
* [zlib](http://www.zlib.net/) – a library for data compression.
1 | sudo apt-get install zlib1g-dev |
* [bzip2](http://www.bzip.org/) – a library for data compression.
1 | sudo apt-get install libbz2-dev |
* [snappy](https://code.google.com/p/snappy/) – a library for fast
data compression.
1 | sudo apt-get install libsnappy-dev |
* [gflags](https://code.google.com/p/gflags/) – a library that handles
– Go to page: https://github.com/schuhschuh/gflags
– Download gflags compressed file.
– Extract file and cd to gflags-master folder
1 | ./configure |
1 | make |
1 | sudo make install |
3) Install rocksdb:
– Download zip file from: https://github.com/facebook/rocksdb
– Extract file and cd to rocksdb-master
1 | make |
1 | sudo make install |
4) Create test project
After installing all libraries required by RocksDB. We will create a test project. In this case, I use Netbeans IDE:
1. Create an C++ Application
2. Create library
– Go to your project folder, in this project folder, we create a folder and named it as “lib”.
– Go to folder rocksdb-master that we had built and copy folder rocksdb-master/include/rocksdb to <your project folder>/lib.
– Copy library rocks-master/librocksdb.a to <your project folder>/lib and /usr/lib.
– Now make sure that you had installed bz2 and snappy. Go to /usr/lib and copy libraries: libbz2.a, libsnappy.a to <your project folder>/lib.
3. Configure your project:
Right click on Netbeans project and chose Properties.
– In Build > C++Complier > C++ Standard chose C++11.
– In Build > C++Complier> Include Directories and Headers, link to <your project folder>/lib.
– In Build > Linker > Addition Library Directories, link to <your project folder>/lib.
– In Build > Linker > Libraries, chose Add Libraries and chose all .a files in <your project folder>/lib we had copied.
– In Build > Linker > Additional Options: add “-lz -lpthread -lrt”.
Now let’s try to copy source code below to main file in your project and build:
1 2 3 4 5 6 7 8 9 10 11 | #include <assert.h> #include "rocksdb/db.h" int main( int argc, char ** argv) { rocksdb::DB *db; rocksdb::Options options; options.create_if_missing = true ; rocksdb::Status status = rocksdb::DB::Open(options, "/tmp/testdb/" , &db); assert (status.ok()); return 0; } |
Enjoy!
original source: https://bienuit.wordpress.com/2013/12/04/how-to-install-rocksdb-on-ubuntu-12-04-lts/
'Dababase' 카테고리의 다른 글
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
---|---|
port forwarding (0) | 2016.02.02 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Installing gflags 12.04 (0) | 2015.07.17 |
RocksDB Installation on Ubuntu 12.04 (0) | 2015.07.17 |
Installing gflags 12.04
Installing gflags 12.04
Manual package build (backport)
This is a very very verbose description - for anyone building a package for the first time.
1.
Install basic packages
to build software and packages: build-essential
2. Go to the source package (gflags) page at Launchpad:https://launchpad.net/ubuntu/+source/gflags
3. Unfold the section for "The Quantal Quetzal (supported) 2.0-1" version.
4. Locate the source package description file (.dsc extension). At the time of writing this ishttps://launchpad.net/ubuntu/+archive/primary/+files/gflags_2.0-1.dsc
5. Copy the link to your clipboard.
6. Open a terminal and download the source package using dget:
7. dget https://launchpad.net/ubuntu/+archive/primary/+files/gflags_2.0-1.dsc
This will fail the first time:
gpg: Signature made Thu 31 May 2012 14:48:41 CEST using RSA key ID 8AE09345
gpg: Can't check signature: public key not found
Validation FAILED!!
8. Install the required RSA key as in the error message above:
9. gpg --keyserver keyserver.ubuntu.com --recv-key 8AE09345
10. Configure the DPKG development scripts to use your GPG keyring:
11. echo 'DSCVERIFY_KEYRINGS="/etc/apt/trusted.gpg:~/.gnupg/pubring.gpg"' > ~/.devscripts
See Added key, but dget still shows "gpg: Can't check signature: public key not found" for why.
12. Run the earlier dget command again. This should now succeed.
13. Hop into the directory created:
14. cd gflags-2.0/
15. Try building the package.
16. debuild -uc -us
Explanation for the options: unsigned changes file, unsigned new .dsc file. As you are not redistributing the package, there's no need to sign anything.
This may fail due to missing build dependencies, e.g.:
dpkg-checkbuilddeps: Unmet build dependencies: debhelper
Note this is really system specific.
17. Install the build dependencies (satisfy all above from the output you get), e.g.:
18. sudo apt-get install debhelper
19. Try building the package again:
20. debuild -uc -us
21. One directory below, you'll find your packages, e.g.:
22. $ cd ..
23. $ ls -al *gflags*.deb
24. -rw-r--r-- 1 gert gert 108450 Jun 24 18:59 libgflags2_2.0-1_amd64.deb
25. -rw-r--r-- 1 gert gert 147590 Jun 24 18:59 libgflags-dev_2.0-1_amd64.deb
26. -rw-r--r-- 1 gert gert 14778 Jun 24 18:59 libgflags-doc_2.0-1_all.deb
27. Install them:
28. sudo dpkg -i *gflags*.deb
In case this fails because of binary dependencies not satisfied, run
sudo apt-get install -f
Done!
Original Source: http://askubuntu.com/questions/312173/installing-gflags-12-04
'Dababase' 카테고리의 다른 글
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
---|---|
port forwarding (0) | 2016.02.02 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
RocksDB Installation on Ubuntu 12.04 (0) | 2015.07.17 |
RocksDB Installation on Ubuntu 12.04
RocksDB Installation on Ubuntu 12.04
- Platform Setup
1. Gcc 4.7 to support C++10
i. Check gcc version, if it is less than 4.7,
1. sudo dpkg -l | grep gcc | awk '{print $2}'
ii. Install gcc and g++ 4.7
1. sudo add-apt-repository ppa:ubuntu-toolchain-r/test
2. sudo apt-get update
3. sudo apt-get install gcc-4.7 g++-4.7
iii. alternative setup
1. $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40
2. $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
3. $ sudo update-alternatives --display gcc
4. If the gcc 4.7 is not setup yet, update it manually
a. $sudo update-alternatives –config gcc
b. Choose gcc 4.7
5. $ gcc ---version
iv. G++-4.7, repeat the process (iii)
v. Install zlib
1. $sudo apt-get install zlib1g-dev
vi. Install snappy
1. $sudo apt-get install libsnappy-dev
2. [may not be required] $sudo apt-get install snappy
vii. Install bzip2
1. $sudo apt-get install libbz2-dev
viii. Install gflags
1. For static library, and all our tools and unit tests
2. Refer the Installation Guide, gflags on Ubuntu 12.04
- Installation RocksDB
1. Download RocksDB
a. wget https://github.com/facebook/rocksdb/archive/master.zip
2. Compile
a. make static_lib --> make (it compiles db_bench and other utilities for test)
b. make check
c. make all
'Dababase' 카테고리의 다른 글
postgresql 9.3 on SpecVirt 작업 일지 (0) | 2016.02.05 |
---|---|
port forwarding (0) | 2016.02.02 |
examplie: test application for rocksdb compile (0) | 2015.07.18 |
Rocks DB 설치 on Ubuntu 12.04 LTS (0) | 2015.07.18 |
Installing gflags 12.04 (0) | 2015.07.17 |