menembus batas impian

Archive for Oktober, 2012

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.

Iklan

instal php tambahan


Installing PHP with Slackware Linux

Slackware Linux, Apache2, PHP, Build Apache
cd /downloads
Create apache user and group if they don’t already exist:
groupadd apache
useradd -g apache -d /dev/null -s /bin/false apache
wget latest source from http://httpd.apache.org
tar zxvf httpd-2.2.3.tar.gz
cd httpd-2.2.3
./configure –prefix=/usr/local/apache –enable-mods-shared=most –enable-deflate –enable-ssl
make
make install
echo “/usr/local/apache/lib” >> /etc/ld.so.conf
ldconfig
cd /usr/local/apache/conf
mkdir ssl.crt ssl.key ssl.csr
openssl req -new -out server.csr
openssl rsa -in privkey.pem -out server.key
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
rm privkey.pem
mv server.crt ssl.crt/
mv server.key ssl.key/
mv server.csr ssl.csr/
edit httpd.conf and do the following:
Change User and Group to “apache”
Uncomment “Include conf/extra/httpd-default.conf”
Uncomment “Include conf/extra/httpd-ssl.conf”
edit extras/httpd-ssl.conf and change the following (the paths don’t have the ssl.* directories by default):
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
echo “/usr/local/apache/bin/apachectl start” >> /etc/rc.d/rc.local
/usr/local/apache/bin/apachectl start
go to http://your_server and https://your_server to make sure Apache is working on both ports 80 and 443# chmod +x /etc/rc.d/rc.httpd# /etc/rc.d/rc.httpd start

—————————————————————————–
Build PHP
cd /downloads
wget latest source from http://www.php.net
tar zxvf php-5.1.4.tar.gz
cd php-5.1.4
./configure –prefix=/usr/local –with-config-file-path=/etc –with-apxs2=/usr/local/apache/bin/apxs –with-mysql=/usr/local/mysql –with-mysql-sock=/var/run/mysql/mysql.sock –with-mysqli=/usr/local/mysql/bin/mysql_config –with-openssl –enable-ftp –disable-debug –enable-memory-limit –enable-inline-optimization –enable-magic-quotes –enable-mbstring –enable-track-vars –enable-xml –with-dom –with-xml –enable-sockets –with-zlib –with-gettext –with-pear –with-apsell
make
make install
cp php.ini-recommended /etc/php.ini
Vi /etc/php.ini and do the following:
change “short_open_tag” to On
change include_path to “.:/usr/local/lib/php”
edit /usr/local/apache/conf/httpd.conf and do the following:
make sure install added “LoadModule php5_module modules/libphp5.so”
add “index.php” to DirectoryIndex directive
add “AddType application/x-httpd-php .php .inc .class” to the end of the file
/usr/local/apache/bin/apachectl restart
echo “” > /usr/local/apache/htdocs/test.php
go to http://your_server/test.php and see if your PHP is working

see this

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.)
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 PHP is version 5.2.9, so the file you get is called php-5.2.9.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/srctar jxf /where_php_tarfile_is/php-5.2.9.tar.bz2
Change to the PHP top directory:cd /usr/src/php-5.2.9
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

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