LAMP在不同的机器上使用apache,mysql和php进行设置

时间:2015-11-17 15:49:32

标签: php mysql linux apache lamp

我是linux和LAMP设置的新手。我想在不同的服务器上设置一个带AMP的LAMP环境。我很难找到具有这种配置的相关文档。

到目前为止,我已完成以下步骤:

server1:

yum install -y httpd
/sbin/service httpd restart


server2:

yum install -y mysql-libs
yum install -y mysql
yum install -y perl-DBI
yum install -y perl-DBD-MySQL
yum install -y mysql-server
/sbin/chkconfig mysqld on
/sbin/service mysqld start
mysql -u root  -e "CREATE USER 'mysqluser' IDENTIFIED by 'password'" 
mysql -u root  -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED by 'password'"
mysql -u root  -e "GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'localhost' WITH GRANT OPTION"
mysql -u root  -e "GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%' WITH GRANT OPTION"
mysql -u mysqluser -p password -e "CREATE DATABASE mysqldb" 
mysql -u mysqluser -p password mysqldb < /tmp/mysqlinstaller/world.sql

server 3:

yum install -y php php-mysql
sed -i "s/Listen 80/#Listen 80/g" /etc/httpd/conf/httpd.conf
yum install -y mod_ssl openssl
/sbin/service httpd restart

如何在这3台服务器之间启用通信?请帮忙

0 个答案:

没有答案