mysql
安裝 直接yum install mysql-server是不能夠的
1 wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
2 rpm -ivh mysql-community-release-el7-5.noarch.rpm
3 yum install mysql-server
修改密碼
update user set password=password(‘123456‘) where user=‘root‘;
update user set authentication=password(‘123456‘) where user=‘root‘;
修改遠程鏈接權限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
flush privileges;
exit
service mysqld restart
防火牆
開放端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
--zone #做用域
--add-port=80/tcp #添加端口,格式爲:端口/通信協議
--permanent #永久生效,沒有此參數重啓後失效
--list-all
關閉及禁止開機啓動
systemctl stop firewalld.service #中止firewall
systemctl disable firewalld.service #禁止firewall開機啓動
apache
yum install httpd
php
yum install php
yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhashphp