Installation of apache server in linux system by using command mode(Terminal)
First connect to root user in the terminal if you are using ubuntu use yum,for debian apt -get and for fedora dnf and then enter the below command
install php php-pgsql php-gd
it will show the files required for installation of apache server and it also shows the size of a file type y or yes to continue installation After completion of installation go to vim /etc/php.ini then in that php.ini change to
variables_order = "EGPCS" short_open_tag = ON
you can get by easily search by EGPCS short_open_tag by coming out of insert mode then save and quitAfter that open
/etc/passwd then CHANGE FROM apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin IN vim /etc/passwd TO apache:x:48:48:Apache:/var/www:/bin/bash
after that give password for apache user by using passwd apache (giving password for apache user login with su user)
Finally change in vim /etc/selinux/config – SELINUX=disabled for security reasons
Restart the server by using service httpd restart