Monday, November 30, 2009

PostgreSQL

# cd /usr/local/src
# tar -zxvf postgresql-x.x.x.tar.gz
# cd postgresql-x.x.x
# ./configure
# make
# make install

PostgreSQL installed, let the initial settings:

# useradd postgres
# passwd postgres
# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
# su postgres



User and server folder created, we initialize the first time the server

#initdb -D /usr/local/pgsql/data

Now we set some more details. Inside the file /etc/profile, add the following lines wid vi:

.
..
...
....
PATH=$PATH:/usr/local/pgsql/bin
MANPATH=$MANPATH:/usr/local/pgsql/man
export PATH MANPATH


Save the file and close the editor,
and :

# cd /usr/local/src/postgresql-x.x.x/contrib/start-scripts/
# cp linux /etc/rc.d/rc.postgresql
# chmod a+x /etc/rc.d/rc.postgresql


Your PostgreSQL is ready! To start it, run:

# /etc/rc.d/rc.postgresql start


Tuesday, October 27, 2009

phpMyAdmin in Slackware 13

Install

Download phpMyAdmin from phpMyAdmin.net and put it in /usr/src/sourcepkg. Extract and add a symbolic link for later use in our config.
#cd /var/www
#tar jxvf /usr/src/source/phpMyAdmin-XXX.tar.bz2
#ln -sf phpMyAdmin-XXX phpMyAdmin

Create the phpMyAdmin config file and edit it.
#touch /etc/httpd/phpMyAdmin.conf
#jed /etc/httpd/phpMyAdmin.conf
Add an alias to httpd (since the phpMyAdmin directory isn't in var/www/htdocs) and change the Directory rules.
# # phpMyAdmin - MySQL Database Administration Tool
# Alias /phpMyAdmin /var/www/phpMyAdmin

# AllowOverride None # Options None Order allow,deny
Allow from all

Edit httpd.conf to use our new config and append at the end.
# Uncomment the following line to enable phpMyAdmin support: # Include /etc/httpd/phpMyAdmin.conf

Configuration

Restart apache
#/etc/httpd/rc.httpd restart
Go to your browser and open http://localhost/phpMyAdmin

Finished.

Tuesday, April 14, 2009

Repair Lilo after install Windows

ابتدا با سی دی یا دی وی دی Slackware‌ کامپیوترتان را بوت کنید پس از اینکه با کاربر ریشه وارد شدید با دستورات زیر LILOرا تعمیر کنید

mkdir /mnt/linux#
# mount -w /dev/sda11 -نام پارتیشنی که لینوکس بر روی آن نصب است - /mnt/linux
# cd /mnt/linux
#chroot /mnt/linux /bin/bash
# file /boot/vmlinuz
# lilo -v
# reboot

Tuesday, April 7, 2009

Keyboard layout us,ir

در حالت پیش فرض سویچنگ بین لایه های کیبورد در Slackware کار نمی کنه من با ویرایش فایل زیر این کار رو انجام دادم
/etc/X11/xorg.conf:

option "XkbRules" "xorg"
Option "XkbModel" "pc101"
Option "XkbLayout" "us,ir"
Option "XkbOptions" "grp:alt_shift_toggle".

در پایان از نحیط گرافیکی خارج و مجددا با دستور startx لاگین شوید. .

NTFS & Slackware

در ورژن 12 پارتیشن های دارای فایل سیستم NTFS فقط قابل خواندن هستند و نمی توان برروی آنها اطلاعات نوشت.البته این مشکل در ورژن های 12.1 و 12.2 حل شده است. نرم افزاری که می خوام معرفی کنم اسمش ntfs-3g هست که config اون خیلی آسونه . می تونید از لینک زیر دانلود کنید.
لینک دانلود
بعد از دانلود با دستور زیر اونو نصب کنید.
# installpkg ntfs-3g-1.2412-i486-1as.tgz
حالا باید فایلetc/fstab رو با ادیتور ویرایش کنید.
قسمتهایی که رنگش بنفشه تغییر داده شده
vi /ets/fstab #
/dev/sda9 swap swap defaults 0 0
/dev/sda10 / reiserfs defaults 1 1
dev/sda1 /C ntfs-3g umask=077 1 0/
/dev/sda5 /D ntfs-3g umask=077 1 0
/dev/sda6 /E ntfs-3g umask=077 1 0
/dev/sda7 /F ntfs-3g umask=077 1 0
/dev/sda8 /G ntfs-3g umask=077 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

Sunday, February 22, 2009

How to install Compiz on Slackware 12

Who said that linux is not "beautiful"? Who ever said "Windows Vista has the charts effettini has not linux?
Step 1 :
download this pkg :
- ccsm
- Compiz
- compiz-bcop
- compiz-fusion-plugins-extra
- compiz-fusion-plugins-main
- compiz-fusion-plugins-unsupported
- compizconfig-python
- compizconfig-backend-kconfig
- emerald
- emerald-themes
- libcompizconfig
- simple-ccsm
- libwnck
- pygtk
- sexy-python

Step 2:
install pkgs with "installpkg" or " "pkgtool" command

# installpkg *.tgz

Step 3 :

System Configurations

Now we move on to the changes (always valid regardless of the version of compiz) to be made to the system.
Aprite il file /etc/X11/xorg.conf. Open the file / etc/X11/xorg.conf.

Nella Section "Module" abilitate le glx: In Section "Module" glx enabled:

 Load "glx" 

In Section "Device" add the following lines:

Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
Option "XAANoOffscreenPixmaps" "true"
Option "AddARGBGLXVisuals" "true"

In Section "Server Layout" add this line:

Option "AIGLX" "true"

hen you have to activate the composite, and then add the file as follows:

Section "Extensions"
Option "Composite" "Enable"
EndSection EndSection

Step 4:

starting compiz

# compiz --replace ccp & emerald --replace
------------------------------------------------------- or
# vi compiz

#!/bin/bash
# Compiz startup script

LIBGL_ALWAYS_INDIRECT=TRUE \
/usr/bin/compiz --replace png svg decoration annotate water blur clone \
wobbly fade minimize cube rotate zoom scale move resize place switcher & \
/usr/bin/kde-window-decorator &

--------------------------------------------------------------------------------

CommonKeyboardShortcuts compiz


To stop Compiz instead you can use the following:

killall -9 compiz && /usr/bin/kwin --replace &


Saturday, February 21, 2009

MPLAYER

INSTALL:

# cd /usr/src
# wget http://www4.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
# tar -jxf MPlayer-1.0rc2.tar.bz2
# cd MPlayer-1.0rc2
# ./configure --prefix=/usr/local/mplayer --enable-gui
# make
# make install

Add codecs

# cd /usr/src
# wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
# tar -jxf essential-20071007.tar.bz2
# mkdir -p /usr/local/lib/codecs
# cp -rv essential-20071007/* /usr/local/lib/codecs/

gmaplayer: work with X

# wget http://www.mplayerhq.hu/MPlayer/skins/Blue-1.7.tar.bz2

# mkdir /usr/local/mplayer/share/mplayer/skins/default

# tar jxvf Blue-1.7.tar.bz2 -C /usr/local/mplayer/share/mplayer/skins

# cp /usr/local/mplayer/share/mplayer/skins/Blue/* /usr/local/mplayer/share/mplayer/skins/default/

Reading with MPlayer :

# mplayer test.mpg

the options are:

-vo driver_video
-ao driver_sound
-fs : full screen
-zoom: forcing expansion