Neobux

Showing posts with label Server. Show all posts
Showing posts with label Server. Show all posts

Friday, June 13, 2008

Part 6 - Installing PHPMyadmin

6.0 Installing and configuring PHPMyadmin

  1. Extract the downloaded file into E:\ server\.
  2. Change the folder name from phpMyAdmin-2.6.2-pl1 to phpmyadmin or any other name you like.
  3. If you had followed step by step from the tutorial, your E:\server directory will look like this.
    E:\server
    +Apache2
    +mysql
    +php
    +phpmyadmin
    +www --> default directory
  4. Because phpmyadmin folder is outside of our default directory, we cannot display or get any files or information from this folder when we typed http://localhost/phpmyadmin.
  5. Now, open httpd.conf file.
  6. Add this line:
    Alias /phpmyadmin "E:/server/phpmyadmin/"

    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
  7. The first line is to point /phpmyadmin as E:/server/phpmyadmin/, so every time we type http://localhost/phpmyadmin, we will be point to E:/server/phpmyadmin.
  8. Line in is for security reason. Phpmyadmin can only be open by localhost which have IP 127.0.0.1. (This IP if I’m not mistaken is especially for localhost, so other computer cannot open this directory).
  9. Restart your Apache2.
  10. Open your browser and type http://localhost/phpmyadmin, http://127.0.0.1/phpmyadmin, http://***.***.***.***/phpmyadmin (type your ip address).
  11. Previously, we had assign a password for our MySQL database. We cannot connect phpmyadmin to our database because by default phpmyadmin assume our administrator user ‘root’ has no password.
  12. Now we need to edit config.inc.php located in phpmyadmin folder, again by using our powerful notepad. If you can’t find this file, try to search config.sammple.inc.php and change to config.inc.php.
  13. Make these changes:
    From To
    $cfg['blowfish_secret'] = ' ';
    Only if you type auth_type=cookie
    $cfg['blowfish_secret'] = '(type anything, ex. jhgjhUAsAGjJS)'
  14. Log in using your mysql username and password.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Part 5 - Editing httpd.conf

5.0 Editing httpd.conf

  1. You can open httpd.conf in two ways.
    • Start Menu --> Programs --> Apache HTTP Server --> Configure Apache Server --> Edit the Apache httpd.conf
    • Open folder [Drive]:\server\Apache\conf\httpd.conf

Running PHP 5 as an Apache Module

  1. Add following line in the file (can copy and paste to the end of httpd.conf):
    LoadModule php5_module "e:/server/php/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

Configuring the Default Index Page

  1. Find DirectoryIndex. And add index.php.
    From -->DirectoryIndex index.html index.html.var
    To -->DirectoryIndex index.html index.html.var index.php
    This line tells Apache which file names to use when it looks for the default page for a given directory.
  2. Save your file and restart Apache by click Start --> All Programs -- > Apache HTTP Server 2.2 --> Control Apache Server --> Restart or by right-click the icon in the system tray and select restart.
  3. If all is well, Apache will start up again without any error.
  4. If Apache cannot start, try Start Menu--> Apache HTTP Server --> Configure Apache Server --> Review Error Log and see what are the problem.

Configuring Document Root

  1. I prefer to set my Directory Root other than default htdocs in Apache folder.
  2. Find DocumentRoot "E:/server/Apache/htdocs" and change to other folder. I pick e:\server\www\.
    From --> DocumentRoot "E:/server/Apache/htdocs"
    To --> DocumentRoot "E:/server/www"
  3. Do the same for,

Testing the PHP.

  1. Make a new file named phpinfo.php by using any text editor.
  2. Type this in the file.
  3. Put the file in the E:\server\www\ (--> because previously we had assigned this directory as default).
  4. Open your favorite web browser and type http://localhost/phpinfo.php.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Thursday, June 12, 2008

Part 4 - Installing PHP

php.gif

4.0 Installing and configuring PHP

  1. Extract the zip file (php-5.2.6-Win32.zip) to [Drive]:\server\php.
  2. Find the files called php.ini-recommended and rename it to php.ini.
  3. Open php.ini with text editor. (I prefer to use Notepad ++)
  4. Find ;extension=php_mysql.dll and delete “;”.
  5. Find ;extension=php_mcrypt.dll and delete “;”.
  6. Find extension_dir = "./" change to extension_dir = "./ext"
  7. Right click My Computer --> Properties --> Advance Tab --> Environment Variable. In system variables select Path and press edit. Add your php folder in the list e.g. E:\server\php. (optional)

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Tuesday, June 10, 2008

Part 3 - Installing MySQL

logo_mysql_sun.gif

3.0 Installing and configuring MySQL

  1. Unzip the downloaded file and run the setup.exe file.
  2. Click --> Next.
  3. Because we want to install in different folder, select Custom setup. Click --> Next.
  4. In the next windows, select MySQL Server and click Change…
  5. Change folder to [Drive]:\server\mysql. Click OK.
  6. Click --> Next.
  7. We are ready to install. Click --> Install.
  8. After finish installing, some MySQL.com advertisement will come out. Click Next and Next. And in the next dialog box, tick Configure the MySQL Server now. Click Finish.
  9. Click --> Next.
  10. Select Standard Configuration for fresh installation. Click --> Next.
  11. Check Install as Windows Service and Launch the MySQL Server automatically.
    Leave the Service Name as MySQL.
    Also check the Include Bin Directory in Windows PATH (optional).
    Click --> Next.
  12. Write your root password.
    For security, your password should have mixed-case letters and alphanumeric.
    Check the Enable root access from remote machine.
    Click --> Next.
  13. Click --> Execute.
  14. Now we have finish using the wizard.
  15. Click --> Finish.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Part 2 - Installing Apache

apache_logo_medium_2.png

1.0 Before you begin

Please download this software

Apache 2.2.8 [win32 binary] http://apache.leakage.org/httpd/binaries/win32/
(apache_2.2.8-win32-x86-no_ssl.msi)
MySQL 5.0.51b [Windows (x86)] http://dev.mysql.com/downloads/mysql/5.0.html#win32
(mysql-5.0.51b-win32.zip)
PHP 5.2.6 [windows binaries] http://my.php.net/downloads.php
(php-5.2.6-Win32.zip)
phpMyAdmin 2.11.2 http://www.phpmyadmin.net/home_page/downloads.php
(phpMyAdmin-2.6.2-pl1.zip)

I’m using Windows XP with sp2.

2.0 Installing Apache 2.2

  1. Double-click the Apache installer file (apache_2.2.8-win32-x86-no_ssl.msi) to launch the Apache automated installer.
  2. Click --> Next
  3. Select “I accept the terms in the license agreement" and click Next.
  4. Click --> Next
  5. Example if your url is www.somenet.com (this is not important because we only want a personal webserver).
    Network Domain :
    somenet.com
    Server Name : www.somenet.com
    Administrator’s Email Adress : webmaster@somenet.com (your admin email address)
    Select for All User, on Port, as a Service – Recommended
    Click --> Next.
  6. Select Custom setup. Click --> Next.
  7. I want to install all my server program in different location. So, select Apache HTTP Server 2.2.8 and click Change.
  8. Type [Drive]:\server\Apache to change installation folder. This is depending on what folder you want to install. In this case, I want to put all installation of Apache2, MySQl, and PHP in the same e:\server\ folder.
    Click --> OK --> NEXT.
  9. We are ready to install. Click Install.
  10. Installing... After some time, some DOS windows will appear and disappear.
  11. If everything going well, we can see this window. Click --> Finish
  12. To check your installation, open your favorite browser. Type http://localhost/ or http://127.0.0.1. If you see It Works! text, it means you installation is correct.

.

Note : This guide is only a strip down version (no picture). For a complete guide please download this file. Only for personal webserver.

How to install Apache, MySQL PHP (Windows XP)

Sunday, June 8, 2008

Part 1 - Web Server

Introduction

Now I decided to learn more about some of Open Source Content Management System (CMS) like Joomla, Drupal, CMS Made Simple and e107. These CMS and also most of the CMS require PHP (server-side HTML embedded scripting language) and MySQL (open source database), and most importantly a webserver.

Click here to see the list of the CMS.

When I said webserver, it doesn’t mean those expensive server offered by our country webhosting company. What I means is your normal Personal Computer, equipped with require programs and services installed which listens to HTTP (and other web requests) and serves content. Now day, setting up a webserver is easy.

Hardware requirement?

My test machine is 5 years old PC with this specs:

Athlon XP 2500 (1.8Ghz)
256Mhz DDR Ram
Windows XP SP2

So, anything newer than this PC can work properly.

Software?

Automatic Installation (Packages)

Currently, there are a lot of webserver package or also known as all-in-one webserver. These packages are a bundle of apache, mysql and php. Most of the packages also include phpmyadmin, a web based database management system. User only need to install the package and it will automatically install and setup your computer.

This is the list of the webserver package (please give comment to add other):

  1. EasyPHP
  2. XAMPP
  3. Abyss Web Server
  4. WAMP (Windows)
  5. MAMP (Machintosh)

Some of the package offered Lite version. This Lite version is a small version of the package with basic function but still can serve as a webserver. Some of the Lite version can be save and run in a thumbdrive like XAMPP Lite. They are ready-to-run webserver, no installation required.