- 博客(11)
- 收藏
- 关注
原创 lnmp架构搭建WordPress开源博客
搭建nginx 1、配置nginx源 rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch. yum search nginx 2、安装nginx yum install -y pcre-devel openssl-devel 安装nginx依赖包 yum install -y nginx 3、实现PHP联动 配置nginx的/etc/nginx/conf
2022-05-23 19:16:44
128
原创 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-23 19:13:55
161
原创 安装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 Repository baseurl = http://us-east.repo.webtatic.com/yum/el7/x8
2022-05-23 19:12:19
165
原创 LAMP环境
cat /etc/redhat-release # 查看CentOS版本 cat /proc/version #查看存放与内核相关的文件 yum -y update #升级系统组件到最新的版本 关闭selinux vi /etc/selinux/config #将SELINUX=enforcing改为SELINUX=disabled 设置后需要重启才能生效 setenforce 0 #临时关闭命令 getenforce #检测selinux是否关闭,Disab...
2022-05-23 19:10:47
121
原创 部署并安装Discuz论坛
步骤一:部署Discuz!论坛代码 1)下载及解包 提前下载好Discuz!论坛的代码包文件,比如 Discuz_X3.4_SC_UTF8.zip,通过Xshell 7工具将此文件上传到服务器的 /root/ 目录下,并在服务器上确认Discuz! 正式版下载 - Discuz! 发布版下载 - Discuz! 下载 - Discuz! 最新版下载 - Discuz! 官方站 - PHP 开源论坛 - Powered by Discuz! ls查看 ls -lh /root/Discuz...
2022-05-11 14:30:09
861
原创 在/tmp目录下,新建项目director新建3个TXT文件,分别命名file1 、fie2、fie3,用 vi编辑器分别在三个文件中输入内容
1.在/tmp目录下,新建项目director新建3个TXT文件,分别命名file1.2.3 用vi编辑器分别在三个文件中输入内容 2 将三个file文件中的内容合并到一个文件中命名为 filetest.txt 3 在 director目录下,新建一个open目录,并在open目录下创建openfile目录,所有权限为 r-xr--r-- 4 将filetest.txt文件备份到/root下,并将/tmp/director目录移动到/usr中5 将open目录..
2022-05-11 10:14:37
470
原创 安装apache服务器,并配置访问端口为99992.添加新的默认页面sorry.html,在默认主页下不能访问的情况下显示“很抱歉。。。该网站正在维护中,请您在4月1号之后再访问,感谢您的支持
1.yum install httpd httpd-devel -y systemctl start httpd.service systemctl enable httpd.service cd /etc/httpd/conf/httpd.conf 将80端口改为9999 systemctl restart httpd 2.vi /etc/httpd/conf/httpd.conf 找到index.html 在其后面添加sorry.html cd /var/www/html touch sorry...
2022-05-11 10:12:34
195
原创 Linux安装jdk详细步骤
登录虚拟机进入终端切换到root用户 上官网下载对应版本的安装包:Java Downloads | Oracle 下载完后用Xshell 7把jdk安装包传到虚拟机对应的文件夹当中 在终端进入对应的文件的目录,进一步解压,输入tar -zxvf +需要解压的包名 打开文件进行修改,输入:mousepad /etc/profile 后直接在文本上修改 export JAVA_HOME=/usr/local/java/jdk1.7.0 80 export PATH= $JAVA_HOME/bin ..
2022-03-31 09:45:51
84
原创 查询linux系统中文颜色分别代表什么意思
白色:表示普通文件 蓝色:表示目录(文件夹) 绿色:表示可执行文件 红色:表示压缩文件,文件包。 粉红色:图片;Socket文件 浅蓝色:链接文件(软链接,硬链接) 红色闪烁:表示链接的文件有问题 黄色:表示设备文件(/dev目录下:物理块设备(b)、字符终端设备) 灰色:表示其他文件 青黄色:管道文件(p) 黑底黄字:设备文件,硬盘,sda ...
2022-03-07 19:59:28
515
原创 1.找到/etc/ppp/ipup 文件,写出操作命令过程,并显示详细信息,粘贴到文档上2.新建一个新用户admin,指定/root家目录下,并指定用户ID为66,设置密码为:admin123
1.cd / ls cd ppp ls cd ip-up 2.sudo su 输入密码 adduser prefma passwd prefma 输入密码admin123 再次输入一遍 3.shutdown -t 30
2022-03-07 19:19:49
284
原创 1.在/tmp目录下,新建目录director新建3个文件夹,分别命名为file1,file2,file3,用vi编辑器分别在3个文件中输入内容2.将file1/file2/file3三个文件中内
1.cd /tmp mkdir director cd director touch file1.txt vi file1.txt i 输入想输入的内容 Ecs :wq touch file2.txt vi file2.txt i 输入想输入的内容 Ecs :wq touch file3.txt vi file3.txt i 输入想输入的内容 Ecs :wq 2.cat file1.text file2.text file3.text>filetext.txt 3.mkdir open chmod 5
2022-03-07 19:14:09
575
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人