First check httpd service is running or not
/etc/init.d/httpd status
if its running, its ok else need to start
/etc/init.d/httpd start
after starting httpd(apache) need to install mysql server
yum install mysql-server
Now you need to start mysql daemon
/etc/init.d/mysqld start
Now, log in to the mysql using
mysql -u root -p
by default mysql root user doesn't have any password, when it asks for password just press enter and you will be logged in to the database.
if you want to create a password for root user,
UPDATE mysql.user SET Password = PASSWORD('password') WHERE User = 'username';
FLUSH PRIVILEGES;
after installing mysql-server you need to install php,
for installing php need to download some RPM files which contains additional YUM repository definitions.
(2) wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release- 5-4.noarch.rpm
Now, open the file remi.repo
vi /etc/yum.repos.d/remi.repo
find the enabled option and set it to 1 and save it.
Now run command
yum install php php-cli php-gd php-mysql php-mbstring php-mysql
now you're done.
restart the daemon of httpd and check the version of php.
/etc/init.d/httpd restart
php -v or php --version
lamp server,lamp on linux,lamp server configuration,configure lamp server,lamp server on cent os,lamp server on redhat,lamp configuration on centos,lamp configuration on redhat
/etc/init.d/httpd status
if its running, its ok else need to start
/etc/init.d/httpd start
after starting httpd(apache) need to install mysql server
yum install mysql-server
Now you need to start mysql daemon
/etc/init.d/mysqld start
Now, log in to the mysql using
mysql -u root -p
by default mysql root user doesn't have any password, when it asks for password just press enter and you will be logged in to the database.
if you want to create a password for root user,
UPDATE mysql.user SET Password = PASSWORD('password') WHERE User = 'username';
FLUSH PRIVILEGES;
after installing mysql-server you need to install php,
for installing php need to download some RPM files which contains additional YUM repository definitions.
(1) wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
(2) wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release- 5-4.noarch.rpm
Now, open the file remi.repo
vi /etc/yum.repos.d/remi.repo
find the enabled option and set it to 1 and save it.
Now run command
yum install php php-cli php-gd php-mysql php-mbstring php-mysql
now you're done.
restart the daemon of httpd and check the version of php.
/etc/init.d/httpd restart
php -v or php --version
No comments:
Post a Comment