Mariadb installation on Amazon linux 2 - mariadb-10.4

Can someone provide steps to install mariadb on amazon linux 2?
I am pretty new in linux, so a little detail will be greatly appreciated. I have seen few links to install maria db on centOs but not sure if the same works for Amazon linux 2

If you use sudo yum install mariadb You'll get MariaDB version 5.5 which is an older version of MariaDB to get the latest version you will need to do the following.
sudo amazon-linux-extras enable lamp-mariadb10.2-php7.2=latest
sudo yum install mariadb mariadb-server
Note This will not work if you have php >= 7.3. If this is the case you must uninstall php before doing the steps above, using sudo yum erase php-common
sudo amazon-linux-extras disable lamp-mariadb10.2-php7.2=latest
Now mariadb is installed. I first tried to add centos 7 repo, but wasn't successful in getting it to install correctly.

Here you go:
Install and Start MariaDB
sudo yum update -y
sudo yum install -y mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure DB server. Select the relevant option's during command run.
sudo mysql_secure_installation
But I recommend you to install MariaDB from official repo for latest version by following instructions in this link.

Related

How to Install / Uninstall Laravel Supervisor (supervisorctl)?

I'm using Laravel homestead for dev, but my QA server is on Amazon Linux. Which is CentOS-7 based.
I have installed Supervisor on my Dev the way it is said on Laravel docs
sudo apt-get install supervisor
And now I'm stack.
It does not say how to uninstall it, and it does not say how to install it on Amazon Linux.
How to Uninstall Laravel Supervisor from Homestead?
And how to install/uninstall it on Amazon Linux?
If you installed it with apt-get then you should be able to remove it with the same package manager.
https://askubuntu.com/a/1144
E.g. with one of the following commands:
sudo apt-get remove supervisor # remove the package
sudo apt-get purge supervisor # remove the package and all configs
As for CentOS, try it with yum
yum install supervisor
yum remove supervisor
https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-yum-useful-commands.html
Similar question:
https://stackoverflow.com/a/47322239/3095084

How to install Rabbitvcs on centos7?

I'm used to tortoise SVN. But after switching to centos 7 it is very difficult to use it without GUI. Please Help me install RabbitVCS instead.
The below instructions worked for me in May 2019. YMMV.
Install EPEL Release
export http_proxy=http://{proxyhost}:{port}
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install epel-release-latest-7.noarch.rpm
Install Pre-requisites
sudo yum install meld pysvn python-dulwich python-simplejson
Fetch RabbitVCS packages
export ftp_proxy=$http_proxy
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-core-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-cli-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/python2-rabbitvcs-0.17.1-3.2.noarch.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmandevteam/CentOS_7/noarch/rabbitvcs-nautilus-0.17.1-3.2.noarch.rpm
Install RabbitVCS packages
sudo yum install rabbitvcs-core-0.17.1-3.2.noarch.rpm
sudo yum install rabbitvcs-cli-0.17.1-3.2.noarch.rpm
sudo yum install python2-rabbitvcs-0.17.1-3.2.noarch.rpm
sudo yum install rabbitvcs-nautilus-0.17.1-3.2.noarch.rpm
Reboot
sudo reboot
Open File Manager and you can see RabbitVCS Menu
If the above rpm ftp locations become stale, goto http://rpm.pbone.net and search for the following packages with Centos 7 filter -
rabbitvcs-core
rabbitvcs-cli
python2-rabbitvcs
rabbitvcs-nautilus
You may find these packages at other locations too
NOTE: You may sometimes require these pre-requisite packages too pygtk, python-configobj, python-gobject, python-gtkspell, python-svn
I had same problem when working with centos7, ended up using thunar instead of nautilus. See stackexchange and github issue.
Update:
I have successfully build rabbitVCS following steps from the github.com and then copied the nautilus extension.

CentOS 6.5 - How to upgrade HAProxy?

