Install php my admin
descargas.nTarea13 de Mayo de 2019
370 Palabras (2 Páginas)125 Visitas
phpmyadmin
yum install httpd
systemctl enable httpd
systemctl start httpd
systemctl status httpd
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --reload
http://192.168.1.75
sudo yum install epel-release
sudo yum install php
sudo yum install phpmyadmin
cp /etc/httpd/conf.d/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf.bak
# the ip address of de remote computer
nano /etc/httpd/conf.d/phpMyAdmin.conf
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 192.168.1.75
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
systemctl restart httpd
cp /etc/phpMyAdmin/config.inc.php /etc/phpMyAdmin/config.inc.php.bak
#add mysql user and password (root=12345678)
nano /etc/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = '12345678'; // MySQL password (only needed
systemctl restart httpd
http://192.168.1.71/phpmyadmin
sudo yum install php
## instalar ssl
yum install -y mod_ssl openssl
mkdir /certs
cd /certs
#Generate Private Key File
openssl genrsa -out keyfile.key 2048
#Generate Certificate Request File
openssl req -new -key keyfile.key -out certrequest.csr
Country Name (2 letter code) [XX]:co
State or Province Name (full name) []:Antioquia
Locality Name (eg, city) [Default City]:Medellin
Organization Name (eg, company) [Default Company Ltd]:lan SAS
Organizational Unit Name (eg, section) []:Sistemas
Common Name (eg, your name or your server's hostname) []:m.lan.com
Email Address []:sistemas@lan.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:@E1ppseuvs
An optional company name []:lan SAS
# Self Signing The Certificate
#los dias deben ser mayor a 3650 que es un 10 años
openssl x509 -req -days 3650 -in certrequest.csr -signkey keyfile.key -out certfile.crt
#Copy Files
cp certfile.crt /etc/pki/tls/certs/
cp keyfile.key /etc/pki/tls/private/
chmod go-rwx /etc/pki/tls/certs/certfile.crt
chmod go-rwx /etc/pki/tls/private/keyfile.key
#Update Apache Configuration to ssl
Find these lines and update them as follows:
cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.ori
nano /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/certfile.crt
SSLCertificateKeyFile /etc/pki/tls/private/keyfile.key
#Add the following lines to the end of the file
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.ori
nano /etc/httpd/conf/httpd.conf
...