rianto isaac's Weblog

rianto utomo isaac sahala utomo

linux, ubuntu remove mysql dan install lagi

leave a comment »

pertama liat dulu yang udah keinstall apa aja:

Show the List of Installed Packages on Ubuntu or Debian

While working on the instructions for compiling MonoDevelop from source, I relied heavily on the dpkg and apt-cache commands to tell me what was already installed vs what packages were available in the repository. After completing that article it occurred to me that I should explain how to show what packages are currently installed… so here we are.

The command we need to use is dpkg –get-selections, which will give us a list of all the currently installed packages.

$ dpkg --get-selections
adduser                                         install
alsa-base                                       install
alsa-utils                                      install
apache2                                         install
apache2-mpm-prefork                             install
apache2-utils                                   install
apache2.2-common                                install
apt                                             install
apt-utils                                       install

The full list can be long and unwieldy, so it’s much easier to filter through grep to get results for the exact package you need. For instance, I wanted to see which php packages I had already installed through apt-get:

dpkg --get-selections | grep php
libapache2-mod-php5                             install
php-db                                          install
php-pear                                        install
php-sqlite3                                     install
php5                                            install
php5-cli                                        install
php5-common                                     install
php5-gd                                         install
php5-memcache                                   install
php5-mysql                                      install
php5-sqlite                                     install
php5-sqlite3                                    install
php5-xsl                                        install

For extra credit, you can find the locations of the files within a package from the list by using the dpkg -L command, such as:

dpkg -L php5-gd
/.
/usr
/usr/lib
/usr/lib/php5
/usr/lib/php5/20060613
/usr/lib/php5/20060613/gd.so
/usr/share
/usr/share/doc
/etc
/etc/php5
/etc/php5/conf.d
/etc/php5/conf.d/gd.ini
/usr/share/doc/php5-gd

Now I can take a look at the gd.ini file and change some settings around…

rianto utomo bole nyontek dari http://www.howtogeek.com/howto/linux/show-the-list-of-installed-packages-on-ubuntu-or-debian/

klo udah maka uninstall yang tidak diinginkan

sudo dpkg –purge [nama_paket]

kemudian install mysql

sudo apt-get install mysql-server mysql-server-5.0 libnet-ssleay-perl openssl libauthen-pam-perl libio-pty-perl mysql-client-5.0 libmysqlclient15off mysql-common apt-show-versions libapt-pkg-perl

aslinya nyontek dari sini http://www.howtogeek.com/howto/ubuntu/install-mysql-server-5-on-ubuntu/ cuma udah gw edit jadi lebih lengkap

lanjut mang, selamat mencoba.. gw udah sukses, tinggal ente..

Written by isaaconi

September 22, 2011 pada 3:43 pm

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: