Installing LAMP in CentOS 7
LAMP stack is a group of open source software used to get web servers up and running., Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language. (Sometimes Perl or Python is used instead of PHP.).
HTTPD:-
1. To check whether httpd is already available
rpm -qa | grep httpd
2. Install Apache
yum install httpd
rpm -qa | grep -i httpd → to verify
3. Start the service
chkconfig httpd on,
service httpd start
service httpd status
4. To check any new version available or not
yum check-update httpd -> to check
yum update httpd → to install new version
Install LAMP PHP & MySQL:
1.Install PHP
yum install php
2.To check PHP version
rpm -qa | grep -i php
3.Install MySQL
yum search php-mysql → install mysql-php module
yum install php-mysql
5.To install additional php module
yum install php-common php-mbstring php-mcrypt php-devel php-xml php-gd
6.Check for PHP latest update
yum check-update php
yum update php
yum check-update php-common php-mbstring php-mcrypt php-devel php-xml php-gd
yum update php-common php-mbstring php-mcrypt php-devel php-xml php-gd
10.Default location for PHP
cd /var/www/html vi test.php (<? phpinfo(); ?> )
cat /var/www/html/test.php
LAMP stack is a group of open source software used to get web servers up and running., Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language. (Sometimes Perl or Python is used instead of PHP.).
HTTPD:-
1. To check whether httpd is already available
rpm -qa | grep httpd
2. Install Apache
yum install httpd
rpm -qa | grep -i httpd → to verify
3. Start the service
chkconfig httpd on,
service httpd start
service httpd status
4. To check any new version available or not
yum check-update httpd -> to check
yum update httpd → to install new version
Install LAMP PHP & MySQL:
1.Install PHP
yum install php
2.To check PHP version
rpm -qa | grep -i php
3.Install MySQL
yum search php-mysql → install mysql-php module
yum install php-mysql
5.To install additional php module
yum install php-common php-mbstring php-mcrypt php-devel php-xml php-gd
6.Check for PHP latest update
yum check-update php
yum update php
yum check-update php-common php-mbstring php-mcrypt php-devel php-xml php-gd
yum update php-common php-mbstring php-mcrypt php-devel php-xml php-gd
10.Default location for PHP
cd /var/www/html vi test.php (<? phpinfo(); ?> )
cat /var/www/html/test.php
ConversionConversion EmoticonEmoticon