Commit e648aef7 by Carsten Brandt

sphinx setup without sudo

parent 9174358f
...@@ -68,7 +68,7 @@ source yii2_test_item_delta_src : yii2_test_item_src ...@@ -68,7 +68,7 @@ source yii2_test_item_delta_src : yii2_test_item_src
index yii2_test_article_index index yii2_test_article_index
{ {
source = yii2_test_article_src source = yii2_test_article_src
path = /var/lib/sphinx/yii2_test_article path = SPHINX_BASE_DIR/yii2_test_article
docinfo = extern docinfo = extern
charset_type = sbcs charset_type = sbcs
} }
...@@ -77,7 +77,7 @@ index yii2_test_article_index ...@@ -77,7 +77,7 @@ index yii2_test_article_index
index yii2_test_item_index index yii2_test_item_index
{ {
source = yii2_test_item_src source = yii2_test_item_src
path = /var/lib/sphinx/yii2_test_item path = SPHINX_BASE_DIR/yii2_test_item
docinfo = extern docinfo = extern
charset_type = sbcs charset_type = sbcs
} }
...@@ -86,14 +86,14 @@ index yii2_test_item_index ...@@ -86,14 +86,14 @@ index yii2_test_item_index
index yii2_test_item_delta_index : yii2_test_item_index index yii2_test_item_delta_index : yii2_test_item_index
{ {
source = yii2_test_item_delta_src 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 index yii2_test_rt_index
{ {
type = rt type = rt
path = /var/lib/sphinx/yii2_test_rt path = SPHINX_BASE_DIR/yii2_test_rt
rt_field = title rt_field = title
rt_field = content rt_field = content
rt_attr_uint = type_id rt_attr_uint = type_id
...@@ -118,15 +118,15 @@ searchd ...@@ -118,15 +118,15 @@ searchd
{ {
listen = 127.0.0.1:9312 listen = 127.0.0.1:9312
listen = 9306:mysql41 listen = 9306:mysql41
log = /var/log/sphinx/searchd.log log = SPHINX_BASE_DIR/searchd.log
query_log = /var/log/sphinx/query.log query_log = SPHINX_BASE_DIR/query.log
read_timeout = 5 read_timeout = 5
max_children = 30 max_children = 30
pid_file = /var/run/sphinx/searchd.pid pid_file = SPHINX_BASE_DIR/searchd.pid
max_matches = 1000 max_matches = 1000
seamless_rotate = 1 seamless_rotate = 1
preopen_indexes = 1 preopen_indexes = 1
unlink_old = 1 unlink_old = 1
workers = threads # for RT to work workers = threads # for RT to work
binlog_path = /var/lib/sphinx binlog_path = SPHINX_BASE_DIR
} }
...@@ -19,7 +19,7 @@ else ...@@ -19,7 +19,7 @@ else
fi fi
cd $CUBRID_VERSION cd $CUBRID_VERSION
tar xzvf ../../$CUBRID_VERSION-linux.x86_64.tar.gz tar xzf ../../$CUBRID_VERSION-linux.x86_64.tar.gz
cd ../.. cd ../..
...@@ -64,7 +64,7 @@ install_pdo_cubrid() { ...@@ -64,7 +64,7 @@ install_pdo_cubrid() {
wget "http://pecl.php.net/get/PDO_CUBRID-$CUBRID_PDO_VERSION.tgz" wget "http://pecl.php.net/get/PDO_CUBRID-$CUBRID_PDO_VERSION.tgz"
fi fi
tar -zxf "PDO_CUBRID-$CUBRID_PDO_VERSION.tgz" 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 echo "extension=pdo_cubrid.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
......
...@@ -5,6 +5,10 @@ CWD=$(dirname "$SCRIPT") ...@@ -5,6 +5,10 @@ CWD=$(dirname "$SCRIPT")
# work around https://github.com/travis-ci/travis-ci/issues/2728 # work around https://github.com/travis-ci/travis-ci/issues/2728
PATH=$PATH:/usr/local/sphinx-2.1.9/bin 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 # log files
#sudo mkdir /var/log/sphinx #sudo mkdir /var/log/sphinx
#sudo touch /var/log/sphinx/searchd.log #sudo touch /var/log/sphinx/searchd.log
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment