Skip to content

Commit

Permalink
sphinx setup without sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe committed Aug 28, 2014
1 parent 9174358 commit e648aef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
16 changes: 8 additions & 8 deletions tests/unit/data/sphinx/sphinx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ source yii2_test_item_delta_src : yii2_test_item_src
index yii2_test_article_index
{
source = yii2_test_article_src
path = /var/lib/sphinx/yii2_test_article
path = SPHINX_BASE_DIR/yii2_test_article
docinfo = extern
charset_type = sbcs
}
Expand All @@ -77,7 +77,7 @@ index yii2_test_article_index
index yii2_test_item_index
{
source = yii2_test_item_src
path = /var/lib/sphinx/yii2_test_item
path = SPHINX_BASE_DIR/yii2_test_item
docinfo = extern
charset_type = sbcs
}
Expand All @@ -86,14 +86,14 @@ index yii2_test_item_index
index yii2_test_item_delta_index : yii2_test_item_index
{
source = yii2_test_item_delta_src
path = /var/lib/sphinx/yii2_test_item_delta
path = SPHINX_BASE_DIR/yii2_test_item_delta
}


index yii2_test_rt_index
{
type = rt
path = /var/lib/sphinx/yii2_test_rt
path = SPHINX_BASE_DIR/yii2_test_rt
rt_field = title
rt_field = content
rt_attr_uint = type_id
Expand All @@ -118,15 +118,15 @@ searchd
{
listen = 127.0.0.1:9312
listen = 9306:mysql41
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
log = SPHINX_BASE_DIR/searchd.log
query_log = SPHINX_BASE_DIR/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinx/searchd.pid
pid_file = SPHINX_BASE_DIR/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinx
binlog_path = SPHINX_BASE_DIR
}
4 changes: 2 additions & 2 deletions tests/unit/data/travis/cubrid-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else
fi

cd $CUBRID_VERSION
tar xzvf ../../$CUBRID_VERSION-linux.x86_64.tar.gz
tar xzf ../../$CUBRID_VERSION-linux.x86_64.tar.gz
cd ../..


Expand Down Expand Up @@ -64,7 +64,7 @@ install_pdo_cubrid() {
wget "http:https://pecl.php.net/get/PDO_CUBRID-$CUBRID_PDO_VERSION.tgz"
fi
tar -zxf "PDO_CUBRID-$CUBRID_PDO_VERSION.tgz"
sh -c "cd PDO_CUBRID-$CUBRID_PDO_VERSION && phpize && ./configure && make && sudo make install"
sh -c "cd PDO_CUBRID-$CUBRID_PDO_VERSION && phpize && ./configure --prefix=$CWD/cubrid/PDO_CUBRID-$CUBRID_PDO_VERSION && make && sudo make install"

echo "extension=pdo_cubrid.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

Expand Down
4 changes: 4 additions & 0 deletions tests/unit/data/travis/sphinx-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ CWD=$(dirname "$SCRIPT")
# work around https://github.com/travis-ci/travis-ci/issues/2728
PATH=$PATH:/usr/local/sphinx-2.1.9/bin

mkdir -p sphinx

sed -i s\~SPHINX_BASE_DIR~$PWD/sphinx~g $CWD/../sphinx/sphinx.conf

# log files
#sudo mkdir /var/log/sphinx
#sudo touch /var/log/sphinx/searchd.log
Expand Down

0 comments on commit e648aef

Please sign in to comment.