AWS Redhat RHEL Install LAMP
From Hawk Wiki
Revision as of 18:21, 16 March 2015 by Hall (Talk | contribs) (→Install LAMP on redhat 5.4, Cent OS 7=)
Contents
Install LAMP on redhat 5.4, Cent OS 7
Install apache
sudo su yum install httpd apachectl start
Install mysql
Mysql is different in Cent OS 7
see https://www.digitalocean.com/community/questions/can-t-install-mysql-on-centos-7
yum -y install mariadb-server mariadb systemctl start mariadb.service systemctl enable mariadb.service mysql_secure_installation #to setup mysql password
Install PHP
yum install php php-mysql
See RHEL Yum for installing php-mbstring in centOS 7
Sample apache virtual host config
In /etc/httpd/conf.d, create new file sitename.conf
<VirtualHost *:80> ServerAdmin webmaster@hawkguide.com ServerName wiki.hawkguide.com DirectoryIndex index.php index.html DocumentRoot /var/www/wiki.hawkguide.com <Directory /> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog logs/wiki_hawkguide_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. </VirtualHost>