Chciałem zainstalować sobie GameCP i o ile poradziłem sobie z instalacją skryptu, to nie mogę dodać maszyny.
Mam wykonać kod:
Kod: Zaznacz cały
mkdir -p /usr/local/gcp ; cd /usr/local/gcp; mkdir installs ;
# Download Remote Software
wget http://gamecp.com/get/from/this/mirror/GameCP-Remote-Linux.tar.gz ;
tar zxvf GameCP-Remote-Linux.tar.gz ; rm -f GameCP-Remote-Linux.tar.gz ;chmod +x ./gamecp bin32/gamecp_i386 bin64/gamecp_x64 ;
# Install Service
if [ ! -f /etc/init.d/gamecp ] ; then cp -f gamecp /etc/init.d/gamecp; fi;
if [ -f /sbin/chkconfig ] ; then chkconfig --add gamecp ; chkconfig --level 345 gamecp on ; fi ;
if [ -f /usr/sbin/update-rc.d ] ; then update-rc.d gamecp defaults; update-rc.d gamecp enable; fi ;
# Create Configuration File
if [ -f /usr/local/gcp/gamecp.ini ] ; then rm -f /usr/local/gcp/gamecp.ini; fi;
cat > /usr/local/gcp/gamecp.ini <<DELIM
mysql_host=localhost
mysql_user=root
mysql_pass=***
mysql_database=gcp
serverid=2
passphrase=oirFaejbie
debug=off
listenport=240
user_group=default
DELIM
chmod 600 /usr/local/gcp/gamecp.ini
# Open Firewall
if [ -f /sbin/iptables ] ; then iptables -I INPUT -p tcp --dport 240 -j ACCEPT; iptables -I INPUT -p udp --dport 240 -j ACCEPT; iptables-save; fi ;
# Deny Shell File
grep "/sbin/nologin" /etc/shells > /dev/null ; if [ $? -eq 1 ] ; then echo "/sbin/nologin" >> /etc/shells; fi ;
# Start GameCP Remote
/etc/init.d/gamecp start
Kiedy stworzę ten plik i nadam mu uprawnienia dostaję prawie ten sam błąd tylko z końcówką "(111)".can't connect to local MySQL server through socket 'var/lib/mysql/mysql.sock' (2)
Kiedy łączę się z innej maszyny to wyrzuca:
Jakieś pomysły?Can't connect to MySQL server on '77.79.248.76' (111)
@EDIT: Jeśli komuś to pomoże to trzeba zakomentować bind-address 127.0.0.1 w /etc/mysql/my.cnf