Skip to content

Instantly share code, notes, and snippets.

@zhangludi
zhangludi / docker安装.md
Last active June 2, 2023 09:43
docker 学习
@zhangludi
zhangludi / vmware 虚拟机.md
Created March 22, 2023 04:27
vmware 虚拟机

习Linux是很痛苦的过程,不计其数的linux学习者前期开启虚拟机双系统,中期实体机Linux,但在后期投入了MacOS的怀抱或者回到了梦开始的地方–虚拟机。

虚拟机除了性能差点,其余可谓是和实体机没什么差别,但直接在虚拟机内操作可能体验感比较差,要不,我们用ssh远程连接虚拟机的终端吧!

  1. 准备工作 详细的安装步骤略。我使用的是VMware Workstation Pro 16.0安装了Ubuntu 20.04LST 默认虚拟机的网络适配器是NAT模式,因为学校的校园网登录需要认证,我就让它保持不变。 然后就是要知道宿主机和虚拟机的ip地址

宿主机 Windows 10

@zhangludi
zhangludi / PHPExcel 导出文本变成科学记数法解决办法
Created June 11, 2019 02:17
PHPExcel 导出文本变成科学记数法解决办法
解决办法:在列写入值的时候,在值的前后加上"\t",记住一定要双引号。
$excel->setActiveSheetIndex(0)->setCellValue("A" . $i,"\t". $v['pk_name']."\t")
->setCellValue("B" . $i, "\t". $order_name."\t")
->setCellValue("C" . $i, "\t". $v['order_real_price']."\t")
->setCellValue("D" . $i, "\t". $v['order_username']."\t")
->setCellValue("E" . $i, "\t". $v['order_user_phon']."\t")
->setCellValue("F" . $i, "\t". $v['order_id_num']."\t")
@zhangludi
zhangludi / docker nginx 虚拟机
Created May 20, 2019 08:22
docker nginx 虚拟机
server {
listen 80;
server_name www.zlmm.cc; # 虚拟机域名
root /usr/share/nginx/html/zlmm;
index index.php index.html index.htm;
#charset koi8-r;
access_log /dev/null;
#access_log /var/log/nginx/nginx.localhost.access.log main;
error_log /var/log/nginx/nginx.localhost.error.log warn;
@zhangludi
zhangludi / docker 安装扩展 mysql pdo redis
Created May 20, 2019 06:22
docker 安装扩展 mysql pdo redis
https://blog.csdn.net/qq_36373262/article/details/79727223
1. 安装 redis
https://github.com/phpredis/phpredis/blob/develop/INSTALL.markdown
两种方式
phpize
./configure
@zhangludi
zhangludi / docker ngixn php redis mysql
Last active May 20, 2019 08:10
docker ngixn php redis mysql
https://segmentfault.com/a/1190000018643542
https://blog.csdn.net/qq_36373262/article/details/79727223
查看版本信息
[root@ganbing ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@ganbing ~]# docker version
Client:
Version: 17.12.0-ce
@zhangludi
zhangludi / Error response from daemon: Container b9820ff9dc45ce4f55294ed9de27c0b8c4997a3173e568bfdd56d6332e06e3b4 is not running
Created May 13, 2019 07:03
Error response from daemon: Container b9820ff9dc45ce4f55294ed9de27c0b8c4997a3173e568bfdd56d6332e06e3b4 is not running
First of all, we have to start the docker container
ankit@ankit-HP-Notebook:~$ sudo docker start 3a19b39ea021
3a19b39ea021
After that, check the docker container:
ankit@ankit-HP-Notebook:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
@zhangludi
zhangludi / 卸载docker
Created April 23, 2019 01:43
卸载docker
CentOS下yum命令出现Loaded plugins: fastestmirror
fastestmirror是yum的一个加速插件,这里是插件提示信息是插件不能用了。
步骤:
1.修改插件的配置文件
# vi /etc/yum/pluginconf.d/fastestmirror.conf
【Tips】:用Tab可补全
将enabled=1改为enabled=0
@zhangludi
zhangludi / Installing Telnet In CentOS RHEL Scientific Linux 6 & 7
Created March 20, 2019 07:39
Installing Telnet In CentOS /RHEL /Scientific Linux 6 & 7
Disclaimer:
Before installing and using Telnet, keep the following in mind.
Using Telnet in public network(WAN) is very very bad idea. It transmits login data in the clear format. Everything will be sent in plain text.
If you still need Telnet, It is highly recommended use it in the local area network only.
Alternatively, you can use SSH. But make sure you’ve disabled root login in SSH.
What Is Telnet?
Telnet is a network protocol which is used to connect to remote computers over TCP/IP network. Once you establish a connection to the remote computer, it becomes a virtual terminal and will allow you to communicate with the remote host from your local system.
In this brief tutorial, let us see how to install Telnet, and how to access remote systems via Telnet.
@zhangludi
zhangludi / centos7 telnet 安装 与 使用
Created March 20, 2019 07:33
centos7 telnet 安装 与 使用
https://www.jianshu.com/p/42f6443fa717
# 这两条命令设置开机时自动启动telnet服务
systemctl enable telnet.socket
systemctl enable xinetd
# 启动telnet服务
systemctl start telnet.socket