How to install Apache Solr on Mac OS? - solr

I need to create an information retrieval system using Solr.Please assist how to do that on Mac computer.

Some quick notes on how to install solr on a Mac.
download openjdk. I downloaded openjdk-14.0.1_osx-x64_bin.tar
set the PATH environment variable to include
“your_path/jdk-14.0.1.jdk/Contents/Home/bin”
download ant (to compile solr). apache-ant-1.9.15-bin.tar.bz2
add to the PATH again. “your_path/apache-ant-1.9.15/bin”
from solr README.md, “ant compile”
from solr README.md, “ant server”
chmod +x solr* from the solr/bin directory
bin/solr start
test http://localhost:8983/solr/

Related

Can't use mongo shell on Windows and interact with MongoDB from command line [duplicate]

I installed MongoDB community Server from this link. But when I look into C:\Program Files\MongoDB\Server\6.0\bin
, I am not able to locate mongo.exe file. I am able to see mongod.exe and mongos.exe.
Can someone help. Thank you.
legacy mongo shell (mongo) no longer ships with server binaries (for servers >= 6.0). You can download a new shell version (mongosh) from here
Answer from dododo worked for me.
Download Mongo Shell - mongosh from MongoDB Download Center
Extract the contents of the bin from the downloaded zip file to the bin file of your MongoDB folder and run mongosh instead of mongo.
To run the Mongo Shell , Download msi package from the MongoDB Community Download - https://www.mongodb.com/try/download/community
The version 6.0 do not ships with server binaries so mongo.exe file wouldn't be shown. So instead download mongo shell - https://www.mongodb.com/try/download/shell
After downloading unzip the bin directory in your Original bin directory
(You would also need to create a new directory in C: drive named data/db)
Now open the bin directory from Mongodb folder, and run mongod.exe
After that keeping Mongod.exe running in background open mongosh.exe ,
Your mongo Shell will be started.
After version 6.0.0 mongo.exe does not get installed to your bin folder so you have to manually install the new MongoDB shell which is called mongosh then you have to add its path to your system variables and then run mongosh --version to see if it got installed. Afterwards if you want to create your own databases and preform operations run "mongosh" in your terminal to connect to a MongoDB instance running on your localhost with default port 27017.
Read the mongoDB documentation for more information:
install mongosh:
https://www.mongodb.com/docs/mongodb-shell/install/
The mongosh shell vs the old mongo shell:
https://www.mongodb.com/docs/mongodb-shell/
Connect to a Deployment:
https://www.mongodb.com/docs/mongodb-shell/connect/
It should be noted, that in MongoDB version 6.0 there are two items:
The legacy mongo shell is removed from MongoDB 6.0
The MongoDB Shell (mongosh) is not installed with MongoDB Server. You need to follow the mongosh installation instructions to download and install mongosh separately. This was already announced in MongoDB version 5.0
The legacy mongo shell does not exist anymore on MongoDB version 6.0. If you desire the old mongo.exe, then you can install if from an earlier MongoDB version.
You also need to add a path variable of the bin folder where mongosh application is present (after downloading from the below link:
https://www.mongodb.com/try/download/shell ).
Then you can use mongosh command from anywhere using CMD:
STEPS TO FOLLOW AFTER DOWNLOADING SHELL FROM https://www.mongodb.com/try/download/shell
Include both your mongosh shell and mongod in environment variables.
go to your c drive and create db folder inside data folder
then run your mongosh and mongod in two different cmd windows
separately
..first run mongod
..then run mongosh
if you have check-marked run as a service at the time of download
then next time you are not required to start mongosh , it will
automatically get started.

How to install MongoDB version 6.0 into your windows 11 laptop? [duplicate]

I installed MongoDB community Server from this link. But when I look into C:\Program Files\MongoDB\Server\6.0\bin
, I am not able to locate mongo.exe file. I am able to see mongod.exe and mongos.exe.
Can someone help. Thank you.
legacy mongo shell (mongo) no longer ships with server binaries (for servers >= 6.0). You can download a new shell version (mongosh) from here
Answer from dododo worked for me.
Download Mongo Shell - mongosh from MongoDB Download Center
Extract the contents of the bin from the downloaded zip file to the bin file of your MongoDB folder and run mongosh instead of mongo.
To run the Mongo Shell , Download msi package from the MongoDB Community Download - https://www.mongodb.com/try/download/community
The version 6.0 do not ships with server binaries so mongo.exe file wouldn't be shown. So instead download mongo shell - https://www.mongodb.com/try/download/shell
After downloading unzip the bin directory in your Original bin directory
(You would also need to create a new directory in C: drive named data/db)
Now open the bin directory from Mongodb folder, and run mongod.exe
After that keeping Mongod.exe running in background open mongosh.exe ,
Your mongo Shell will be started.
After version 6.0.0 mongo.exe does not get installed to your bin folder so you have to manually install the new MongoDB shell which is called mongosh then you have to add its path to your system variables and then run mongosh --version to see if it got installed. Afterwards if you want to create your own databases and preform operations run "mongosh" in your terminal to connect to a MongoDB instance running on your localhost with default port 27017.
Read the mongoDB documentation for more information:
install mongosh:
https://www.mongodb.com/docs/mongodb-shell/install/
The mongosh shell vs the old mongo shell:
https://www.mongodb.com/docs/mongodb-shell/
Connect to a Deployment:
https://www.mongodb.com/docs/mongodb-shell/connect/
It should be noted, that in MongoDB version 6.0 there are two items:
The legacy mongo shell is removed from MongoDB 6.0
The MongoDB Shell (mongosh) is not installed with MongoDB Server. You need to follow the mongosh installation instructions to download and install mongosh separately. This was already announced in MongoDB version 5.0
The legacy mongo shell does not exist anymore on MongoDB version 6.0. If you desire the old mongo.exe, then you can install if from an earlier MongoDB version.
You also need to add a path variable of the bin folder where mongosh application is present (after downloading from the below link:
https://www.mongodb.com/try/download/shell ).
Then you can use mongosh command from anywhere using CMD:
STEPS TO FOLLOW AFTER DOWNLOADING SHELL FROM https://www.mongodb.com/try/download/shell
Include both your mongosh shell and mongod in environment variables.
go to your c drive and create db folder inside data folder
then run your mongosh and mongod in two different cmd windows
separately
..first run mongod
..then run mongosh
if you have check-marked run as a service at the time of download
then next time you are not required to start mongosh , it will
automatically get started.

Unable to create core [new_core] Caused by: null in apache solr 8.2.0 on centos 7

I installed apache solr on CentOS 7 to follow this link https://computingforgeeks.com/install-apache-solr-on-centos-fedora/
After Completing installation, solr status is
After running this command
sudo systemctl enable solr
Show below message
solr.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig solr on
I ran the command to create testcollection.
sudo su - solr -c "/opt/solr/bin/solr create -c testcollection -n data_driven_schema_configs"
After running the command, error is showing below
ERROR: Error CREATEing SolrCore 'testcollection': Unable to create core [tpcollection3] Caused by: null
Can I get any suggestion for creating collection or core successfully.
Question are
1. Why cannot enable solr on centos 7?
2. Why cannot create collection or core?
/sbin/chkconfig solr on is a command fallback to systemctl enable solr, it achieves the same task that is to enable Solr at startup. That said, there is a service installation script that should help install Solr as a service : /opt/solr/bin/install_solr_service.sh.
Ensure you have set the right permissions on Solr directories and restart Solr, also I don't think you need the sudo su part :
chown -R solr:solr /var/solr/
./solr restart
./solr create -c testcollection
Actually I solved to follow another way.
You can extract your desired directory. I made a directory /solr
mkdir /solr
Download latest version solr from latest release of Apache Solr
Extract it
tar -xvf solr-8.2.0.tgz
Add a User
useradd solr
Give permission
chown -R solr:solr solr-8.2.0
Go to your created user
su - solr
Go to Extracted solr bin file
cd solr-8.2.0/bin
Start Solr, check solr status and create solr core Or collection
./solr start
./solr status
./solr create -c testcollection -n data_driven_schema_configs
You will see your created collection or core successful message.
Created new core 'testcollection'

Cannot start HBase start_hbase.sh: command not found

Trying, in vain so far, to make Nutch + Solr work. I'm having very hard time understanding how to go about this thing with nutch and solr. I have followed all the tutorials I could find on the internet, most of them for older versions, but I still could not make any of them work. At this moment I'm follwoing this guide
I have unpacked nutch 2.2.1, sorl 4.3.1, hbase 0.90.4 to directory on my xampp local server (none of the tutorials said where I should unpack them to, so I assumed that on local server).
I'm using Cygwin on windows 7. JAVA_HOME is pointing to /cygdrive/c/PROGRA~1/java/jdk1.8.0_05
I stuck at Configure HBase step. As the tutorial dictates I have configured /hbase-0.90.4/conf/hbase-site.xml as follows:
<property>
<name>hbase.rootdir</name>
<value>file:///C:/xampp/htdocs/trynutch/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>C:/xampp/htdocs/trynutch/zookeeper</value>
</property>
As per tutorial after this I should be able to run the following command:
$ ./trynutch/hbase/bin/start_hbase.sh
When I run it in cygwin terminal, it gives an error:
DM#comp ~
$ cd C:/xampp/htdocs/trynutch/hbase-0.90.4/bin
DM#comp /cygdrive/c/xampp/htdocs/trynutch/hbase-0.90.4/bin
$ start_hbase.sh
-bash: start_hbase.sh: command not found
I'd appreciate any information.
try with following command:
./start_hbase.sh
if its not runnable then try after making it runnable, to make runnable use following command:
chmod a+x start_hbase.sh
you just try sh start-hbase.sh from the hbase bin directory.
cd C:/xampp/htdocs/trynutch/hbase-0.90.4/bin
sh start-hbase.sh

which directory to install solr for magento

i want to install solr on my server for magento. is there a specific directory i should install it in?
my java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.9) (rhel-1.36.1.11.9.el5_9-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
i went to
http://www.magentocommerce.com/knowledge-base/entry/how-to-use-the-solr-search-engine-with-magento-enterprise-edition
and it says i should enter the following code
cd empty-directory
wget http://archive.apache.org/dist/lucene/solr/3.5.0/apache-solr-3.5.0.tgz
but i don't know which directory it will install it in
later it says "For example, if Solr is installed in /etc/solr/apache-solr-3.5.0 and Magento is installed in /var/www/magento, enter:"
so i should create a directory "solr" under "/etc"?
It does not matter where you install Solr. But the /opt or /var/opt directory are probably better places to install then /etc.

Resources