Launched Ubuntu VM via EC2 on AWS and installed icecast2 - linux

I am new to Linux environments and trying my hand on Ubuntu on AWS cloud. I have an Ubuntu AMI running on Amazon cloud. I have successfully installed Icecast2 on my ubuntu VM and configured all required passwords initially. I am not sure what should I edit for
< location > Earth < / location >
< admin > icemaster#PUBLIC IP FOR MY UBUNTU EC2 INSTANCE:8000 < / admin >
I have made sure to make the ubuntu server open for SSH and HTTP protocols, both inbound and outbound.
Kindly help me if I am missing something. Much Appreciated.

I'd recommend a look at The Fine Manual:
http://icecast.org/docs/icecast-2.4.1/config-file.html#misc
Also make sure you have edited /etc/default/icecast2.

Related

Setting up SonarQube on AWS using EC2

Trying to setup SonarQube on EC2 using what should be basic install settings.
List item
Setup a standard EC2 AWS LINUX Ami attached to M4 large
SSH into EC2 instance
Install JAVA
Set to use JAVA8
wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.4.zip
unzip into the /etc dir
run sudo ./sonar.sh start
Instance starts
But when I try to go to the app it never comes up when I try either the IPv4 Public IP 187.187.87.87:9000 (ex not real IP) or try ec2-134-73-134-114.compute-1.amazonaws.com:9000 (not real IP either just for example)
Perhaps it is my ignorance or me not configuring something correctly as it pertains to the initial EC2 setup.
If anyone has any ideas, please let me know.
Issue was that SonarQube default port is 9000. and by default this port is not open in the security group if you dont apply the default security group in which all the ports are open(which is Not recommended).
As suggested in comment #Issac, opened the 9000 port to allow incoming request to SonarQube, in AWS security group setting of instance. Which solved the issue.
need to have an db and give permissions to the db insonar.properties file in sonar nd need to open firewalls

How to access ui of xampp running on linux command line

I have installed xampp on linux (command line version with no gui).
I am using Amazon Linux AMI.
The installation is successful and i got xampp up and running.
$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 5.6.14-4...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
However i am not able to access the xampp ui from browser.
I am accessing http://(public ip of the linux ami)
Is there anything else required to access the ui.
I did some R&D around the problem and found out that the security group (linked to the amazon instance) did not allow http traffic.
Edited security group to allow http traffic and issue was resolved.
XAMPP UI can be accessed now using the public DNS or public IP.

connecting to multiple instances of EC2 with ssh

I just started out with Amazon web services and was able to launch an instance. A friend showed me a sample tutorial of how to connect to AWS with ssh. Pretty neat. I downloaded the key and edited /.ssh/config file.
Sample of the config file
Host *
ServerAliveInterval 300
Host <name desired to connect>
HostName <domain name>
port 22
User ubuntu
IdentityFile /pathname/keyfile
My question is what if i have 2 instances and now i want to ssh to the new instance launched. How will i edit the config file. I'm stuck and also new to Linux(been learning Linux yesterday and it's pretty cool and powerful). Thanks for the help.
You can ssh to any ec2 instance by running this on terminal:
ssh -i path_to_pem_file ubuntu#<HostIP_or_NAME>
eg.
ssh -i /temp/root1.pem ubuntu#54.23.122.34

Web2Py on AWS EC2 Linux

