local apt repo update own software - apt

I've created a local apt repo on apache2 using this structure:
mkdir -p /var/www/html/repo/pool/main/
cp /home/xxx.deb /var/www/html/repo/pool/main/.
mkdir -p /var/www/html/repo/dists/focal/main/binary-amd64
cd /var/www/html/repo
dpkg-scanpackages --multiversion --arch amd64 pool/ > dists/focal/main/binary-amd64/Packages
cat dists/focal/main/binary-amd64/Packages | gzip -9 > dists/focal/main/binary-amd64/Packages.gz
Made a release, signed the release in /var/www/html/repo/dists/focal
Added rule in /etc/apt/sources.list.d/gmss.list
After all this I can install my debs on this repository, however when I add a new version of my software in the pool and make a new package file and I do:
apt update
apt install softwarepkg
It says that the latest version is already installed.
How can I get this to update to the latest version op my software?

You may want to try running apt clean to clear the cache, which may have the older version of your package.

Related

Completely remove old version of elasticsearch and install newer version

There're a lot of articles on the internet regarding new installation of elasticsearch. But I already have 1.x version of elasticsearch running. I want to remove this first and install a newer version. How do I do this? I had used something like this to install the old one:
sudo -s // use as admin
#public key
wget -O - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add -
# edit /etc/apt/sources.list and add
deb http://packages.elasticsearch.org/elasticsearch/1.0/debian stable main
deb http://packages.elasticsearch.org/logstash/1.3/debian stable main
sudo apt-get update
sudo apt-get install elasticsearch
Why don't you simply extract the gzip version of elasticsearch and extract its contents. That's the recommended way. This way you can also keep different versions if you need.

Janus WebRTC installation issue

I am installing Janus WebRTC Gateway in a Ubuntu Machine (14.04 64 bit). I followed the instructions as in the following link:
However, I get the following error when trying to execute janus:
https://github.com/meetecho/janus-gateway (readme.md file)
[FATAL] [janus.c:main:3670] No Janus API transport is available...
enable at least one and restart Janus
Anyone has any idea what the issue might be? I will only use the REST API without WebStockets or RabbitMQ.
I successfully installed Janus on Ubuntu 14 according to the following steps:
sudo apt-get install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libwebsockets-dev pkg-config gengetopt automake libtool doxygen graphviz git cmake
sudo apt-get install libavformat-dev
mkdir -p ~/build
cd ~/build
git clone git://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --disable-data-channels --disable-websockets --disable-rabbitmq --disable-docs --prefix=/opt/janus LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="-I/usr/local/include"
make && sudo make install
sudo make configs
Running it by:
cd /opt/janus/bin/
./janus -F /opt/janus/etc/janus/
I had this issue before, I had write a script to install everything just run this
wget https://gist.githubusercontent.com/johnmelodyme/966f474a99b6dd0cf4e7ac19ba4258da/raw/0f1779499c62eeee3e2a577ef641e94e57b71154/janus.sh && sh janus.sh
Hope This Help Much, I believe there are certain dependencies needs to be installation but you missed it. In https://github.com/meetecho/janus-gateway it stated the Dependencies needed, have to be installed without error.
It is because libmicrohttpd version is lower than requirement, Download and install libmicrohttpd manually (dont use yum or apt-get).

Linphone compiling problems on osx

