menembus batas impian

Archive for the ‘Linux’ Category

Another MySQL daemon already running with the same unix socket.


[root@localhost pabhe]# rm -rf /var/lib/mysql/mysql.sock
[root@localhost pabhe]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@localhost pabhe]#

Installing Wine 1.6 in RHEL, CentOS and Fedora


Step 1: Installing Dependency Packages

We need to install ‘Development Tools‘ with some core development tools such gcc, flex, bison, debuggers etc. these software’s are must required to compile and build new packages, install them using YUM command.

# yum -y groupinstall ‘Development Tools’
# yum -y install libX11-devel freetype-devel

Step 2: Downloading Wine 1.6

Download the source file using Wget command under /tmp directory as a normal User.

$ cd /tmp
$ wget http://garr.dl.sourceforge.net/project/wine/Source/wine-1.6.tar.bz2

Step 3: Extracting Wine 6

Once the file is downloaded under /tmp directory, use the below commands to extract it.

$ tar -xvf wine-1.6.tar.bz2 -C /tmp/

Step 4: Installing Wine 1.6

It is recommended to compile and build Wine installer as a normal User. Run the following commands as normal user. (Note : The installer might take up-to 20-30 minutes and in the middle it will ask you to enter root password).
On 32-Bit Systems

$ cd wine-1.6/
$ ./tools/wineinstall

On 64-Bit Systems

$ ./configure –enable-win64
$ make
# make install

Once the installation completes run the “winecfg” configuration tool from KDE or GNOME desktop to see the supported configuration. If you don’t have any of the desktop, you can install it by using the below command as root user.

# yum groupinstall “X Window System” “GNOME Desktop Environment”
OR
# yum groupinstall “X Window System” “KDE (K Desktop Environment)”

Once the X Window System installed, run the command as normal user to see wine configuration.

$ winecfg

http://www.tecmint.com/install-wine-in-rhel-centos-and-fedora/

Recover MySQL root Password


You can recover MySQL database server password with following five easy steps.

Step # 1: Stop the MySQL server process.

Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.

Step # 3: Connect to mysql server as the root user.

Step # 4: Setup new mysql root account password i.e. reset mysql password.

Step # 5: Exit and restart the MySQL server.

Here are commands you need to type for each step (login as the root user):
Step # 1 : Stop mysql service

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld.

Step # 2: Start to MySQL server w/o password:

# mysqld_safe –skip-grant-tables &
Output:

[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started

Step # 3: Connect to mysql server using mysql client:

# mysql -u root
Output:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>

Step # 4: Setup new MySQL root user password

mysql> use mysql;
mysql> update user set password=PASSWORD(“NEW-ROOT-PASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit
Step # 5: Stop MySQL Server:

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended
[1]+ Done mysqld_safe –skip-grant-tables

Step # 6: Start MySQL server and test it

# /etc/init.d/mysql start
# mysql -u root -p

from : http://www.cyberciti.biz/tips/recover-mysql-root-password.html

Setting Ip Static Slackware


Edit your “/etc/rc.d/rc.inet1.conf” file with your static IP settings.
Edit your “/etc/resolve” file and insert your DNS IP’s

Then restart or run “/etc/rc.d/rc.inet1 restart” and your all set.

install phpmyadmin on slackware


Install PhpMyAdmin di Slackware 13.37

Juli 14, 2012 by 4ndy93 | 6 Comments

oke, langsung saja kita ke tkp 😀

Download dahulu paket phpmyadmin nya disini, disini kita butuh 2 paket, Source dan Slackbuild
lalu ekstak file tersebut

# tar -xvf phpMyAdmin-3.5.1-all-languages.tar.xz
# tar -xzvf phpmyadmin.tar.gz

Sebelum melakukan proses install kita copy file yang dibutuhkan terlebih dahulu

# cd phpmyadmin
# cp phpmyadmin.SlackBuild ..
# cp slack-desc ..

Kemudian kita lakukan proses instalasi

# ./phpmyadmin.SlackBuild
# cd /tmp/
# installpkg phpmyadmin-3.5.1-noarch-1_SBo.tgz

Proses Instalasi kini sudah selesai 🙂 , Sekarang saat nya pengaturan konfigurasi :

Tambahkan script dibawah ini ke dalam /etc/httpd/httpd.conf:

Alias /phpMyAdmin /var/www/htdocs/phpMyAdmin

Order allow,deny
Allow from all

Ubah config.sample.inc.php menjadi config.inc.php di folder /var/www/htdocs/phpmyadmin.
Kemudian edit config.inc.php tersebut dengan mengubah “$cfg[‘blowfish_secret’]=”; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */” menjadi $cfg[‘blowfish_secret’] = ‘your_text’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */. “your text” dapat diisikan terserah.
Kemudian login di http://localhost/phpmyadmin dengan menggunakan user dan password yang telah dibuat saat konfigurasi mysql.
Edit file /var/www/phpMyAdmin/config.inc.php dengan menghilangkan komen pada baris-baris berikut (yang saya tunjukkan setelah dihilangkan komentarnya):

$cfg[‘Servers’][$i][‘pmadb’] = ‘phpmyadmin’;
$cfg[‘Servers’][$i][‘bookmarktable’] = ‘pma_bookmark’;
$cfg[‘Servers’][$i][‘relation’] = ‘pma_relation’;
$cfg[‘Servers’][$i][‘table_info’] = ‘pma_table_info’;
$cfg[‘Servers’][$i][‘table_coords’] = ‘pma_table_coords’;
$cfg[‘Servers’][$i][‘pdf_pages’] = ‘pma_pdf_pages’;
$cfg[‘Servers’][$i][‘column_info’] = ‘pma_column_info’;
$cfg[‘Servers’][$i][‘history’] = ‘pma_history’;
$cfg[‘Servers’][$i][‘tracking’] = ‘pma_tracking’;
$cfg[‘Servers’][$i][‘designer_coords’] = ‘pma_designer_coords’;

PhpMyAdmin siap dipakai

Sekian dulu tips dari saya kali ini, Semoga tips kali ini bermanfaat

install php on slackware


I) What you need

A Slackware Linux box on which you can log on as root.
The Apache web server must be installed with mod_so enabled. (For more information, see my Apache install directions.)
Some type of Internet access (to download the PHP source).
About half an hour of uninterrupted work time.

II) Downloading PHP

You can download from one of the PHP mirrors. (PHP comes in both gzip and bzip2 archives. This document assumes the bzip2 type.)

NOTE: PHP 5.3 is out. I’m still using 5.2, due to issues with some of the Drupal modules we use.

In bzip2 form, PHP 5.2.x is around 9 MB, so if you’re using dial-up this will take a while.

As of the time of this writing, the current 5.2.x branch PHP is version 5.2.13, so the file you get is called php-5.2.13.tar.bz2 or something similar.

Just store this somewhere that Linux can see it.

III) Installing PHP

cd to wherever you want the PHP source to live and extract it:
cd /usr/src
tar jxf /where_php_tarfile_is/php-5.2.13.tar.bz2

Change to the PHP top directory:
cd /usr/src/php-5.2.13

Configure PHP:
(This assumes that Apache is installed in /home/httpd. If it’s not there, you’ll need to figure out where apxs lives.)
./configure –with-mysql –with-apxs2=/home/httpd/bin/apxs

(NOTE: Apache must be installed with mod_so enabled.)

Assuming there are no error messages from configure, it’s time to make and install PHP. Just type:
make ; make install

Now, we need a php.ini file to tell PHP how to act. I just use php.ini-recommended with one change.

First, put php.ini in the default location:
cp php.ini-recommended /usr/local/lib/php.ini

The only change I make is to turn off allow_url_fopen:
allow_url_fopen = Off

(NOTE: In the wrong hands, allow_url_fopen can be very dangerous! I write PHP code to avoid its use.)

All that’s left to do is modify the Apache configuration file: /home/httpd/conf/httpd.conf by adding the line:
AddType application/x-httpd-php .php

While you’re there, you may want to add .php indexes to the DirectoryIndex line:
DirectoryIndex index.html index.php index.shtml

To make it all work, stop the web server:
/etc/rc.d/rc.httpd stop

Then start it again:
/etc/rc.d/rc.httpd start

Back to Stu’s Linux page

instal apache on slacware


I) What you need

A box with Slackware Linux installed and running.
Some type of Internet access.
About half an hour of uninterrupted work time.
To boot the above-mentioned machine and log on as root.

II) Downloading Apache Web Server

You can download directly from the Apache site (http://httpd.apache.org/) or you may want to try one of the mirrors close to you to get a faster download.

Apache v2.2 is about 5 MB, so if you’re using dial-up this will take a while.

As of the time of this writing the current Apache web server is version 2.2.15, so the file you get is called httpd-2.2.15.tar.bz2 or something similar.

Just store this somewhere that Linux can see it.

III) Installing Apache web server

cd to wherever you want the apache source to live and extract it:

cd /usr/src
tar -jxf /where_apache_tarfile_is/httpd-2.2.15.tar.bz2

Change to the Apache top directory:

cd /usr/src/httpd-2.2.15

Now, configure Apache:
(This assumes that we’re installing Apache in /home/httpd. You can install it anywhere you wish by replacing /home/httpd with your location of choice.)

./configure –prefix=/home/httpd –enable-modules=so

(NOTE: I’ve included the module so, which makes it easier to add stuff like PHP.)

So far we’re doing good. Let’s make a web server! Just type:

make ; make install

This will make the server and install it in one fell swoop. On my test box (an Athlon 600 ) this takes under two minutes. Your mileage may vary!

You should get a box that says:

You now have successfully built and installed the Apache 2.2 HTTP server . . .

If so, we only have a few steps left! If not, you’ll need to start reading the error messages and the Apache documentation to figure out what went wrong.

If you’d like Apache to use something other than (or in addition to) index.html as an index page, Just edit the file /home/httpd/conf/httpd.conf and find the section labeled DirectoryIndex and add to the line that looks like:

DirectoryIndex index.html

You can add as many as you like, but I must mention that each one is an additional lookup each time a directory is accessed without a file name. Too many may slow your server down. Anyway, my line looks something like:

DirectoryIndex index.html index.php index.shtml index.htm default.htm

You may need to create rc.httpd in /etc/rc.d:
(This location is for Slackware; you may need a different location for other Linux distributions.)

It should look something like:

#!/bin/sh
if [ “$1” = “stop” ]; then
/home/httpd/bin/apachectl stop
elif [ “$1” = “restart” ]; then
/home/httpd/bin/apachectl restart
elif [ “$1” = “start” ]; then
/home/httpd/bin/apachectl start
else
echo “usage: $0 start|stop|restart”;
fi

Then change it so that it can be executed:

chmod a+x rc.httpd

A reboot of your system should have you on your way. If you don’t wanna restart, just type:

/etc/rc.d/rc.httpd start

If you can see the page: http://your_server/ then your installation was successful!

Some random Apache notes

Back to Stu’s Linux page

last updated 03-29-2010 07:16 by Stuart Reedy
Copyright Stuart Reedy 2002-2010
All rights reserved