I have an instance running Linux at Amazon AWS EC2 after carefully following the instructions provided by Amazon here: Setting Up to Host a Web App on AWS.
I have set-up the security groups as mentioned in the documentation provided by Amazon.
The default security group has all traffic, all protocols, on all ports open.
In addition to the above security rule, I have setup SSH on port 22 and then, using CyberDuck (a great FTP app), I have uploaded the Web2Py source code into a folder named web2py at AWS.
After successfully FTP the source code into this web2py folder, I have SSH'ed into the AWS machine using the Terminal (on Mac locally) having the my-keys-file.pem on hand:
ssh -i my-keys-file.pem ec2-user#ec2-xx-xx-xx-xx.compute-1.amazonaws.com
(where the xx are the numbers in the Public DNS as they appear on my instance on EC2 page)
Then I have checked whether my AWS instance has python installed and it does have it.
Thus, I have proceeded to install Web2Py.
python2.6 web2py.py
password = pwd
it warns that GUI not available since Tlk library is not installed, but Massimo says here (http://comments.gmane.org/gmane.comp.python.web2py/129181) that it's not critical.
Running the Web2Py ....
If I try:
python web2py.py -a pwd -i 0.0.0.0 -p 80
It says:
there is an error with the Rocket Server with that specific port (used by another process that is not willing to share...)
If I try:
python web2py.py -a pwd
it says nothing (which begs the question: is web2py running ?) and when I try to access the web2py server
http://ec2-xx-xx-xx-xxx.compute-1.amazonaws.com/
or
https://ec2-xx-xx-xx-xxx.compute-1.amazonaws.com/admin
in both cases it says page is not available since it takes too long to access it (nothing about security cause).
If I try:
python web2py.py -a pwd -i 0.0.0.0 -p 8000
again - it says nothing (is web2py running ?)
trying to access the Web2Py server at
http://ec2-xx-xx-xx-xxx.compute-1.amazonaws.com/
or
https://ec2-xx-xx-xx-xxx.compute-1.amazonaws.com/admin
in both cases it says page is not available, same as above.
I have tried to use the IP address instead, but it is immediately translated to the amazon format of ec2-xx-xx-xx-xxx.etc...
I have tried to access web2py by explicitly mentioning the port (8000) in the address - still it doesn't work while giving no reason except page is not available
My questions:
Is there any DETAILED recipe on how to install AND run Web2Py on AWS EC2 ?
Is the web2py server running ? How can I know if it is running ? If it is not - what am I doing incorrectly ?
If the web2py server is running how can I access it ?
Any help would be much appreciated.
Thanks
I have deployed my Web2py to an EC2 instance running Ubuntu, but I guess you can adapt the same approach to your system.
The simplest way to deploy Web2py is following the 'One step production deployment' script introduced in the official Web2py book.
wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
chmod +x setup-web2py-ubuntu.sh
sudo ./setup-web2py-ubuntu.sh
Running this will install and configure everything you need.
When finished, simply type your IP or domain name into a web browser and you will see the default web2py website.

Create a Debian imaging server for windows 7

Issue
I have been tasked with creating a Debian imaging server for our company. Unfortunately my knowledge with, both Linux and servers is very limited, (this is part of an up-skilling program).
Steps
Currently I have tried to follow the below tutorials on creating a PXEBoot server and a ProxyDHCP:
ProxyDHCP:help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
PXE Boot : https://help.ubuntu.com/community/PXEInstallMultiDistro
PXE Boot : https://wiki.debian.org/PXEBootInstall#Installing_Debian_using_network_booting
Originally I had tried to used a configured DHCP server on the Linux server which I had gotten working, however my manager advised that they would prefer the DHCP to come from the router instead.
So I have used apt-get to install below applications and followed sources to get the configs correctly. However it still doesn't seem 100% correct (see latest)
Task
So currently the task I have been set is per below:
Has to be in Debian
Has to be console based server only (no gui interface)
DHCP has to come from router
Server should deploy windows images
Images taken need to bee compacted (all blank space removed)
I can only find Ubuntu guides for these PXEBoot and ProxyDHCP creations, and the problem with this is that the locations they refer to do not always exist in Debian.
So I am stuck with half the options available to me, and because I have a limited knowledge here, I cannot identify where I am going wrong, or if these locations are elsewhere.
Can anyone provide me with a tutorial, or a set of command lines to help?
I would really appreciate this.
Using
I am currently using (on Debian console):
TFTPD-HPA
DNSMASQ
iPXE
SysLinux
Latest
I have been able to get the dnsmaq and tftp-hpa service "working". This is to say when I run them they start. However I still don't seem to be able to boot into an installation with this up and running.
I have another thread on forums.debian.net/viewtopic.php?f=5&t=118315
I have been able to fix my issue using 3 applications and a lot of research.
The applications I have used are; DNSMASQ, TFTPD-HPA and SAMBA
These applications have been configured as per below:
TFTPD-HPA
`apt-get install tftpd-hpa
nano /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot/"
TFTP_ADDRESS="<server address>:69"
TFTP_OPTIONS="-4 –secure --create"
RUN_DAEMON=”yes”
OPTIONS="-l -s /tftpboot"
mk dir /tftpboot
mk dir /tftpboot/pxelinux.cfg`
DNSMASQ
apt-get install dnsmasq
nano /etc/dnsmasq.conf
Interface=eth0
port=0
log-dhcp
log-queries
log-facility=/var/log/dnsmasq.log
tftp-root=/tftpboot
dhcp-boot=pxelinux.0,<server name>,<server address>
dhcp-range=192.168.1.10,proxy,255.255.255.0
dhcp-no-override
pxe-prompt="Press F8 for boot menu", 2
pxe-service=X86PC, "comment", pxelinux
SAMBA
apt-get install samba
nano /etc/samba/smb.conf
[global]
Workgroup = workgroup
Server role = standalone server
Dns proxy = no
Wins support = yes
Passwd program = /usr/bin/passwd %u
Passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *Password\supdated\ssuccessfully*
Syslog = 0
Log file = /var/log/smb.log.%m
Max log size = 1000
Map to guest = bad user
Usershare allow guests = yes
Security = user
[images]
Comment = Network SAMBA share
Path = tftpboot
Create mask = 0775
Guest ok = yes
Browseable = yes
Read only = no
Writeable = yes

Resources