I'm trying to compile linphone on mountain lion. I have downloaded the sources and followed all the instructions in the README.macos file. The first time, when I got to '$ port install ige-mac-integration' an error occurred. It said gtk2 had to be installed with x11, however, the instructions said to install it with quartz and no_x11. I tried installing gtk2 again, this time with x11, but when I get to the compiling process it tells me quartz is needed. I can't install both, because the gtk2 installation will complain about it, and it seems I need both to complete the entire process of installing and compiling linphone.
I have tried these steps with the downloadable sources, as well as the git sources, both gave me the same problems. Linphone does not have a forum, so I couldn't ask it on their site.
I just need to get the sources and start using them, so any recommendations on how to open the linphone source, edit it, and compile/run it would be very welcome. The ideal situation would be where I can just open an xcode project file.
This is the readme file:
**********************************
* Compiling linphone on macos X *
**********************************
You need:
- Xcode (download from apple or using appstore application)
- Macports: http://www.macports.org/
Download and install macports using its user friendly installer.
- Install build time dependencies
$ port install automake autoconf libtool intltool
- Install some linphone dependencies with macports
$ port install speex
$ port install libosip2 # WARNING: currently outdated in macport
$ port install libeXosip2 #WARNING: currently outdated in macport
$ port install ffmpeg-devel
$ port install libvpx
- Install srtp (optional) for call encryption
$ port install srtp
If that fails, get from source:
$ git clone git://git.linphone.org/srtp.git
$ cd srtp && autoconf && ./configure --prefix=/opt/local && make libsrtp.a
$ sudo make install
- Install zrtpcpp (optional), for unbreakable call encryption
$ port install cmake
$ git clone git://git.linphone.org/zrtpcpp.git
$ cd zrtpcpp && cmake -Denable_ccrtp=false . && make
$ sudo make install
- Install gtk. It is recommended to use the quartz backend for better integration.
$ port install gtk2 +quartz +no_x11
$ port install hicolor-icon-theme
- Compile and install the tunnelsu
If you got the source code from git, run ./autogen.sh first
Then or otherwise, do:
$ ./configure --prefix=/opt/local && make && sudo make install
- Compile linphone
If you got the source code from git, run ./autogen.sh first.
Then or otherwise, do:
$ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp && make
Install to /opt/local
$ sudo make install
Done.
If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
$ git clone https://github.com/jralls/gtk-mac-bundler.git
$ cd gtk-mac-bundler && make install
$ export PATH=$PATH:~/.local/bin
#make this dummy charset.alias file for the bundler to be happy:
$ sudo touch touch /opt/local/lib/charset.alias
Then run, inside linphone source tree:
1. Run configure as told before but with "--enable-relativeprefix" appended.
$ make
$ make bundle
The resulting bundle is located in linphone build directory, together with a zipped version.
For a better appearance, you can install the gtk-quartz-engine (a gtk theme) that make gtk application more similar to other mac applications (but not perfect).
$ git clone https://github.com/jralls/gtk-quartz-engine.git
$ cd gtk-quartz-engine
$ autoreconf -i
$ ./configure --prefix=/opt/local && make
$ sudo make install
Generate a new bundle to have it included.
Below is the details to configure the dependencies and build linphone.
==============================================================
Step: 1:- Dependency configuration:
I just followed the instruction which is available in "README.macos" upto sqlite3 configuration. I had some problem with dependancies configuration.
Because of macport version, srtp configuration is failed. So I have downloaded "MacPorts-2.1.3-10.8-MountainLion.pkg" and installed manually.
Because of GTK version, libsoup is failed. So I have downloaded "GTK_2.18.5-X11.pkg" and installed manually.
After the manual installation, I have followed "README.macos" again for reconfiguration.
NOTE: Sometime terminal won't recognize "wget".
--> Solution: just execute below command.
echo 'alias wget="curl -O"' >> ~/.bash_profile
Step: 2:- Compile and Install:
I got some problem related to intltool while compiling.
Solution: just I set the path by executing below commands
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
Now it is successfully compiled and installed.
Step: 3:- Creating bundle to run the app:
Just I followed below commands to make the build.
If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
$ git clone https://github.com/jralls/gtk-mac-bundler.git
$ cd gtk-mac-bundler && make install
$ export PATH=$PATH:~/.local/bin
#make this dummy charset.alias file for the bundler to be happy:
$ sudo touch touch /opt/local/lib/charset.alias
Then run, inside linphone source tree:
1. Run configure as told before but with "--enable-relativeprefix" appended.
$ make
$ make bundle
It will create "linphone.app" file in current linphone directory. It will support only for "Mountain Lion".
Step: 4:- Support for lower version: (e.g.: Lion, Snow Leopard...)
We have to configure "libiconv hack" to supporting for lower version
I think it will help you.
I wrote an answer here. It's a bit long but I sincerely hope it is clear enough and will help you.
It contains the build settings and other libs you need to include.
Cool stuff I didn't need to run the make :)
Best,

Compiling kernel in Ubuntu on EC2 (no errors, but no image and unchanged after restart)

I need to update the kernel timer on my Ubuntu Lucid (10.04) server on EC2 (with EBS) from 250HZ to 1000HZ, to improve voip call quality.
From what I've read, the way to do that is to download the kernel source code, configure it, then install it.
I've found several decent tutorials that are fairly specific to my setup, the best of which are:
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
https://help.ubuntu.com/community/Kernel/Compile
http://blog.avirtualhome.com/2010/05/05/how-to-compile-a-ubuntu-lucid-kernel/
http://crashcourse.ca/introduction-linux-kernel-programming/intermission-building-new-ubuntu-1004-kernel-free-lesson
That's led to me to the following sets of commands, which all run nicely, making the .deb files with no obvious errors. But then when I restart the server the timer frequency hasn't been updated.
sudo apt-get build-dep linux-image-$(uname -r)
sudo apt-get build-dep linux
sudo apt-get install fakeroot build-essential
sudo apt-get install crash kexec-tools makedumpfile kernel-wedge
sudo apt-get install libncurses5 libncurses5-dev
sudo apt-get install libelf-dev asciidoc binutils-dev kernel-package
cd /usr/src
sudo apt-get source linux-image-$(uname -r)
cd linux-*
sudo make menuconfig
# Processor type and features -> Timer frequency -> change to 1000HZ -> Exit -> Exit -> Yes (Save)
fakeroot debian/rules clean
fakeroot debian/rules binary-headers
fakeroot debian/rules binary-indep #This does the headers, docs, and source
#check deb 2-3 files were created
cd ..
ls *.deb
sudo dpkg -i linux-*.deb
#reboot
EDIT
Spent some time with jjohansen on irc #ubuntu-kernel, and was able to find my mistake with his help - looks like I should have done the configuration step in between the clean and build. Also, he recommended to always use the source from git rather than the package, so these are the new commands to do in the middle of what I had above:
cd /usr/src
# This is 700mb so it takes a while to download and set up
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
cd ubuntu*
git checkout --track -b ec2 origin/ec2
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
fakeroot debian/rules binary
#Takes about 40min
John Johansen (kernel hacker at Canonical) believes that you should be able to build and run your own kernel on an EC2 instance with Ubuntu.
See jjohansen's notes in this 1000Hz EC2 kernel request I had submitted back in 2009:
https://bugs.launchpad.net/ubuntu-on-ec2/+bug/365233
You will want to make sure that you are starting with a recent Ubuntu AMI that uses pvgrub.
Thanks to Eric Hammond for the heads up,
Which kernel you are going to need will depend on which version of Ubuntu you are using. For Lucid - Maverick you will need to use the -ec2 kernel source. The support needed was moved into the regular kernel tree for natty and oneric.
So you will need to do
sudo apt-get source linux-ec2
or
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
cd into the source directory
fakeroot debian/rules clean
fakeroot debian/rules binary
For Lucid you will also have to make sure you have a done an update or are using a current image, as support for pv-grub was add after Lucid was release.
Referencing Redzarf's terminal commands including his edit plus a couple small necessary additions, heres what worked for me on a Amazon ec2 vanilla install of Ubuntu Server Cloud Guest 10.04 LTS (Lucid Lynx) 64x
# Make yourself root
sudo su
# Update source list:
aptitude update
# Upgrade everything:
aptitude upgrade
# Install dependencies:
apt-get build-dep linux-image-$(uname -r)
apt-get build-dep linux
apt-get install fakeroot build-essential
apt-get install crash kexec-tools makedumpfile kernel-wedge
apt-get install libncurses5 libncurses5-dev
apt-get install libelf-dev asciidoc binutils-dev kernel-package
apt-get install git-core
cd /usr/src
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
cd ubuntu*
git checkout --track -b ec2 origin/ec2
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
# Configuration window should now appear, do the following:
Select YES
# Navigate to:
Processor type and features -> Timer frequency
# Select the 1000HZ frequency
Exit
Exit
Yes (Save)
#After saving and returning to prompt it may ask you to do it again for i386, select yes and repeat!
# Recompile:
fakeroot debian/rules binary
#Check if your deb 2-3 files were created
cd ..
ls *.deb
sudo dpkg -i linux-*.deb
#reboot
reboot
#Check your new Kernel version
uname -r
#Check if Kernel HZ value change persisted:
cat /boot/config-`uname -r` | grep HZ
#If value 1000HZ=yes:
Done!;)
--===< Quick Tip >===--
If your running an "on-demand micro instance", compile time will take approximately 7hrs and cost around $0.14!
If on the other hand you want to save yourself some time and recompile in just under 12min for $0.21, you can do this:
Reserve a High-CPU Extra Large Spot Instance (20x ec2 compute units, 7GB ram)
Recompile your kernel with aforementioned commands (12min)
Once recompile completes take a snapshot of the spot instance's ebs volume
Wait for Snapshot to complete (few minutes)
Terminate the spot instance
Create new volume from the snapshot (nichname: Volume X) also take note of the volume ID!
Go to Instances > Create your New EBS Instance
This will be the New instance your Asterisk server will be running on
It must be from the same Base AMI, and same Zone as Volume X)
-The New Instance will now be created along with a corresponding EBS Volume
Stop the New instance
Go to Volumes > Detach the New instance's corresponding EBS volume
After it's detached, delete that volume
Select Volume X > Attach to New EBS Instance (Device ID Must be: /dev/sda1)
Go to Instances > Start your New Instance
Re-associate your Elastic IP if you had one.
Check if everything works
If everything checks out, create another snapshot for backup!
Done! ;)
Big shout out and thanks to Redzarf, Eric Hammond, and John Johansen!
Your second best guess is correct. Amazon's way of booting Linux kernels is special to their domain, and it is indeed as you mentioned - based on a special version of grub. They have published resources on the matter, please read Enabling Your Own Linux Kernels.

pointing to a different yum repository

I am not sure if this is possible or if there's any easier way but I am trying to install a software package but its not available when I search for it within Yum. I read their documentation and they seem to have a fedora package which I think amazon's ec2 linux image is based on(or cent os).
If I just change my repository to point to fedora or download the rpm, would that work? Or would that break something?
what is this application?
what you can do:
you have rpm file
$ wget [link to rpm file]
$ su -c 'yum --nogpgcheck localinstall [path to my rpm]
rpm is in testing
$ su -c 'yum install --enablerepo=updates-testing [application name]
You have source application
$ read README file and follow indication

Resources