




















This patch adds symlinks for all executables in /usr/share/elasticsearch/bin into /usr/bin.
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -33,6 +33,13 @@ package() {
mv config/* "${pkgdir}/etc/elasticsearch/"
cp -a * "${pkgdir}/usr/share/elasticsearch"
chmod -R 755 "${pkgdir}/usr/share/elasticsearch" "${pkgdir}/etc/elasticsearch/"
+
+ install -dm755 "${pkgdir}/usr/bin"
+ for f in "${pkgdir}/usr/share/elasticsearch/bin/"*; do
+ fname=$(basename "$f")
+ ln -s "/usr/share/elasticsearch/bin/${fname}" "${pkgdir}/usr/bin/${fname}"
+ done
+
install -Dm644 "${srcdir}/elasticsearch.sysctl" "${pkgdir}/usr/lib/sysctl.d/elasticsearch.conf"
install -Dm644 ${srcdir}/elasticsearch{,-keystore}.service -t "${pkgdir}/usr/lib/systemd/system/"
install -Dm644 "${srcdir}/elasticsearch.sysusers" "${pkgdir}/usr/lib/sysusers.d/elasticsearch.conf"
No functional changes to the packaged software, only improved accessibility of bundled tools.
Please consider merging this change. Thank you!
Unfortunately, installing the latest version breaks indices created with previous versions:
fatal exception while booting Elasticsearch java.lang.IllegalStateException: cannot upgrade a node from version [8.17.4] directly to version [9.0.2], upgrade to version [8.18.0] first.
8.18.0 is not available in the AUR, so, unless you are ok with discarding your indices, you will need to manually download it from the Elasticsearch website and install it.
They probably do not have to be
Why are all config files executable?
drwxr-x--- 3 elasticsearch elasticsearch 4.0K Nov 12 22:39 . drwxr-xr-x 138 root root 12K Nov 12 22:39 .. -rwxr-xr-x 1 root root 2.7K Nov 12 22:30 elasticsearch.yml -rwxr-xr-x 1 root root 1.1K Nov 12 22:30 elasticsearch-plugins.example.yml -rwxr-xr-x 1 root root 20 Nov 12 22:40 jvm.options drwxr-xr-x 2 root root 6 Nov 12 22:30 jvm.options.d -rwxr-xr-x 1 root root 18K Nov 12 22:30 log4j2.properties -rwxr-xr-x 1 root root 197 Nov 12 22:30 roles.yml -rwxr-xr-x 1 root root 473 Nov 12 22:30 role_mapping.yml -rwxr-xr-x 1 root root 0 Nov 12 22:30 users -rwxr-xr-x 1 root root 0 Nov 12 22:30 users_roles
The package still refers a lot to /opt/elasticsearch, and makes it hard to use ...
Thanks @ipaqmaster. I've added the patch.
The below diff seems to do the trick but this package has other problems. Everything keeps referring to /opt/elasticsearch including /opt/elasticsearch/bin/elasticsearch-keystore create but the service itself runs pointing to /etc/elasticsearch. May be a good idea for this package to take some of the config from https://aur.archlinux.org/packages/elasticsearch to help streamline the installation.
diff --git a/PKGBUILD b/PKGBUILD
index 38609e9..043b475 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,6 +26,9 @@ sha256sums=(
package() {
mkdir -p "${pkgdir}/opt"
cp -R "${srcdir}/elasticsearch-${pkgver}" "${pkgdir}/opt/elasticsearch"
+ mkdir -p "${pkgdir}/etc/elasticsearch"
+ cp -R "${srcdir}/elasticsearch-${pkgver}/config/." "${pkgdir}/etc/elasticsearch/"
+ chmod 755 -R "${pkgdir}/opt/elasticsearch/jdk/bin" "${pkgdir}/opt/elasticsearch/jdk/lib"
install -Dm0644 "elasticsearch.service" "${pkgdir}/etc/systemd/system/elasticsearch.service"
install -Dm0644 "sysctl.conf" "${pkgdir}/usr/lib/sysctl.d/elasticsearch.conf"
install -Dm0644 "users.conf" "${pkgdir}/usr/lib/sysusers.d/elasticsearch.conf"
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Here are the steps I needed to start
elasticsearch.service:Corrected Keystore Ownership: Changed the owner of
/etc/elasticsearch/elasticsearch.keystorefromroottoelasticsearchto allow the service to access it.Updated JVM Options: Modified
/etc/elasticsearch/jvm.optionsto use an absolute path for GC logs (/var/log/elasticsearch/gc.log), resolving a "Permission denied" error when the JVM attempted to write to the working directory.Configured Explicit Paths: Added
path.data: /var/lib/elasticsearchandpath.logs: /var/log/elasticsearchto/etc/elasticsearch/elasticsearch.yml. This prevents Elasticsearch from attempting to create data and log directories within its installation home (ES_HOME), where it lacked the necessary write permissions.