centos 7安装openlitespeed

本文共有2094个字。 # openlitespeed/ a

一、准备工作

yum install epel-release -y
yum install gcc gcc-c++ make autoconf glibc rcs git -y
yum install pcre-devel openssl-devel expat-devel geoip-devel zlib-devel udns-devel -y

二、安装

1、下载源码包,源码包选择binary

wget https://openlitespeed.org/packages/openlitespeed-1.7.6.tgz

2、解压并安装

tar zxf openlitespeed-1.7.6.tgz
cd openlitespeed-1.7.6
./install.sh
systemctl start lshttpd

安装完毕后会显示:

Installation finished, Enjoy!

Your webAdmin password is MWY1ZGQx, written to file /usr/local/lsws/adminpasswd.

然后访问http://IP:8088,可以看到测试页面,如果服务器开启防火墙需要开启8088端口

3、设置管理员账号密码

/usr/local/lsws/admin/misc/admpass.sh

反馈信息:

Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]: admin

Please specify the administrator's password.
This is the password required to login the administration Web interface.

Password:
Retype password:
Administrator's username/password is updated successfully!

4、开启防火墙端口

firewall-cmd --state  #查看防火墙状态
firewall-cmd --zone=public --add-port=7080/tcp --permanent   #开启7080端口
firewall-cmd --zone=public --add-port=8088/tcp --permanent   
firewall-cmd --reload  #重启防火墙

5、登录管理后台:https://IP:7080

6、管理命令

systemctl start lshttpd  #启动
systemctl stop lshttpd  # 停止
systemctl status lshttpd  #状态
systemctl restart lshttpd  # 重启

三、安装mysql

1、下载mysql 5.7

wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

2、安装

rpm -ivh mysql57-community-release-el7-9.noarch.rpm
yum install mysql-server

3、启动

systemctl start mysqld
systemctl status mysqld  #查看状态

4、配置

grep 'temporary password' /var/log/mysqld.log    #生成默认密码
mysql_secure_installation

5、确认安装版本

mysqladmin -u root -p version

mysql安装参考资料

版权声明:本文为作者原创,如需转载须联系作者本人同意,未经作者本人同意不得擅自转载。本站微信公众号:7TEC,敬请关注!

暂时无法评论哦~

暂无评论