一键安装LAMP,搭建 osTicket

LAMP 一键安装包 网址:https://lamp.sh/install.html
LAMP安装时间过长请不要用xshell安装容易断线,在虚拟机本机安装。

安装 wget、screen、unzip,创建 screen 会话
yum -y install wget screen git

git clone 并赋予脚本执行权限
git clone https://github.com/teddysun/lamp.git

cd lamp

chmod 755 *.sh 给权限

开始安装

screen -S lamp

./lamp.sh

安装选项
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
一键安装LAMP,搭建 osTicket
最后这里回车确认,有信息动了就等待安装,时间较长可以去睡一觉。

安装完毕后启动 httpd 服务
systemctl start httpd

查看是否启动 ,如有绿色表示启动成功
systemctl status httpd

扫描二维码关注公众号,回复: 5095364 查看本文章

查看firewall服务状态
systemctl status firewalld

关闭防火墙
service firewalld stop

网页测试输入你的ip:192.168.0.102
一键安装LAMP,搭建 osTicket
完成LAMP安装

添加配置 Mysql 用户,记住在mysql里面命令结束必须加上( ;)这个符号才能执行命令

安装模块
yum install php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-mcrypt

osTicket 官网下载,解压到win10系统下
一键安装LAMP,搭建 osTicket
把以下文件导入centos系统 /data/www/default 目录里
scripts
upload
一键安装LAMP,搭建 osTicket
scripts,upload 给权限
chown apache -R /data/www/default/upload
chown apache -R /data/www/default/scripts

到以下目录cp拷贝文件以下命令
cd /data/www/default/upload
cp include/ost-sampleconfig.php include/ost-config.php

启动mysql
systemctl start mysqld.service

登入数据库需要更改mysql密码,以下提示错误信息
mysql -u root -p
一键安装LAMP,搭建 osTicket
编辑etc/my.cnf文件添加 skip-grant-tables 免密码登入mysql
一键安装LAMP,搭建 osTicket
systemctl restart mysqld 重启

再登入 mysql -u root -p 以下是更改Mysql密码,以下红色筐是成功信息

update mysql.user set password=password('123') where user='root' and host='localhost';
flush privileges;
exit;
一键安装LAMP,搭建 osTicket
再编辑etc/my.cnf文件删除或注释这条命令 skip-grant-tables

添加用户
create database osticketdb;
create user "osuser"@"localhost" identified by "password";
grant all on osticketdb.* to "osuser"@"localhost";
flush privileges;
exit;

配置 文件default.conf重命名为www.a.com.comf
cd /usr/local/apache/conf/vhost/default.conf
以下内容覆盖到文件里去
<VirtualHost *:80>
DocumentRoot "/data/www/default/"
ServerName www.a.com
ServerAlias www.a.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/data/www/default/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

重启apache:再访问 192.169.0.117/upload
systemctl restart httpd.service 重启服务

猜你喜欢

转载自blog.51cto.com/13938402/2347045