我是相当新的Linux和LAMP设置。 我想在一台Linux服务器上设置AP的LAMP环境,在另一台Linux服务器上设置M。 我很难用这样的configurationfind相关的文档。
到目前为止,我已经完成了以下步骤:
server1的:
yum install -y httpd /sbin/service httpd restart 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 service iptables stop
我从/etc/httpd/conf/httpd.conf中更改了ServerName
#ServerName www.example.com:80
至
ServerName 172.32.35.14 (ip address of server1) /sbin/service httpd restart
服务器2:
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 service iptables stop
然后我有这些后configuration步骤:
在服务器2上,我的mysql被安装,我做了/etc/my.cnf下的标签[mysqld]
bind-address = 172.32.35.14 (ip of server 1 where apache/php are installed) service mysqld restart service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED]
我正面临着这些问题…
当我在浏览器上运行url http://172.32.35.14来检查apache安装时,我无法获得默认的apache主页。 相反,它说问题加载页面。
当我运行 – 服务mysqld重新启动 – 在安装mysql的服务器上,我得到以下错误:
服务mysqld启动MySQL守护进程启动失败。 启动mysqld:[失败]
你能指出我缺less什么,请指导我
bind-address是MySQL服务器的IP bind-address 。
http://172.32.35.14会从你禁用的http / 80端口加载。 使用https。
我想我也会投票把问题提交给超级用户的网站,这不是一个专业的问题。