Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Installing PHP Development Environment in Ubuntu

Installing PHP Development Environment in Ubuntu

Ratings: (0)|Views: 464|Likes:
Published by NavinderSharma
Installing PHP Development Environment in Ubuntu
Installing PHP Development Environment in Ubuntu

More info:

Published by: NavinderSharma on Feb 02, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Installing Apache, PHP, PostgreSQL, MySQL, JDK, NetBeans, VLCPlayer in Ubuntu (Linux)
Please check that your internet first.
Open Terminal Window by clicking Applications
If you are installing first time, Please update your installer first using followingcommand:
$ sudo apt-get update
To install Apache use following command:
$ sudo apt-get install apache2
To set mod_rewrite of Apache to on use following command:
$ sudo a2enmod rewrite
To install PHP use following command:
$ sudo apt-get install php5$ sudo apt-get install php5 libapache2-mod-php5
To install PHP-XSL (required for Propel) use following command:
$ sudo apt-get install php5-xsl
To install PHP-PEAR use following command:
$ sudo apt-get install php-pear
Please restart Apache to take effect of installation of PHP using following command:
$ sudo /etc/init.d/apache2 restart
6.To install PostgreSQL use following commands:
$ sudo apt-get install postgresql$ sudo apt-get install postgresql-client$ sudo apt-get install postgresql-contrib$ sudo apt-get install pgadmin3
Above commands will install database client/server, some extra utility scripts and the pgAdmin III GUI applications for working with the database. Now we need to reset the password for the
admin account for the server, so wecan use this for all of the system administration tasks. Use following command:
$ sudo su postgres –c psql template1# ALTER USER postgres WITH PASSWORD ‘postgres’;# \q
Previous step alters the password for within the database, now we need to do the same for the linux user 
Use following command to change:
$ sudo passwd –d postgres$ sudo su postgres –c passwd
 Now enter the same password that you used previously with
command.Then from here on in we can use both pgAdmin III and command-line access to run thedatabase server. But before you jump into pgAdmin we should setup the PostgreSQLadmin pack that enables better logging and monitoring within pgAdmin. Run followingcommand:
$ sudo su postgres –c psql < /usr/share/postgresql/8.4/contrib/adminpack.sql
Please take care of version of postgresql, if you are using Ubuntu 9.04 change your 8.4 to8.3 in above command.Finally, we need to open up the server so that we can access and use it remotely – unlessyou only want to access the database on the local machine. To do this first, we need toedit the
file. Open the file using following command:
$ sudo gedit /etc/postgresql/8.4/main/postgresql.conf 
 Now edit a couple of lines in the
Connections and Authentication
Change #listen_addresses=’localhost’ to listen_addresses=’*’Change #password_encryption=on to password_encryption=on
Save and Close the file. Now the final step, we must define who can access the server.This can be done by editing
Open the file using following command:
$ sudo gedit /etc/postgresql/8.4/main/pg_hba.conf 
Please edit following lines:
#local is for the Unix domain socket connections only#TYPE DATABASE USER CIDR-ADDRESS METHODlocal all all md5
Please add following line at the end of the file:
In last line, give IP-ADDRESS and SUBNET mask of the machine that you would like toaccess your server. If you would like to enable access to range of IP addresses, justsubstitute that last number to a zero and all machines within that range will allowedaccess your system. My changes in
file are shown below:
That’s it, now restart PostgreSQL to make the changes. Use following command:
$ sudo /etc/init.d/postgresql-8.4 restart
To connect PHP with PostgreSQL use following command:
$ sudo apt-get install php5-pgsql
To install MySQL, use following commands:
$ sudo apt-get install mysql-server$ sudo apt-get install mysql-query-browser$ sudo apt-get install phpmyadmin
Please open
with following command:
$ sudo gedit /etc/mysql/my.cnf 
 Now make comment to one of its line by writing # in front of line as following:
One change in
is shown below:

Activity (9)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
cool_sandy001 liked this
Raul_Rigali_4088 liked this
varunhirve liked this
pkrakesh liked this
dcijherrera liked this
hplar00 liked this
Nag Cherukuri liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->