1.安装apache
yum install httpd*.x86_64
状态:systemctl status httpd
开启:systemctl start httpd
开机:systemctl enable httpd.service
2.安装mysql
yum install mysql mysql-server mysql-devel
状态:systemctl status mysqld
开启:systemctl start mysqld
开机:systemctl enable mysqld.service
2.1 设置mysql密码mysql>; USE mysql;
mysql>; UPDATE user SET password=PASSWORD('newpassword') WHERE user='root';
mysql>; FLUSH PRIVILEGES;
update user set password=PASSWORD('123456') WHERE USER='roor'
mysql -u root -p
Enter Password: <your new password>
mysql>GRANT ALL PRIVILEGES ON *.* TO '用户名'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
mysql>; FLUSH PRIVILEGES;
grant 权限 on 数据库教程名.表名 to 用户@登录主机 identified by "用户密码";
@ 后面是访问mysql的客户端ip地址(或是 主机名) % 代表任意的客户端
完成后就能用mysql-front远程管理mysql了。
3.安装php
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
systemctl restart httpd
之后还有防火墙的知识
编译安装:
yum -y install wget gcc-c++ ncurses ncurses-devel cmake make perl bison openssl openssl-devel gcc* libxml2 libxml2-devel curl-devel libjpeg* libpng* freetype*