Skip to content

Instantly share code, notes, and snippets.

@wapcrazut
Last active August 31, 2019 21:06
Show Gist options
  • Save wapcrazut/10963dd497c6c12edae668dda07fc4d9 to your computer and use it in GitHub Desktop.
Save wapcrazut/10963dd497c6c12edae668dda07fc4d9 to your computer and use it in GitHub Desktop.
Install LAMP on CentOs 7
## INIT
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-releas nano wget
## SQL
yum -y install mariadb-server mariadb
systemctl start mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
## Apache
yum -y install httpd
systemctl start httpd.service
systemctl enable httpd.service
## FIREWALL
sudo yum install firewalld
sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo systemctl status firewalld
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
## PHP 7.2
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum -y install yum-utils
yum update
yum-config-manager --enable remi-php72
yum -y install php-mysqlnd php-pdo
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
systemctl restart httpd.service
## PHPMYADMIN
yum -y install phpMyAdmin
## Change /etc/phpMyAdmin/config.inc.php auth_type to htttp
systemctl restart httpd.service
## WEBMIN (OPTIONAL)
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.930-1.noarch.rpm
yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect
rpm -U webmin-1.930-1.noarch.rpm
firewall-cmd --permanent --zone=public --add-port=10000/tcp
firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment