- 博客(12)
- 问答 (1)
- 收藏
- 关注
原创 nginx的负载均衡
在配置文件中添加以下内容。http{ }upstream myproject{ ip_hash; server 125.210.42.4 fail_timeout=60s weight=3; server 172.31.2.183; weight=7; }server{listen 80;server_name localhost;location / { proxy_pass http://web-server; root html...
2022-05-19 16:36:10
393
原创 Linux中安装Tomcat详细步骤
Tomcat服务:Tomcat是Apache软件基金会的Jakarta项目中的一个核心项目,是一个开放源代码的web应用服务器,属于轻量级的应用服务器,在各中小型系统或并发访问量不高的场景中应用非常普通。具有处理HTML页面的功能,还是一个servlet和JSP容器。安装前:1、安装Java:yum install -y java-1.8.0-openjdk-devel.x86_64 java -version 验证查看是否安装成功Java ...
2022-05-19 16:33:34
217
原创 lnmp架构搭建WordPress开源博客
搭建nginx1、配置nginx源rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.yum search nginx2、安装nginxyum install -y pcre-devel openssl-devel 安装nginx依赖包yum install -y nginx3、实现PHP联动配置nginx的/etc/nginx/conf
2022-05-19 16:32:28
204
原创 LAMP环境
cat /etc/redhat-release # 查看CentOS版本cat /proc/version #查看存放与内核相关的文件yum-y update #升级系统组件到最新的版本关闭selinuxvi /etc/selinux/config #将SELINUX=enforcing改为SELINUX=disabled 设置后需要重启才能生效setenforce 0 #临时关闭命令getenforce #检测selinux是否关闭,Disab...
2022-05-19 16:11:23
385
原创 安装php
默认使用9000端口,1、安装php其它版本的系统可能有自带的php5.4;需要手动卸载下。yum remove php-mysql-5.4 php php-fpm php-common配置php的第三方源[root@localhost ~]# vim /etc/yum.repos.d/php.repo[php-webtatic]name = PHP Repositorybaseurl = http://us-east.repo.webtatic.com/yum/el7/x8
2022-05-19 16:04:15
1002
原创 部署并安装Discuz论坛
步骤一:部署Discuz!论坛代码1)下载及解包提前下载好Discuz!论坛的代码包文件,比如 Discuz_X3.4_SC_UTF8.zip,通过Xshell 7工具将此文件上传到服务器的 /root/ 目录下,并在服务器上确认Discuz! 正式版下载 - Discuz! 发布版下载 - Discuz! 下载 - Discuz! 最新版下载 - Discuz! 官方站 - PHP 开源论坛 - Powered by Discuz! (comsenz.com)https://download.
2022-05-10 09:40:52
495
原创 1.安装apache服务器,并配置访问端口为99992.添加新的默认页面sorry.html,在默认主页下不能访问的情况下显示“很抱歉。。。该网站正在维护中,请您在4月1号之后再访问,感谢您的支持
1.yum install httpd httpd-devel -ysystemctl start httpd.servicesystemctl enable httpd.servicecd /etc/httpd/conf/httpd.conf将80端口改为9999systemctl restart httpd2.vi /etc/httpd/conf/httpd.conf找到index.html 在其后面添加sorry.htmlcd /var/www/htmltouch sorry...
2022-04-07 08:12:40
177
原创 Linux安装jdk详细步骤
登录虚拟机进入终端切换到root用户上官网下载对应版本的安装包:Java Downloads | Oracle下载完后用Xshell 7把jdk安装包传到虚拟机对应的文件夹当中在终端进入对应的文件的目录,进一步解压,输入tar -zxvf +需要解压的包名打开文件进行修改,输入:mousepad /etc/profile 后直接在文本上修改exportJAVA_HOME=/usr/local/java/jdk1.7.080exportPATH=$JAVA_HOME/bin:...
2022-03-26 18:56:03
1343
原创 1.在/usr目录中新建一个目录名称为mytest.并在mytest目录中新建文件net.txt.设置文件的属性为文件属主 (u)增加执行权限,文件属主同组用户 (g)增加写入权限,其他用户(o)
1.cd /cd usrmkdir mytestcd mytesttouch net.txtchmod 420 net.txt2.cd ..tar -cft mytest3.cd /cd etcfind -size +20kfind -name 1vm*.conf
2022-03-13 20:36:20
859
原创 查询linux系统中文颜色分别代表什么意思
白色:表示普通文件蓝色:表示目录(文件夹)绿色:表示可执行文件红色:表示压缩文件,文件包。粉红色:图片;Socket文件浅蓝色:链接文件(软链接,硬链接)红色闪烁:表示链接的文件有问题黄色:表示设备文件( /dev目录下:物理块设备(b)、字符终端设备©)灰色:表示其他文件青黄色 :管道文件 ( p)黑底黄字:设备文件,硬盘,sda...
2022-03-07 19:57:58
579
原创 1.在/tmp目录下,新建目录director新建3个文件夹,分别命名为file1,file2,file3,用vi编辑器分别在3个文件中输入内容2.将file1/file2/file3三个文件中内
1.cd /tmpmkdir directorcd directortouch file1.txtvi file1.txti输入想输入的内容Ecs:wqtouch file2.txtvi file2.txti输入想输入的内容Ecs:wqtouch file3.txtvi file3.txti输入想输入的内容Ecs:wq2.cat file1.text file2.text file3.text>filetext.txt3.mkdir openchmod 5
2022-03-07 14:30:59
892
原创 作业...
1.找到/etc/ppp/ipup 文件,写出操作命令过程,并显示详细信息,粘贴到文档上2.新建一个新用户admin,指定/root家目录下,并指定用户ID为6666,设置密码为:admin123,写出命令过程3.写出推迟30秒关机命令1.cd / ls cd ppp ls cd ip-up2.sudo su输入密码adduser prefmapasswd prefma输入密码admin123再次输入一遍3.shutdown -t 30...
2022-02-28 14:21:33
668
空空如也
lnmp环境架构好了之后输入网址只能打开welcome to nginx
2022-05-24
TA创建的收藏夹 TA关注的收藏夹
TA关注的人