i have private server i using SSH for access my server i have remove
VestaCP (i using http://vestacp.com/docs/#how-to-uninstall-vesta
method) i using UBUNTU 16.04 LTS
I try to clean up vestaCP with this method:
apt-get remove --purge nginx apache2 apache2-utils apache2.2-common apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf libapache2-mod-fcgid bind9 idn mysql-server mysql-common mysql-client php5-common php5-cgi php5-mysql php5-curl libapache2-mod-php5 vsftpd mc exim4 exim4-daemon-heavy clamav-daemon flex dovecot-imapd dovecot-pop3d phpMyAdmin awstats webalizer jwhois rssh git spamassassin roundcube roundcube-mysql roundcube-plugins sudo bc ftp lsof ntpdate rrdtool dnsutils vesta vesta-nginx vesta-php
Then i try to install the VestaCP as usual:
curl -O http://vestacp.com/pub/vst-install.sh; bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav yes --mysql yes --postgresql yes
But I have error at mysql-server-5.7 as:
mysql_upgrade failed with exit status 11 dpkg: error processing
package mysql-server-5.7
How to fix that?
The following is generic advice from VestaCP in their documentation:
// Perhaps try stopping mysql-server, apache2, and nginx as well, just incase they're holding up the uninstall. Also, can you post the output/errors if any?
Stop vesta service
service vesta stop
Remove vesta packages and software repository
RHEL/CentOS:
yum remove vesta* rm -f /etc/yum.repos.d/vesta.repo
Debian/Ubuntu:
apt-get remove vesta*
rm -f /etc/apt/sources.list.d/vesta.list
Delete data directory and cron
rm -rf /usr/local/vesta
Honestly, if you're at a point where you can purge all these files, it's probably easier to reinstall your operating system. Failing that, get another VPS(Virtual Private Server) on the go.Install Vesta on the new server, apply any backups of your website(s) and database(s), and then install/setup any services (other than Vesta) you had running on the current server.
If that is completely out of the question, you can find out exactly which packages it installs depending on which version and linux distribution you use. For example the click here for the Ubuntu version.
Just underneath if [ "$release" = '16.04' ]; then is the block of software that the script apt-get installs.
Try using --force with your install command or reinstall ubuntu
Related
How do I uninstall MySQL in WSL?
I have version 5.7.4 installed. After reading over the changes for upgrading to the latest 5.7.x version so I could upgrade to 8.0 (there's a minimum requirement of 5.7.9 to upgrade to 8.0), I figured it would be easier to just uninstall MySQL and start over (I have nothing worth saving from playing around with it previously).
I tried running the following commands (as per this post and this one) and got the following responses:
$ sudo apt remove mysql mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql
$ sudo apt-get remove --purge *mysql*
zsh: no matches found: *mysql*
$ sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
zsh: no matches found: mysql-server-core-*
After running those, I'm still able to start and stop my server with the following commands (note that these are not necessarily the usual systemd commands because I'm in WSL2):
sudo /etc/init.d/mysql start
mysqladmin -u root -p shutdown
Unsure if this is relevant, but even when the server is running I'm not seeing the socket when I enter sudo find / -type s as suggested by this post.
I'm wondering it'd be okay to just delete what files I can find manually, but that seems like a bad idea
/var/lib/mysql/
/usr/share/mysql/
/usr/lib/mysql/
The problem was using zsh as a shell. I successfully removed MySQL with sudo apt-get remove --purge '*mysql*'
I am trying to install MySQL Workbench on Ubuntu 20.04, and I run these commands:
sudo apt-get update && sudo apt-get upgrade
sudo apt install mysql-workbench
the error is:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-workbench
I used this way to install before but now I do not know what to do, please help, I am new in Ubuntu.
try this:
download snapd service using apt-get
sudo apt-get install snapd
after that install workbench
sudo snap install mysql-workbench-community
when it's done You need to enter a command to allow this package to access the service. The command is:
sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service
You have to add the repository in your source.list file:
echo "deb http://repo.mysql.com/apt/ubuntu/ eoan mysql-tools" | sudo tee /etc/apt/sources.list.d/mysql.list
then:
sudo apt update
sudo apt install mysql-workbench-community
MySQL has updated their repository for Focal Fossa and removed the repository for Eoan Ermine. To install MySQL Workbench on 20.04, either download the Workbench for 20.04 from MySQL archives or follow the alternate method mentioned below replacing eoan with focal.
Refer this:
https://askubuntu.com/questions/1230752/mysql-workbench-not-supporting-with-ubuntu-20-04-lts
I am trying to install MySQL 8 on an Ubuntu (that is a Windows Subsystem for Linux) without any prompts.
I have the following script:
apt-key add --keyserver pgp.mit.edu --recv-keys 5072E1F5
echo 'deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0' > /etc/apt/sources.list.d/mysql.list
apt-get update --yes
apt-get install --yes debconf-utils
echo 'mysql-community-server mysql-community-server/root-pass password' | sudo debconf-set-selections
echo 'mysql-community-server mysql-community-server/re-root-pass password' | sudo debconf-set-selections
apt-get install --yes mysql-community-server
(partly constructed thanks to the answers in this question)
and it appears to work fine, except that it prompts me to select authentication method... I want to pick the mysql_native_password and do so without being prompted interactively.
I'm guessing the solution is another debconf-set-selections setting, but... In addition to asking what is it for this case... Is there a reference of all possible options somewhere?
There's also the issue that apt-get says that a symlink is created for the service, and yet the service isn't created... But that's not really a showstopper, as I'm using WSL merely as a test ground for an actual Ubuntu server, where I'd think this would work... hopefully.
EDIT1: Nevermind the original question... I managed to find an answer here
which led to stumble upon this dockerfile
So I ended up adding
echo 'mysql-community-server mysql-server/default-auth-override select Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)' | sudo debconf-set-selections
is the line I need...
HOWEVER, the other, possibly WSL specific issue remains... that is, no MySQL service is created. I should note that while I have MySQL outside of WSL, the server is turned off, specifically so that the WSL could run.
I get the following output upon the install, near the end:
Setting up mysql-community-server (8.0.16-2ubuntu18.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
dpkg: error processing package mysql-community-server (--configure):
installed mysql-community-server package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
mysql-community-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
And the only thing I can find related to that is suggestions of complete reinstall, but even reinstalling the WSL instance doesn't fix this.
EDIT2: Adding
apt-get dist-upgrade --yes --allow-remove-essential --allow-change-held-packages
Fixes the above error, and yet despite there not being any errors, the service is still not created.
I sort of fixed the missing mysql service by copying the /etc/init.d/mysql file from another WSL instance (mysql 8 installed through an upgrade) to /etc/init.d
sudo service mysql start
returns a [fail], but the mysql daemon runs just fine.
Otherwise, I've seen people achieve this more cleanly by installing a lower version from MySQL's repo first, and then upgrade to mysql 8.
on running django-server with django==1.9 and pgsql 9.5, virtualenv=15.0.9 with python2.7 installation no-wheel no-site-packages on ubuntu 14.04
no previous mysql installation prior mariadb==10.2 after which this error occured. tried purging mariadb then, installing mysql=5.6 from dpkg but it didn't solved it either, then reinstalled mariadb==10.2 for sudo apt-get install libmariadbclient but it didn't solved it either.
Any help would be appreciated, ....
getting the below error
Solved.
a gis plugin was being used in my project postgis and postgres used in project.
for that the very initial postgres installation must have put libmysqlclient_18 version defined by its own customizations.
after mariadb installation, the libmysqlclient.so.18 should have been updated, hindering the older linkage and setups.
ran the mysql/mariadb cleaning with this post
https://askubuntu.com/a/172516/735971
installed mariadb again, got the gis support and issue is resolved.
link to gis support libraries:
http://scigeo.org/articles/howto-install-latest-geospatial-software-on-linux.html
update:
got another error during running django server with postgresql==9.5 and postgis==2.2
Could not find the GEOS library (tried "geos_c", "GEOS"). Try setting GEOS_LIBRARY_PATH in your settings.
traced to evidence that mariadb-common files and libmysqlclient/libmariadblclient was still cached in apt-get
evertime I installed postgresql or any of its extension now, it used the cached copy of libmysqlclient.so.18 from mariadb.
so I removed all the unused dpkg configs
sudo dpkg --purgeCOLUMNS=300 dpkg -l "" | egrep "^rc" | cut -d\ -f3
CAUTION: it can remove all the unused package, for only mariadb related files you can do
sudo dpkg --purgeCOLUMNS=300 dpkg -l "maria" | egrep "^rc" | cut -d\ -f3
Also removed postgresql for the next clean installation overriding any traces of compiled libmysqlclient if any.
then removed any apt-repo related to mariadb from /etc/apt/sources.list followed by sudo apt-get update.
then apt-get autoremove and apt-get clean to clean everything.
then sudo apt-get install -y postgresql-9.5 postgresql-9.5-postgis-2.2 postgresql-9.5-pgrouting postgresql-contrib-9.5
but i must say mariadb V10.2 still clashes with other installations and system libraries like it clashed in prior versions for libmysqlclient.so
New install of cent os 5.4; clean install of percona xtradb server (Server version: 5.1.56-rel12.7 Percona Server (GPL), 12.7, Revision 224) gem install mysql failed with the output
/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***
which appears to indicate it can't find the dev libraries. I know I'd normally use the additional options -- --with-mysql-lib=... but I don't believe they're installed as part of the normal percona install outlined here: percona repositories info
So I tried doing yum install mysql-devel but get a conflict with the percona stuff. I found this post where the proposed solution was using the --with-mysql-config option. Percona doesn't automatically install a my.cnf at /etc/my.cnf upon installation, so I whipped one up and placed it there because that's where the init.d script for mysql checks for it. Restarted mysql, confirmed that it's now loading that configuration and attempted the install again, but still failed with
"Exec format error - /etc/my.cnf --cflags (Errno::ENOEXEC)"
Thanks for any help
I also did a find / -name mysql.h and nothing, so it looks like the required libraries are not present after installing both percona server and client with yum
If you correctly added Percona yum repository you just need to install the Percona-Server-devel package:
yum install Percona-Server-devel-55
Replace 55 with the Percona Server version you're currently using.
After that, mysql gems will install correctly.
I've reinstalled libmysqlclient-dev from Percona.
And then reinstalled mysql & mysql2 gems.
After troubling hours and hours and many hours:
Found the following to install mysql gem with percona 5.6:
http://www.percona.com/doc/percona-server/5.6/release-notes/Percona-Server-5.6.16-64.1.html
gem uninstall mysql
apt-get remove mysql-server mysql-server-5.5 mysql-client
mysql-client-5.5 mysql-client-core-5.5 mysql-server-core-5.5
mysql-common libmysqlclient18:i386 libmysqlclient18:amd64
apt-get install percona-server-server-5.6 percona-server-client-5.6
cd /usr/lib/x86_64-linux-gnu
mv libmysqlclient.so.18.0.0 libmysqlclient.so.18.0.0-backup
ln -s libperconaserverclient.so.18.1.0 libmysqlclient.so.18.0.0
rm -rf /home/slat/.rvm/gems/ruby-XXXXX/gems/mysql*
gem install mysql
YIHAA - It works!
For any new people trying to install this gem (this question shows up highly in search ranks), make sure you're passing the mysql directory, like:
gem install mysql2 -- --with-mysql-dir=/usr/local/mysql