Connection time out installing mysql server in unix -
i trying install mysql server in aws ec2 instance. googled , executed below command in shell.
sudo yum install mysql-server
it throws below connection timed out exception
loaded plugins: priorities, update-motd, upgrade-helper http://packages.us-west- 2.amazonaws.com/2014.03/main/201403504e47/x86_64/repodata/repomd.xml?instance_id=i-c82c93c3®ion=us-west-2: [errno 12] timeout on http://packages.us-west-2.amazonaws.com/2014.03/main/201403504e47/x86_64/repodata/repomd.xml?instance_id=i-c82c93c3®ion=us-west-2: (28, 'connection timed out after 10001 milliseconds') trying other mirror.
is right way install mysql server?
thanks.
installing mysql
from current aws ec2 documentation:
to install , start lamp web server
connect instance.
to ensure of software packages date, perform quick software update on instance. process may take few minutes, important make sure have latest security updates , bug fixes.
note -y option installs updates without asking confirmation. if examine updates before installing, can omit option.
[ec2-user ~]$ sudo yum update -y
now instance current, can install apache web server, mysql, , php software packages. use yum groupinstall command install multiple software packages , related dependencies @ same time.
[ec2-user ~]$ sudo yum groupinstall -y "web server" "mysql database" "php support"
note non-amazon linux instances may have subtle differences in group names. if above command fails because of invalid group name, use yum grouplist command , scan output similar groups, such "mysql database server" instead of "mysql database", , use appropriate group name distribution.
install php-mysql package.
[ec2-user ~]$ sudo yum install -y php-mysql
i suppose need install mysql, need run 1st command, adapt second grab mysql repositories, , skip last one:
[ec2-user ~]$ sudo yum update -y [ec2-user ~]$ sudo yum groupinstall -y "mysql database"
depending on version of linux have installed (amazon, red hat or centos), may need change string "mysql database"
else. following command:
[ec2-user ~]$ sudo yum grouplist
will list possible group install may perform, need filter right string:
[ec2-user ~]$ sudo yum grouplist | grep -i mysql
and choose appropriate 1 in filtered result set.
network connectivity
now, regarding specific issue, faqs describes problem follow:
if ami cannot access yum repositories, timeout , retry multiple times before completing boot procedure. possible reasons restrictive firewall settings or vpc settings, prevent access amazon linux ami package repositories.
if encounter issue can either modify environment amazon linux ami can connect package repositories [...]
unfortunately, no explanations given yo how can change environment enable connectivity.
apparently, using dashboard, should able open outbound access port yum servers using:
aws dashboard > ec2 > security groups > default group > outbound rule: ??? (http*) 0.0.0.0/???
the usual port yum server 80, replace ???
above 80 have access repos. should replace 0.0.0.0
actual repository server address.
if solution not work, might try disabling firewall altogether duration of update:
[ec2-user ~]$ sudo /etc/init.d/iptables stop <...update commands listed above...> [ec2-user ~]$ sudo /etc/init.d/iptables start
or
[ec2-user ~]$ sudo /sbin/service iptables stop <...> [ec2-user ~]$ sudo /sbin/service iptables start
Comments
Post a Comment