安装LAMP
Install LAMP (Linux Apache, MariaDB, PHP) on CentOS 7
To install osTicket, your web server must have PHP 5.6 (or better) and MySQL 5.0 (or better) installed
安装PHP
升级yum
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装php5.6
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring php56w-fpm php56w-soap
yum install php56w-mysql php56w-gd php56w-ldap php56w-odbc php56w-pear php56w-xml php56w-xmlrpc php56w-mbstring php56w-snmp php56w-mcrypt
重启httpd
service httpd restart
查看版本
php –v
安装Apache
yum install -y httpd
systemctl restart httpd.service #重启apache
systemctl enable httpd.service #设置apache开机启动
安装mysql 5.7
rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
yum install mysql-* --skip-broken
启动
systemctl enable mysqld && systemctl start mysqld
获取临时密码
grep ‘temporary password’ /var/log/mysqld.log
更改密码
mysql_secure_installation
+++++++++++++++++++++++++++++++++++++++++++
mysql -u root -p(需要输入第 10步中设置的自定义密码)
create database os character set utf8;
create user os@’%’ identified by ‘Qingdao@2017’;
grant all privileges on os.* to os@’%’;
flush privileges;
exit;
+++++++++++++++++++++++++++++++++++++++++++
重启mysql
sudo systemctl restart mysqld
安装LAMP成功