A Clean RHEL 6.0, Can you please tell me what am i missing.
i have done the following but seems to be some where i am going wrong cat start logstash for some reason.
i am not a newbe to linux. trying to learn as i go.
have done the following to get the install working.
Elasticsearch and Kibana start fine problem is with the Logstash.
hope some one can help me out here. really stuck to get this one working.
#Install Java
sudo su -c "yum install java-1.8.0-openjdk"
*Installed:
java-1.8.0-openjdk.x86_64 1:1.8.0.45-28.b13.el6_6
**Complete**!*
java -version
*openjdk version "1.8.0_45"*
#Install elasticsearch
sudo su -c "yum localinstall elasticsearch-5.0.1.rpm "
*Running Transaction
Installing : elasticsearch-5.0.1-1.noarch 1/1
Creating elasticsearch group... OK
Creating elasticsearch user... OK
NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using chkconfig
sudo chkconfig --add elasticsearch
You can start elasticsearch service by executing
sudo service elasticsearch start
Verifying : elasticsearch-5.0.1-1.noarch 1/1
Installed:
elasticsearch.noarch 0:5.0.1-1*
**Complete**!
sudo chkconfig --add elasticsearch
sudo service elasticsearch start
* elasticsearch Started*
#Install kibana
sudo su -c "yum localinstall kibana-5.0.1-x86_64.rpm"
*Downloading Packages:
Installed:
kibana.x86_64 0:5.0.1-1*
**Complete**!
#Install logstash
sudo su -c "yum localinstall logstash-5.0.1.rpm"
*Total size: 189 M
Installing : 1:logstash-5.0.1-1.noarch 1/1
Using provided startup.options file: /etc/logstash/startup.options
Successfully created system startup script for Logstash
Verifying : 1:logstash-5.0.1-1.noarch 1/1
Installed:
logstash.noarch 1:5.0.1-1*
**Complete!**
#Query config values
rpm -qc elasticsearch
*/etc/elasticsearch/elasticsearch.yml
/etc/elasticsearch/jvm.options
/etc/elasticsearch/log4j2.properties
/etc/elasticsearch/scripts
/etc/init.d/elasticsearch
/etc/sysconfig/elasticsearch
/usr/lib/sysctl.d/elasticsearch.conf
/usr/lib/systemd/system/elasticsearch.service*
#Query config values
rpm -qc logstash
*/etc/logstash/jvm.options
/etc/logstash/logstash.yml
/etc/logstash/startup.options*
#Query config values
rpm -qc kibana
*/etc/kibana/kibana.yml*
#Permissions
sudo su -c "chmod -R 777 /etc/kibana/"
sudo su -c "chmod -R 777 /etc/logstash/"
sudo su -c "chmod -R 777 /etc/elasticsearch/"
sudo service kibana start
*-- output kibana started*
Grrr..... This does not stat
sudo chkconfig --add logstash
sudo service logstash start
> try this ->
sudo su -c "/usr/share/logstash/bin/system-install"
* Sending all logs to /tmp/tmp.ZNfIKnQxFh Successfully created system
startup script for Logstash*
Related
I am trying to build a simple Apache/PHP server using the Amazon Linux 2 image. I have the following:
Dockerfile
FROM amazonlinux:2
RUN amazon-linux-extras install epel -y &&\
amazon-linux-extras install php7.4 -y &&\
yum update -y &&\
yum install httpd -y
COPY --chown=root:root docker/script/startup /startup
ENTRYPOINT /startup
startup
#!/usr/bin/env bash
mkdir -p /run/dbus # Added this based on other SO question
dbus-daemon --system # Added this based on other SO question
systemctl enable dbus # Added this based on other SO question
systemctl start dbus # Added this based on other SO question
systemctl status dbus # Added this based on other SO question
systemctl enable httpd
systemctl start httpd
systemctl status httpd
/bin/bash
docker-compose.yml
web:
build: .
container_name: "${APP_NAME}-app"
environment:
VIRTUAL_HOST: "${WEB_HOST}"
env_file:
- ./.env-local
working_dir: "/${APP_NAME}/app"
restart: "no"
privileged: true # Added this based on other SO question
volumes:
- "./app:/${APP_NAME}/app:ro"
- ./docker:/docker
- "./conf:/${APP_NAME}/conf:ro"
- "./vendor:/${APP_NAME}/vendor:ro"
- "./conf:/var/www/conf:ro"
- "./web:/var/www/html/"
depends_on:
- composer
I run this with the following command:
docker run -it web bash
And this is what it gives me:
Failed to get D-Bus connection: Operation not permitted
Failed to get D-Bus connection: Operation not permitted
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service, pointing to /usr/lib/systemd/system/httpd.service.
Failed to get D-Bus connection: Operation not permitted
Failed to get D-Bus connection: Operation not permitted
I don't understand why I'm getting this or how to resolve?
Suggesting to avoid systemd service units in a docker image.
Instead use cronttab script with #boot directive/selector.
In addition dbus is centrally managed by kernel and not allowed at container level.
If Docker service is up then you probably have dbus active and running.
You can add capabilities to the root user running in the container. Read more here.
As last resort try to disable SELinux in your docker image.
I was running into the same issue trying to run systemctl from within the Amazon Linux 2 docker image
Dockerfile:
FROM amazonlinux:latest
# update and install httpd 2.4.53, php 7.4.28 with php extensions
RUN yum update -y; yum clean all
RUN yum install -y httpd amazon-linux-extras
RUN amazon-linux-extras enable php7.4
RUN yum clean metadata
RUN yum install -y php php-{pear,cli,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip}
# update website files
WORKDIR /var/www/html
COPY phpinfo.php /var/www/html
RUN chown -R apache:apache /var/www
CMD ["/usr/sbin/httpd","-DFOREGROUND"]
EXPOSE 80
EXPOSE 443
$ docker build -t azl1
$ docker run -d -p 8080:80 --name azl1_web azl1
pointing a browser to the IP:8080/phpinfo.php brought up the normal phpinfo page as expected pointing to a successful php 7.4.28 installation.
I'm working on a freshly installed Ubuntu 18.04 VM.
With following steps I have installed ClickHouse.
echo "deb http://repo.yandex.ru/clickhouse/deb/stable/ main/" | sudo tee /etc/apt/sources.list.d/clickhouse.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4
sudo apt-get update
sudo apt-get install -y clickhouse-server clickhouse-client
Then I start ClickHouse like this.
sudo clickhouse-server --config-file=/etc/clickhouse-server/config.xml
And I also tried to specify the pidfile path.
sudo clickhouse-server --config-file=/etc/clickhouse-server/config.xml --pid-file=/var/run/clickhouse-server/clickhouse-server.pid
ClickHouse documentation says that the pidfile should be at /var/run/clickhouse-server/clickhouse-server.pid, but I can't find it.
Running sudo find / -name clickhouse*.pid shows that there is no pidfile for clickhouse.
Is there something I'm missing? Do I have to change the configuration?
How can I get the pid of the process?
As far as I know, ClickHouse doesn't generate a pid file. Instead, it has a status file under the root of the data directory which contains the pid value.
❯ cat data/status
PID: 23465
Started at: 2018-12-02 18:47:10
Revision: 54409
This is my first post to SO so I hope I'm asking this correctly.
I wrote a shell script to automate the installation of Passenger & Nginx (along with some other components) without any user input on a Vagrant VM running Ubuntu 14.04. It works fine using the following:
echo "****** Adding Passenger & Nginx Repo ******"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates -y
echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main" | sudo tee /etc/apt/sources.list.d/passenger.list
sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update
echo "****** Installing Passenger & Nginx ******"
sudo apt-get install nginx-extras passenger -y
Now I want to do the same thing for a Vagrant VM running CentOS 6.4. I followed the directions for CentOS found on the Phusion Passenger site but I can't seem to get it working properly. When I do the following, the output from the shell script says "No package passenger available.":
echo "****** Adding Passenger & Nginx Repo ******"
sudo yum install epel-release pygpgme curl -y
sudo 'echo "curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo"'
sudo chown root: /etc/yum.repos.d/passenger.repo
sudo chmod 600 /etc/yum.repos.d/passenger.repo
sudo yum update
echo "****** Installing Passenger & Nginx ******"
sudo yum install nginx passenger -y
Looking in the /etc/yum.repos.d directory after the script is run, there is no passenger.repo listed, so it looks like for whatever reason curl is not downloading the repo file. However, if I manually type the commands in my terminal command line after the script finishes it will pull down the repo and run.
I'm probably doing something stupid here, but I'm rather new to shell scripting and can't seem to figure out where the problem is.
Thanks for any help you can give me.
sudo 'echo "curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo"'
That is wrong and is not what the manual instructed. It should be:
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
I have the following docker file that I am attempting to use to build a Ubuntu image with mono.
FROM ubuntu:14.04
MAINTAINER John Smith <John.Smith#gmail.com>
RUN sudo apt-get update
RUN sudo /bin/bash -l -c apt-get install wget
RUN sudo /bin/bash -l -c apt-get http://download.mono-project.com/repo/xamarin.gpg
RUN sudo apt-key add xamarin.gpg
RUN sudo echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list
RUN sudo apt-get update
RUN sudo apt-get install mono-complete
When I run the following docker build command...
docker build -t="test/mono" .
It fails building and gives the following errors message:
gpg:can't open 'xamaring.gpg': No such file or directory.
2015/05/27 16:11:01 The command [/bin/bash -c sudo apt-key add xamarin.gpg] returned a non-zero code: 2
Anything obviously wrong sticking out?
It looks like you forgot to use wget instead of apt-get after you installed wget, so 'xamaring.gpg' has not been downloaded and that's why it can't be found.
You need this:
/bin/bash -l -c "wget http://download.mono-project.com/repo/xamarin.gpg"
The is an example of this in docker's website:
Dockerizing MongoDB
I am using Ubuntu server 14.04 and I tried to find how to install oracle database 11g but could not found.
Do you have any suggestion or tutorial to guide that job?
To install the Oracle 11g database on Ubuntu, first download Ubuntu with a generic kernel from Ubuntu, and then release the link.
Installing on 12.0 is explained here
Another aproach is to setup a docker container with Oracle 11g.
Since Ubuntu is not a supported operating system, in can be much easier.
Here are the steps to install Oracle 11g Enterprise Edition:
I. Firstly install docker (if not installed) :
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
(source https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
II. Download and extract database files
Download Oracle installation files
https://www.oracle.com/database/technologies/112010-linx8664soft.html
Unzip both files so you have a single "database" folder. Place this "database" folder somewhere and name it e.g "installation_folder"
III. Setup docker container:
sudo docker pull jaspeen/oracle-11g
sudo docker run --privileged --name oracle11g -p 1521:1521 -v /path/to/installation_folder:/install jaspeen/oracle-11g
IV. Use it. E.g. connect with SqlDeveloper (port 1521, SID orcl), or use sqlplus:
sudo docker ps -a
Get container [YOUR_CONTAINER_ID]
sudo docker exec -it [YOUR_CONTAINER_ID] /bin/bash
su - oracle
sqlplus / as sysdba