Can someone tell me how to upgrade HAProxy from 1.5.4 version to the latest version?
I'm using a virtual machine CentOS 6.5.
Thanks a lot ;)
HAProxy up to 1.5.4 is available for Centos via the package repository, so to get a newer version you will have to compile from source.
To upgrade to the latest version, you could follow these instructions to make your own installable package.
In summary:
sudo yum install rpmdevtools pcre-devel
rpmdev-setuptree
sudo yum groupinstall 'Development Tools'
sudo yum install openssl-devel
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.9.tar.gz
mv haproxy-1.6.9.tar.gz ~/rpmbuild/SOURCES/
git clone git://github.com/bluerail/haproxy-centos.git
cp haproxy-centos/conf/* ~/rpmbuild/SOURCES/
cp haproxy-centos/spec/* ~/rpmbuild/SPECS/
cd ~/rpmbuild/
rpmbuild -ba SPECS/haproxy.spec
The RPM should be available in ~/rpmbuild/RPMS/x86_64. You can install it like:
sudo rpm -Uvh RPMS/x86_64/haproxy-1.6-9.x86_64.rpm
Try the following yum command:
yum update haproxy
According to a quick repo search, this should update to HAProxy 1.5.4. Prove the version change with:
haproxy -v

How to install and configure LAMP on ubuntu 12.04

Could somebody please tell me how to install and configure LAMP on ubuntu 12.04 ? Is there a package similar to WAMP Server that is all-in-one ? I have tried to install from command line ,PHP,MySQL work but apache gives me this after sudo service apache2 restart
* Restarting web server apache2
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
And I think probably I did something wrong when installing !
Thank you !
From this tutorial,
Run this commands in Ubuntu Terminal-
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
For Checking-
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
If u get-
Your PHP installation is working fine.
Then you are done.
You can follow tutorial from below link to setup LAMP on your Ubuntu 12,
http://technarco.com/ubuntu-linux/how-install-lamp-ubuntu-12
Enjoy, :)
To resolve this error, you need to stop other process using this port.
In some of cases it is nginx. you can stop it
sudo /etc/init.d/nginx stop
you can install lamp server using Tasksel (Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. This program is used during the installation process, but users can also use tasksel at any time)
check this post http://wiki.workassis.com/ubuntu-install-lamp-using-tasksel/

Difficulty installing Laravel 4 and phpmyadmin on an amazon EC2 instance

So, I installed Laravel 4 on an amazon EC2 instance by following this tutorial:
Basically, my steps included:
———- Installing Apache ———-
$ sudo apt-get install apache2
———- Installing PHP ———-
$ sudo add-apt-repository ppa:ondrej/php5
$ sudo apt-get update
$ sudo apt-get install php5 libapache2-mod-php5
———- Installing PHP Mcrypt ext. ———-
$ sudo apt-get install php5-mcrypt
———- Installing MYSQL ———-
$sudo apt-get install mysql-server
———- Installing GIT ———-
$ sudo apt-get install git-core
———- Laravel GIT Repo ———-
sudo su
mkdir laravel
cd laravel/
git clone https://github.com/laravel/laravel.git
———- Installing Composer ———-
curl -sS https://getcomposer.org/installer | php
php composer.phar install
Now, I am trying to install phpmyadmin on the EC2 instance, and I am at a loss on how to go about doing it. I am a newbie
So should I install it in the laravel folder?
I have tried this:
downloading the phpmyadmin file
sudo wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.3.9.1/phpMyAdmin-3.3.9.1-all-languages.tar.gz
unzipping
tar -jxf phpMyAdmin-3.4.1-all-languages.tar.bz2
renaming
mv phpMyAdmin-3.4.1-all-languages phpmyadmin
Obviously it is not done, and I dont think I am doing this at the right folder. Please help anyone?
PhpMyAdmin has nothing to do with Laravel and isn't required at all; you can manage your MySQL database using the command line client, the MySQL workbench or PHPMyAdmin running on a remote computer (assuming it can connect to your DB running on your EC2 instance).
I would recommend not installing PHPMyAdmin as it's always a target for vulnerability scanners and can be vulnerable (plus it's one more thing to keep up to date).
If you still want to use it then extract its tar file somewhere else (not in Laravel's directory), and then change your Apache configuration to redirect something like "/pma" or "/phpmyadmin" to that directory.
If you're using Ubuntu, then you can just install PhpMyAdmin with the package manager, with this command :
sudo apt-get install phpmyadmin
Just follow the instructions, enter your MySQL root password when asked and that's it, your Apache configuration will be updated automatically, and then you can access it on http://server/phpmyadmin.
See the PhpMyAdmin article in the Ubuntu documentation.

Resources